aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java500
1 files changed, 500 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java
new file mode 100644
index 00000000..88f96468
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/External_AllowanceImpl.java
@@ -0,0 +1,500 @@
1/**
2 */
3package TaxationWithRoot.impl;
4
5import TaxationWithRoot.Dependent;
6import TaxationWithRoot.External_Allowance;
7import TaxationWithRoot.Grantor;
8import TaxationWithRoot.Physical_Person;
9import TaxationWithRoot.TaxationWithRootPackage;
10
11import org.eclipse.emf.common.notify.Notification;
12import org.eclipse.emf.common.notify.NotificationChain;
13
14import org.eclipse.emf.ecore.EClass;
15import org.eclipse.emf.ecore.InternalEObject;
16
17import org.eclipse.emf.ecore.impl.ENotificationImpl;
18import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
19
20import org.eclipse.emf.ecore.util.EcoreUtil;
21
22/**
23 * <!-- begin-user-doc -->
24 * An implementation of the model object '<em><b>External Allowance</b></em>'.
25 * <!-- end-user-doc -->
26 * <p>
27 * The following features are implemented:
28 * </p>
29 * <ul>
30 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getGrantor <em>Grantor</em>}</li>
31 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getStarting_year <em>Starting year</em>}</li>
32 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getEnding_year <em>Ending year</em>}</li>
33 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getReciver <em>Reciver</em>}</li>
34 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getId5 <em>Id5</em>}</li>
35 * <li>{@link TaxationWithRoot.impl.External_AllowanceImpl#getPerson <em>Person</em>}</li>
36 * </ul>
37 *
38 * @generated
39 */
40public class External_AllowanceImpl extends MinimalEObjectImpl.Container implements External_Allowance {
41 /**
42 * The default value of the '{@link #getGrantor() <em>Grantor</em>}' attribute.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getGrantor()
46 * @generated
47 * @ordered
48 */
49 protected static final Grantor GRANTOR_EDEFAULT = Grantor.WWW;
50
51 /**
52 * The cached value of the '{@link #getGrantor() <em>Grantor</em>}' attribute.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @see #getGrantor()
56 * @generated
57 * @ordered
58 */
59 protected Grantor grantor = GRANTOR_EDEFAULT;
60
61 /**
62 * The default value of the '{@link #getStarting_year() <em>Starting year</em>}' attribute.
63 * <!-- begin-user-doc -->
64 * <!-- end-user-doc -->
65 * @see #getStarting_year()
66 * @generated
67 * @ordered
68 */
69 protected static final int STARTING_YEAR_EDEFAULT = 0;
70
71 /**
72 * The cached value of the '{@link #getStarting_year() <em>Starting year</em>}' attribute.
73 * <!-- begin-user-doc -->
74 * <!-- end-user-doc -->
75 * @see #getStarting_year()
76 * @generated
77 * @ordered
78 */
79 protected int starting_year = STARTING_YEAR_EDEFAULT;
80
81 /**
82 * The default value of the '{@link #getEnding_year() <em>Ending year</em>}' attribute.
83 * <!-- begin-user-doc -->
84 * <!-- end-user-doc -->
85 * @see #getEnding_year()
86 * @generated
87 * @ordered
88 */
89 protected static final int ENDING_YEAR_EDEFAULT = 0;
90
91 /**
92 * The cached value of the '{@link #getEnding_year() <em>Ending year</em>}' attribute.
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @see #getEnding_year()
96 * @generated
97 * @ordered
98 */
99 protected int ending_year = ENDING_YEAR_EDEFAULT;
100
101 /**
102 * The cached value of the '{@link #getReciver() <em>Reciver</em>}' reference.
103 * <!-- begin-user-doc -->
104 * <!-- end-user-doc -->
105 * @see #getReciver()
106 * @generated
107 * @ordered
108 */
109 protected Physical_Person reciver;
110
111 /**
112 * The default value of the '{@link #getId5() <em>Id5</em>}' attribute.
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @see #getId5()
116 * @generated
117 * @ordered
118 */
119 protected static final String ID5_EDEFAULT = null;
120
121 /**
122 * The cached value of the '{@link #getId5() <em>Id5</em>}' attribute.
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @see #getId5()
126 * @generated
127 * @ordered
128 */
129 protected String id5 = ID5_EDEFAULT;
130
131 /**
132 * <!-- begin-user-doc -->
133 * <!-- end-user-doc -->
134 * @generated
135 */
136 protected External_AllowanceImpl() {
137 super();
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 @Override
146 protected EClass eStaticClass() {
147 return TaxationWithRootPackage.Literals.EXTERNAL_ALLOWANCE;
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 @Override
156 public Grantor getGrantor() {
157 return grantor;
158 }
159
160 /**
161 * <!-- begin-user-doc -->
162 * <!-- end-user-doc -->
163 * @generated
164 */
165 @Override
166 public void setGrantor(Grantor newGrantor) {
167 Grantor oldGrantor = grantor;
168 grantor = newGrantor == null ? GRANTOR_EDEFAULT : newGrantor;
169 if (eNotificationRequired())
170 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__GRANTOR, oldGrantor, grantor));
171 }
172
173 /**
174 * <!-- begin-user-doc -->
175 * <!-- end-user-doc -->
176 * @generated
177 */
178 @Override
179 public int getStarting_year() {
180 return starting_year;
181 }
182
183 /**
184 * <!-- begin-user-doc -->
185 * <!-- end-user-doc -->
186 * @generated
187 */
188 @Override
189 public void setStarting_year(int newStarting_year) {
190 int oldStarting_year = starting_year;
191 starting_year = newStarting_year;
192 if (eNotificationRequired())
193 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__STARTING_YEAR, oldStarting_year, starting_year));
194 }
195
196 /**
197 * <!-- begin-user-doc -->
198 * <!-- end-user-doc -->
199 * @generated
200 */
201 @Override
202 public int getEnding_year() {
203 return ending_year;
204 }
205
206 /**
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @generated
210 */
211 @Override
212 public void setEnding_year(int newEnding_year) {
213 int oldEnding_year = ending_year;
214 ending_year = newEnding_year;
215 if (eNotificationRequired())
216 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ENDING_YEAR, oldEnding_year, ending_year));
217 }
218
219 /**
220 * <!-- begin-user-doc -->
221 * <!-- end-user-doc -->
222 * @generated
223 */
224 @Override
225 public Physical_Person getReciver() {
226 if (reciver != null && reciver.eIsProxy()) {
227 InternalEObject oldReciver = (InternalEObject)reciver;
228 reciver = (Physical_Person)eResolveProxy(oldReciver);
229 if (reciver != oldReciver) {
230 if (eNotificationRequired())
231 eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER, oldReciver, reciver));
232 }
233 }
234 return reciver;
235 }
236
237 /**
238 * <!-- begin-user-doc -->
239 * <!-- end-user-doc -->
240 * @generated
241 */
242 public Physical_Person basicGetReciver() {
243 return reciver;
244 }
245
246 /**
247 * <!-- begin-user-doc -->
248 * <!-- end-user-doc -->
249 * @generated
250 */
251 @Override
252 public void setReciver(Physical_Person newReciver) {
253 Physical_Person oldReciver = reciver;
254 reciver = newReciver;
255 if (eNotificationRequired())
256 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER, oldReciver, reciver));
257 }
258
259 /**
260 * <!-- begin-user-doc -->
261 * <!-- end-user-doc -->
262 * @generated
263 */
264 @Override
265 public String getId5() {
266 return id5;
267 }
268
269 /**
270 * <!-- begin-user-doc -->
271 * <!-- end-user-doc -->
272 * @generated
273 */
274 @Override
275 public void setId5(String newId5) {
276 String oldId5 = id5;
277 id5 = newId5;
278 if (eNotificationRequired())
279 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ID5, oldId5, id5));
280 }
281
282 /**
283 * <!-- begin-user-doc -->
284 * <!-- end-user-doc -->
285 * @generated
286 */
287 @Override
288 public Dependent getPerson() {
289 if (eContainerFeatureID() != TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON) return null;
290 return (Dependent)eInternalContainer();
291 }
292
293 /**
294 * <!-- begin-user-doc -->
295 * <!-- end-user-doc -->
296 * @generated
297 */
298 public NotificationChain basicSetPerson(Dependent newPerson, NotificationChain msgs) {
299 msgs = eBasicSetContainer((InternalEObject)newPerson, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON, msgs);
300 return msgs;
301 }
302
303 /**
304 * <!-- begin-user-doc -->
305 * <!-- end-user-doc -->
306 * @generated
307 */
308 @Override
309 public void setPerson(Dependent newPerson) {
310 if (newPerson != eInternalContainer() || (eContainerFeatureID() != TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON && newPerson != null)) {
311 if (EcoreUtil.isAncestor(this, newPerson))
312 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
313 NotificationChain msgs = null;
314 if (eInternalContainer() != null)
315 msgs = eBasicRemoveFromContainer(msgs);
316 if (newPerson != null)
317 msgs = ((InternalEObject)newPerson).eInverseAdd(this, TaxationWithRootPackage.DEPENDENT__ALLOWANCES, Dependent.class, msgs);
318 msgs = basicSetPerson(newPerson, msgs);
319 if (msgs != null) msgs.dispatch();
320 }
321 else if (eNotificationRequired())
322 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON, newPerson, newPerson));
323 }
324
325 /**
326 * <!-- begin-user-doc -->
327 * <!-- end-user-doc -->
328 * @generated
329 */
330 @Override
331 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
332 switch (featureID) {
333 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
334 if (eInternalContainer() != null)
335 msgs = eBasicRemoveFromContainer(msgs);
336 return basicSetPerson((Dependent)otherEnd, msgs);
337 }
338 return super.eInverseAdd(otherEnd, featureID, msgs);
339 }
340
341 /**
342 * <!-- begin-user-doc -->
343 * <!-- end-user-doc -->
344 * @generated
345 */
346 @Override
347 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
348 switch (featureID) {
349 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
350 return basicSetPerson(null, msgs);
351 }
352 return super.eInverseRemove(otherEnd, featureID, msgs);
353 }
354
355 /**
356 * <!-- begin-user-doc -->
357 * <!-- end-user-doc -->
358 * @generated
359 */
360 @Override
361 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
362 switch (eContainerFeatureID()) {
363 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
364 return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.DEPENDENT__ALLOWANCES, Dependent.class, msgs);
365 }
366 return super.eBasicRemoveFromContainerFeature(msgs);
367 }
368
369 /**
370 * <!-- begin-user-doc -->
371 * <!-- end-user-doc -->
372 * @generated
373 */
374 @Override
375 public Object eGet(int featureID, boolean resolve, boolean coreType) {
376 switch (featureID) {
377 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__GRANTOR:
378 return getGrantor();
379 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__STARTING_YEAR:
380 return getStarting_year();
381 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ENDING_YEAR:
382 return getEnding_year();
383 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER:
384 if (resolve) return getReciver();
385 return basicGetReciver();
386 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ID5:
387 return getId5();
388 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
389 return getPerson();
390 }
391 return super.eGet(featureID, resolve, coreType);
392 }
393
394 /**
395 * <!-- begin-user-doc -->
396 * <!-- end-user-doc -->
397 * @generated
398 */
399 @Override
400 public void eSet(int featureID, Object newValue) {
401 switch (featureID) {
402 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__GRANTOR:
403 setGrantor((Grantor)newValue);
404 return;
405 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__STARTING_YEAR:
406 setStarting_year((Integer)newValue);
407 return;
408 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ENDING_YEAR:
409 setEnding_year((Integer)newValue);
410 return;
411 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER:
412 setReciver((Physical_Person)newValue);
413 return;
414 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ID5:
415 setId5((String)newValue);
416 return;
417 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
418 setPerson((Dependent)newValue);
419 return;
420 }
421 super.eSet(featureID, newValue);
422 }
423
424 /**
425 * <!-- begin-user-doc -->
426 * <!-- end-user-doc -->
427 * @generated
428 */
429 @Override
430 public void eUnset(int featureID) {
431 switch (featureID) {
432 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__GRANTOR:
433 setGrantor(GRANTOR_EDEFAULT);
434 return;
435 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__STARTING_YEAR:
436 setStarting_year(STARTING_YEAR_EDEFAULT);
437 return;
438 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ENDING_YEAR:
439 setEnding_year(ENDING_YEAR_EDEFAULT);
440 return;
441 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER:
442 setReciver((Physical_Person)null);
443 return;
444 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ID5:
445 setId5(ID5_EDEFAULT);
446 return;
447 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
448 setPerson((Dependent)null);
449 return;
450 }
451 super.eUnset(featureID);
452 }
453
454 /**
455 * <!-- begin-user-doc -->
456 * <!-- end-user-doc -->
457 * @generated
458 */
459 @Override
460 public boolean eIsSet(int featureID) {
461 switch (featureID) {
462 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__GRANTOR:
463 return grantor != GRANTOR_EDEFAULT;
464 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__STARTING_YEAR:
465 return starting_year != STARTING_YEAR_EDEFAULT;
466 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ENDING_YEAR:
467 return ending_year != ENDING_YEAR_EDEFAULT;
468 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__RECIVER:
469 return reciver != null;
470 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__ID5:
471 return ID5_EDEFAULT == null ? id5 != null : !ID5_EDEFAULT.equals(id5);
472 case TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON:
473 return getPerson() != null;
474 }
475 return super.eIsSet(featureID);
476 }
477
478 /**
479 * <!-- begin-user-doc -->
480 * <!-- end-user-doc -->
481 * @generated
482 */
483 @Override
484 public String toString() {
485 if (eIsProxy()) return super.toString();
486
487 StringBuilder result = new StringBuilder(super.toString());
488 result.append(" (grantor: ");
489 result.append(grantor);
490 result.append(", starting_year: ");
491 result.append(starting_year);
492 result.append(", ending_year: ");
493 result.append(ending_year);
494 result.append(", id5: ");
495 result.append(id5);
496 result.append(')');
497 return result.toString();
498 }
499
500} //External_AllowanceImpl