View Javadoc
1   /*****************************************************************************
2    * Copyright (c) 2010, 2016 CEA LIST.
3    *
4    *
5    * All rights reserved. This program and the accompanying materials
6    * are made available under the terms of the Eclipse Public License v1.0
7    * which accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    *
10   * Contributors:
11   *  Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
12   *
13   *****************************************************************************/
14  package org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl;
15  
16  import org.eclipse.emf.common.notify.Notification;
17  import org.eclipse.emf.ecore.EClass;
18  import org.eclipse.emf.ecore.impl.ENotificationImpl;
19  import org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.GQAM.impl.GaExecHostImpl;
20  import org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SAMPackage;
21  import org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.SaExecHost;
22  
23  /**
24   * <!-- begin-user-doc -->
25   * An implementation of the model object '<em><b>Sa Exec Host</b></em>'.
26   * <!-- end-user-doc -->
27   * <p>
28   * The following features are implemented:
29   * <ul>
30   * <li>{@link org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl.SaExecHostImpl#getIsSched <em>Is Sched</em>}</li>
31   * <li>{@link org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl.SaExecHostImpl#getSchSlack <em>Sch Slack</em>}</li>
32   * <li>{@link org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl.SaExecHostImpl#getSchedUtiliz <em>Sched Utiliz</em>}</li>
33   * <li>{@link org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl.SaExecHostImpl#getISRswitchT <em>IS Rswitch T</em>}</li>
34   * <li>{@link org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.SAM.impl.SaExecHostImpl#getISRprioRange <em>IS Rprio Range</em>}</li>
35   * </ul>
36   * </p>
37   *
38   * @generated
39   */
40  public class SaExecHostImpl extends GaExecHostImpl implements SaExecHost {
41  	/**
42  	 * The default value of the '{@link #getIsSched() <em>Is Sched</em>}' attribute.
43  	 * <!-- begin-user-doc -->
44  	 * <!-- end-user-doc -->
45  	 *
46  	 * @see #getIsSched()
47  	 * @generated
48  	 * @ordered
49  	 */
50  	protected static final String IS_SCHED_EDEFAULT = null;
51  
52  	/**
53  	 * The cached value of the '{@link #getIsSched() <em>Is Sched</em>}' attribute.
54  	 * <!-- begin-user-doc -->
55  	 * <!-- end-user-doc -->
56  	 *
57  	 * @see #getIsSched()
58  	 * @generated
59  	 * @ordered
60  	 */
61  	protected String isSched = IS_SCHED_EDEFAULT;
62  
63  	/**
64  	 * The default value of the '{@link #getSchSlack() <em>Sch Slack</em>}' attribute.
65  	 * <!-- begin-user-doc -->
66  	 * <!-- end-user-doc -->
67  	 *
68  	 * @see #getSchSlack()
69  	 * @generated
70  	 * @ordered
71  	 */
72  	protected static final String SCH_SLACK_EDEFAULT = null;
73  
74  	/**
75  	 * The cached value of the '{@link #getSchSlack() <em>Sch Slack</em>}' attribute.
76  	 * <!-- begin-user-doc -->
77  	 * <!-- end-user-doc -->
78  	 *
79  	 * @see #getSchSlack()
80  	 * @generated
81  	 * @ordered
82  	 */
83  	protected String schSlack = SCH_SLACK_EDEFAULT;
84  
85  	/**
86  	 * The default value of the '{@link #getSchedUtiliz() <em>Sched Utiliz</em>}' attribute.
87  	 * <!-- begin-user-doc -->
88  	 * <!-- end-user-doc -->
89  	 *
90  	 * @see #getSchedUtiliz()
91  	 * @generated
92  	 * @ordered
93  	 */
94  	protected static final String SCHED_UTILIZ_EDEFAULT = null;
95  
96  	/**
97  	 * The cached value of the '{@link #getSchedUtiliz() <em>Sched Utiliz</em>}' attribute.
98  	 * <!-- begin-user-doc -->
99  	 * <!-- end-user-doc -->
100 	 *
101 	 * @see #getSchedUtiliz()
102 	 * @generated
103 	 * @ordered
104 	 */
105 	protected String schedUtiliz = SCHED_UTILIZ_EDEFAULT;
106 
107 	/**
108 	 * The default value of the '{@link #getISRswitchT() <em>IS Rswitch T</em>}' attribute.
109 	 * <!-- begin-user-doc -->
110 	 * <!-- end-user-doc -->
111 	 *
112 	 * @see #getISRswitchT()
113 	 * @generated
114 	 * @ordered
115 	 */
116 	protected static final String IS_RSWITCH_T_EDEFAULT = null;
117 
118 	/**
119 	 * The cached value of the '{@link #getISRswitchT() <em>IS Rswitch T</em>}' attribute.
120 	 * <!-- begin-user-doc -->
121 	 * <!-- end-user-doc -->
122 	 *
123 	 * @see #getISRswitchT()
124 	 * @generated
125 	 * @ordered
126 	 */
127 	protected String isRswitchT = IS_RSWITCH_T_EDEFAULT;
128 
129 	/**
130 	 * The default value of the '{@link #getISRprioRange() <em>IS Rprio Range</em>}' attribute.
131 	 * <!-- begin-user-doc -->
132 	 * <!-- end-user-doc -->
133 	 *
134 	 * @see #getISRprioRange()
135 	 * @generated
136 	 * @ordered
137 	 */
138 	protected static final String IS_RPRIO_RANGE_EDEFAULT = null;
139 
140 	/**
141 	 * The cached value of the '{@link #getISRprioRange() <em>IS Rprio Range</em>}' attribute.
142 	 * <!-- begin-user-doc -->
143 	 * <!-- end-user-doc -->
144 	 *
145 	 * @see #getISRprioRange()
146 	 * @generated
147 	 * @ordered
148 	 */
149 	protected String isRprioRange = IS_RPRIO_RANGE_EDEFAULT;
150 
151 	/**
152 	 * <!-- begin-user-doc -->
153 	 * <!-- end-user-doc -->
154 	 *
155 	 * @generated
156 	 */
157 	protected SaExecHostImpl() {
158 		super();
159 	}
160 
161 	/**
162 	 * <!-- begin-user-doc -->
163 	 * <!-- end-user-doc -->
164 	 *
165 	 * @generated
166 	 */
167 	@Override
168 	protected EClass eStaticClass() {
169 		return SAMPackage.Literals.SA_EXEC_HOST;
170 	}
171 
172 	/**
173 	 * <!-- begin-user-doc -->
174 	 * <!-- end-user-doc -->
175 	 *
176 	 * @generated
177 	 */
178 	@Override
179 	public String getIsSched() {
180 		return isSched;
181 	}
182 
183 	/**
184 	 * <!-- begin-user-doc -->
185 	 * <!-- end-user-doc -->
186 	 *
187 	 * @generated
188 	 */
189 	@Override
190 	public void setIsSched(String newIsSched) {
191 		String oldIsSched = isSched;
192 		isSched = newIsSched;
193 		if (eNotificationRequired()) {
194 			eNotify(new ENotificationImpl(this, Notification.SET, SAMPackage.SA_EXEC_HOST__IS_SCHED, oldIsSched, isSched));
195 		}
196 	}
197 
198 	/**
199 	 * <!-- begin-user-doc -->
200 	 * <!-- end-user-doc -->
201 	 *
202 	 * @generated
203 	 */
204 	@Override
205 	public String getSchSlack() {
206 		return schSlack;
207 	}
208 
209 	/**
210 	 * <!-- begin-user-doc -->
211 	 * <!-- end-user-doc -->
212 	 *
213 	 * @generated
214 	 */
215 	@Override
216 	public void setSchSlack(String newSchSlack) {
217 		String oldSchSlack = schSlack;
218 		schSlack = newSchSlack;
219 		if (eNotificationRequired()) {
220 			eNotify(new ENotificationImpl(this, Notification.SET, SAMPackage.SA_EXEC_HOST__SCH_SLACK, oldSchSlack, schSlack));
221 		}
222 	}
223 
224 	/**
225 	 * <!-- begin-user-doc -->
226 	 * <!-- end-user-doc -->
227 	 *
228 	 * @generated
229 	 */
230 	@Override
231 	public String getSchedUtiliz() {
232 		return schedUtiliz;
233 	}
234 
235 	/**
236 	 * <!-- begin-user-doc -->
237 	 * <!-- end-user-doc -->
238 	 *
239 	 * @generated
240 	 */
241 	@Override
242 	public void setSchedUtiliz(String newSchedUtiliz) {
243 		String oldSchedUtiliz = schedUtiliz;
244 		schedUtiliz = newSchedUtiliz;
245 		if (eNotificationRequired()) {
246 			eNotify(new ENotificationImpl(this, Notification.SET, SAMPackage.SA_EXEC_HOST__SCHED_UTILIZ, oldSchedUtiliz, schedUtiliz));
247 		}
248 	}
249 
250 	/**
251 	 * <!-- begin-user-doc -->
252 	 * <!-- end-user-doc -->
253 	 *
254 	 * @generated
255 	 */
256 	@Override
257 	public String getISRswitchT() {
258 		return isRswitchT;
259 	}
260 
261 	/**
262 	 * <!-- begin-user-doc -->
263 	 * <!-- end-user-doc -->
264 	 *
265 	 * @generated
266 	 */
267 	@Override
268 	public void setISRswitchT(String newISRswitchT) {
269 		String oldISRswitchT = isRswitchT;
270 		isRswitchT = newISRswitchT;
271 		if (eNotificationRequired()) {
272 			eNotify(new ENotificationImpl(this, Notification.SET, SAMPackage.SA_EXEC_HOST__IS_RSWITCH_T, oldISRswitchT, isRswitchT));
273 		}
274 	}
275 
276 	/**
277 	 * <!-- begin-user-doc -->
278 	 * <!-- end-user-doc -->
279 	 *
280 	 * @generated
281 	 */
282 	@Override
283 	public String getISRprioRange() {
284 		return isRprioRange;
285 	}
286 
287 	/**
288 	 * <!-- begin-user-doc -->
289 	 * <!-- end-user-doc -->
290 	 *
291 	 * @generated
292 	 */
293 	@Override
294 	public void setISRprioRange(String newISRprioRange) {
295 		String oldISRprioRange = isRprioRange;
296 		isRprioRange = newISRprioRange;
297 		if (eNotificationRequired()) {
298 			eNotify(new ENotificationImpl(this, Notification.SET, SAMPackage.SA_EXEC_HOST__IS_RPRIO_RANGE, oldISRprioRange, isRprioRange));
299 		}
300 	}
301 
302 	/**
303 	 * <!-- begin-user-doc -->
304 	 * <!-- end-user-doc -->
305 	 *
306 	 * @generated
307 	 */
308 	@Override
309 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
310 		switch (featureID) {
311 		case SAMPackage.SA_EXEC_HOST__IS_SCHED:
312 			return getIsSched();
313 		case SAMPackage.SA_EXEC_HOST__SCH_SLACK:
314 			return getSchSlack();
315 		case SAMPackage.SA_EXEC_HOST__SCHED_UTILIZ:
316 			return getSchedUtiliz();
317 		case SAMPackage.SA_EXEC_HOST__IS_RSWITCH_T:
318 			return getISRswitchT();
319 		case SAMPackage.SA_EXEC_HOST__IS_RPRIO_RANGE:
320 			return getISRprioRange();
321 		}
322 		return super.eGet(featureID, resolve, coreType);
323 	}
324 
325 	/**
326 	 * <!-- begin-user-doc -->
327 	 * <!-- end-user-doc -->
328 	 *
329 	 * @generated
330 	 */
331 	@Override
332 	public void eSet(int featureID, Object newValue) {
333 		switch (featureID) {
334 		case SAMPackage.SA_EXEC_HOST__IS_SCHED:
335 			setIsSched((String) newValue);
336 			return;
337 		case SAMPackage.SA_EXEC_HOST__SCH_SLACK:
338 			setSchSlack((String) newValue);
339 			return;
340 		case SAMPackage.SA_EXEC_HOST__SCHED_UTILIZ:
341 			setSchedUtiliz((String) newValue);
342 			return;
343 		case SAMPackage.SA_EXEC_HOST__IS_RSWITCH_T:
344 			setISRswitchT((String) newValue);
345 			return;
346 		case SAMPackage.SA_EXEC_HOST__IS_RPRIO_RANGE:
347 			setISRprioRange((String) newValue);
348 			return;
349 		}
350 		super.eSet(featureID, newValue);
351 	}
352 
353 	/**
354 	 * <!-- begin-user-doc -->
355 	 * <!-- end-user-doc -->
356 	 *
357 	 * @generated
358 	 */
359 	@Override
360 	public void eUnset(int featureID) {
361 		switch (featureID) {
362 		case SAMPackage.SA_EXEC_HOST__IS_SCHED:
363 			setIsSched(IS_SCHED_EDEFAULT);
364 			return;
365 		case SAMPackage.SA_EXEC_HOST__SCH_SLACK:
366 			setSchSlack(SCH_SLACK_EDEFAULT);
367 			return;
368 		case SAMPackage.SA_EXEC_HOST__SCHED_UTILIZ:
369 			setSchedUtiliz(SCHED_UTILIZ_EDEFAULT);
370 			return;
371 		case SAMPackage.SA_EXEC_HOST__IS_RSWITCH_T:
372 			setISRswitchT(IS_RSWITCH_T_EDEFAULT);
373 			return;
374 		case SAMPackage.SA_EXEC_HOST__IS_RPRIO_RANGE:
375 			setISRprioRange(IS_RPRIO_RANGE_EDEFAULT);
376 			return;
377 		}
378 		super.eUnset(featureID);
379 	}
380 
381 	/**
382 	 * <!-- begin-user-doc -->
383 	 * <!-- end-user-doc -->
384 	 *
385 	 * @generated
386 	 */
387 	@Override
388 	public boolean eIsSet(int featureID) {
389 		switch (featureID) {
390 		case SAMPackage.SA_EXEC_HOST__IS_SCHED:
391 			return IS_SCHED_EDEFAULT == null ? isSched != null : !IS_SCHED_EDEFAULT.equals(isSched);
392 		case SAMPackage.SA_EXEC_HOST__SCH_SLACK:
393 			return SCH_SLACK_EDEFAULT == null ? schSlack != null : !SCH_SLACK_EDEFAULT.equals(schSlack);
394 		case SAMPackage.SA_EXEC_HOST__SCHED_UTILIZ:
395 			return SCHED_UTILIZ_EDEFAULT == null ? schedUtiliz != null : !SCHED_UTILIZ_EDEFAULT.equals(schedUtiliz);
396 		case SAMPackage.SA_EXEC_HOST__IS_RSWITCH_T:
397 			return IS_RSWITCH_T_EDEFAULT == null ? isRswitchT != null : !IS_RSWITCH_T_EDEFAULT.equals(isRswitchT);
398 		case SAMPackage.SA_EXEC_HOST__IS_RPRIO_RANGE:
399 			return IS_RPRIO_RANGE_EDEFAULT == null ? isRprioRange != null : !IS_RPRIO_RANGE_EDEFAULT.equals(isRprioRange);
400 		}
401 		return super.eIsSet(featureID);
402 	}
403 
404 	/**
405 	 * <!-- begin-user-doc -->
406 	 * <!-- end-user-doc -->
407 	 *
408 	 * @generated
409 	 */
410 	@Override
411 	public String toString() {
412 		if (eIsProxy()) {
413 			return super.toString();
414 		}
415 
416 		StringBuffer result = new StringBuffer(super.toString());
417 		result.append(" (isSched: ");
418 		result.append(isSched);
419 		result.append(", schSlack: ");
420 		result.append(schSlack);
421 		result.append(", schedUtiliz: ");
422 		result.append(schedUtiliz);
423 		result.append(", ISRswitchT: ");
424 		result.append(isRswitchT);
425 		result.append(", ISRprioRange: ");
426 		result.append(isRprioRange);
427 		result.append(')');
428 		return result.toString();
429 	}
430 
431 } // SaExecHostImpl