aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java
diff options
context:
space:
mode:
authorLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2020-04-26 18:23:13 -0400
committerLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2020-04-26 18:23:13 -0400
commitc0a758eedd457a5d8eb9f1a6c17fc24143aabb3e (patch)
tree0c2e212e4e95c1d2311629128641d5cd561210f3 /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java
parentMerge branch 'Attribute-Solver' (diff)
downloadVIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.gz
VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.zst
VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.zip
Add PLEDGE case study files
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java547
1 files changed, 547 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java
new file mode 100644
index 00000000..ff882fd5
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_DetailImpl.java
@@ -0,0 +1,547 @@
1/**
2 */
3package Taxation.impl;
4
5import Taxation.Income;
6import Taxation.Income_Detail;
7import Taxation.TaxationPackage;
8import org.eclipse.emf.common.notify.Notification;
9import org.eclipse.emf.common.notify.NotificationChain;
10
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.InternalEObject;
13
14import org.eclipse.emf.ecore.impl.ENotificationImpl;
15import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
16
17import org.eclipse.emf.ecore.util.EcoreUtil;
18
19/**
20 * <!-- begin-user-doc -->
21 * An implementation of the model object '<em><b>Income Detail</b></em>'.
22 * <!-- end-user-doc -->
23 * <p>
24 * The following features are implemented:
25 * </p>
26 * <ul>
27 * <li>{@link Taxation.impl.Income_DetailImpl#getAmount <em>Amount</em>}</li>
28 * <li>{@link Taxation.impl.Income_DetailImpl#isIs_worked <em>Is worked</em>}</li>
29 * <li>{@link Taxation.impl.Income_DetailImpl#getDistance <em>Distance</em>}</li>
30 * <li>{@link Taxation.impl.Income_DetailImpl#getWorked_days <em>Worked days</em>}</li>
31 * <li>{@link Taxation.impl.Income_DetailImpl#isIs_contributing_CNS <em>Is contributing CNS</em>}</li>
32 * <li>{@link Taxation.impl.Income_DetailImpl#getId5 <em>Id5</em>}</li>
33 * <li>{@link Taxation.impl.Income_DetailImpl#getIncome <em>Income</em>}</li>
34 * </ul>
35 *
36 * @generated
37 */
38public class Income_DetailImpl extends MinimalEObjectImpl.Container implements Income_Detail {
39 /**
40 * The default value of the '{@link #getAmount() <em>Amount</em>}' attribute.
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
43 * @see #getAmount()
44 * @generated
45 * @ordered
46 */
47 protected static final double AMOUNT_EDEFAULT = 0.0;
48
49 /**
50 * The cached value of the '{@link #getAmount() <em>Amount</em>}' attribute.
51 * <!-- begin-user-doc -->
52 * <!-- end-user-doc -->
53 * @see #getAmount()
54 * @generated
55 * @ordered
56 */
57 protected double amount = AMOUNT_EDEFAULT;
58
59 /**
60 * The default value of the '{@link #isIs_worked() <em>Is worked</em>}' attribute.
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @see #isIs_worked()
64 * @generated
65 * @ordered
66 */
67 protected static final boolean IS_WORKED_EDEFAULT = false;
68
69 /**
70 * The cached value of the '{@link #isIs_worked() <em>Is worked</em>}' attribute.
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @see #isIs_worked()
74 * @generated
75 * @ordered
76 */
77 protected boolean is_worked = IS_WORKED_EDEFAULT;
78
79 /**
80 * The default value of the '{@link #getDistance() <em>Distance</em>}' attribute.
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @see #getDistance()
84 * @generated
85 * @ordered
86 */
87 protected static final double DISTANCE_EDEFAULT = 0.0;
88
89 /**
90 * The cached value of the '{@link #getDistance() <em>Distance</em>}' attribute.
91 * <!-- begin-user-doc -->
92 * <!-- end-user-doc -->
93 * @see #getDistance()
94 * @generated
95 * @ordered
96 */
97 protected double distance = DISTANCE_EDEFAULT;
98
99 /**
100 * The default value of the '{@link #getWorked_days() <em>Worked days</em>}' attribute.
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @see #getWorked_days()
104 * @generated
105 * @ordered
106 */
107 protected static final int WORKED_DAYS_EDEFAULT = 0;
108
109 /**
110 * The cached value of the '{@link #getWorked_days() <em>Worked days</em>}' attribute.
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @see #getWorked_days()
114 * @generated
115 * @ordered
116 */
117 protected int worked_days = WORKED_DAYS_EDEFAULT;
118
119 /**
120 * The default value of the '{@link #isIs_contributing_CNS() <em>Is contributing CNS</em>}' attribute.
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @see #isIs_contributing_CNS()
124 * @generated
125 * @ordered
126 */
127 protected static final boolean IS_CONTRIBUTING_CNS_EDEFAULT = false;
128
129 /**
130 * The cached value of the '{@link #isIs_contributing_CNS() <em>Is contributing CNS</em>}' attribute.
131 * <!-- begin-user-doc -->
132 * <!-- end-user-doc -->
133 * @see #isIs_contributing_CNS()
134 * @generated
135 * @ordered
136 */
137 protected boolean is_contributing_CNS = IS_CONTRIBUTING_CNS_EDEFAULT;
138
139 /**
140 * The default value of the '{@link #getId5() <em>Id5</em>}' attribute.
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @see #getId5()
144 * @generated
145 * @ordered
146 */
147 protected static final String ID5_EDEFAULT = null;
148
149 /**
150 * The cached value of the '{@link #getId5() <em>Id5</em>}' attribute.
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @see #getId5()
154 * @generated
155 * @ordered
156 */
157 protected String id5 = ID5_EDEFAULT;
158
159 /**
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
162 * @generated
163 */
164 protected Income_DetailImpl() {
165 super();
166 }
167
168 /**
169 * <!-- begin-user-doc -->
170 * <!-- end-user-doc -->
171 * @generated
172 */
173 @Override
174 protected EClass eStaticClass() {
175 return TaxationPackage.Literals.INCOME_DETAIL;
176 }
177
178 /**
179 * <!-- begin-user-doc -->
180 * <!-- end-user-doc -->
181 * @generated
182 */
183 @Override
184 public double getAmount() {
185 return amount;
186 }
187
188 /**
189 * <!-- begin-user-doc -->
190 * <!-- end-user-doc -->
191 * @generated
192 */
193 @Override
194 public void setAmount(double newAmount) {
195 double oldAmount = amount;
196 amount = newAmount;
197 if (eNotificationRequired())
198 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__AMOUNT, oldAmount, amount));
199 }
200
201 /**
202 * <!-- begin-user-doc -->
203 * <!-- end-user-doc -->
204 * @generated
205 */
206 @Override
207 public boolean isIs_worked() {
208 return is_worked;
209 }
210
211 /**
212 * <!-- begin-user-doc -->
213 * <!-- end-user-doc -->
214 * @generated
215 */
216 @Override
217 public void setIs_worked(boolean newIs_worked) {
218 boolean oldIs_worked = is_worked;
219 is_worked = newIs_worked;
220 if (eNotificationRequired())
221 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__IS_WORKED, oldIs_worked, is_worked));
222 }
223
224 /**
225 * <!-- begin-user-doc -->
226 * <!-- end-user-doc -->
227 * @generated
228 */
229 @Override
230 public double getDistance() {
231 return distance;
232 }
233
234 /**
235 * <!-- begin-user-doc -->
236 * <!-- end-user-doc -->
237 * @generated
238 */
239 @Override
240 public void setDistance(double newDistance) {
241 double oldDistance = distance;
242 distance = newDistance;
243 if (eNotificationRequired())
244 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__DISTANCE, oldDistance, distance));
245 }
246
247 /**
248 * <!-- begin-user-doc -->
249 * <!-- end-user-doc -->
250 * @generated
251 */
252 @Override
253 public int getWorked_days() {
254 return worked_days;
255 }
256
257 /**
258 * <!-- begin-user-doc -->
259 * <!-- end-user-doc -->
260 * @generated
261 */
262 @Override
263 public void setWorked_days(int newWorked_days) {
264 int oldWorked_days = worked_days;
265 worked_days = newWorked_days;
266 if (eNotificationRequired())
267 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__WORKED_DAYS, oldWorked_days, worked_days));
268 }
269
270 /**
271 * <!-- begin-user-doc -->
272 * <!-- end-user-doc -->
273 * @generated
274 */
275 @Override
276 public boolean isIs_contributing_CNS() {
277 return is_contributing_CNS;
278 }
279
280 /**
281 * <!-- begin-user-doc -->
282 * <!-- end-user-doc -->
283 * @generated
284 */
285 @Override
286 public void setIs_contributing_CNS(boolean newIs_contributing_CNS) {
287 boolean oldIs_contributing_CNS = is_contributing_CNS;
288 is_contributing_CNS = newIs_contributing_CNS;
289 if (eNotificationRequired())
290 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__IS_CONTRIBUTING_CNS, oldIs_contributing_CNS, is_contributing_CNS));
291 }
292
293 /**
294 * <!-- begin-user-doc -->
295 * <!-- end-user-doc -->
296 * @generated
297 */
298 @Override
299 public String getId5() {
300 return id5;
301 }
302
303 /**
304 * <!-- begin-user-doc -->
305 * <!-- end-user-doc -->
306 * @generated
307 */
308 @Override
309 public void setId5(String newId5) {
310 String oldId5 = id5;
311 id5 = newId5;
312 if (eNotificationRequired())
313 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__ID5, oldId5, id5));
314 }
315
316 /**
317 * <!-- begin-user-doc -->
318 * <!-- end-user-doc -->
319 * @generated
320 */
321 @Override
322 public Income getIncome() {
323 if (eContainerFeatureID() != TaxationPackage.INCOME_DETAIL__INCOME) return null;
324 return (Income)eInternalContainer();
325 }
326
327 /**
328 * <!-- begin-user-doc -->
329 * <!-- end-user-doc -->
330 * @generated
331 */
332 public NotificationChain basicSetIncome(Income newIncome, NotificationChain msgs) {
333 msgs = eBasicSetContainer((InternalEObject)newIncome, TaxationPackage.INCOME_DETAIL__INCOME, msgs);
334 return msgs;
335 }
336
337 /**
338 * <!-- begin-user-doc -->
339 * <!-- end-user-doc -->
340 * @generated
341 */
342 @Override
343 public void setIncome(Income newIncome) {
344 if (newIncome != eInternalContainer() || (eContainerFeatureID() != TaxationPackage.INCOME_DETAIL__INCOME && newIncome != null)) {
345 if (EcoreUtil.isAncestor(this, newIncome))
346 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
347 NotificationChain msgs = null;
348 if (eInternalContainer() != null)
349 msgs = eBasicRemoveFromContainer(msgs);
350 if (newIncome != null)
351 msgs = ((InternalEObject)newIncome).eInverseAdd(this, TaxationPackage.INCOME__DETAILS, Income.class, msgs);
352 msgs = basicSetIncome(newIncome, msgs);
353 if (msgs != null) msgs.dispatch();
354 }
355 else if (eNotificationRequired())
356 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_DETAIL__INCOME, newIncome, newIncome));
357 }
358
359 /**
360 * <!-- begin-user-doc -->
361 * <!-- end-user-doc -->
362 * @generated
363 */
364 @Override
365 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
366 switch (featureID) {
367 case TaxationPackage.INCOME_DETAIL__INCOME:
368 if (eInternalContainer() != null)
369 msgs = eBasicRemoveFromContainer(msgs);
370 return basicSetIncome((Income)otherEnd, msgs);
371 }
372 return super.eInverseAdd(otherEnd, featureID, msgs);
373 }
374
375 /**
376 * <!-- begin-user-doc -->
377 * <!-- end-user-doc -->
378 * @generated
379 */
380 @Override
381 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
382 switch (featureID) {
383 case TaxationPackage.INCOME_DETAIL__INCOME:
384 return basicSetIncome(null, msgs);
385 }
386 return super.eInverseRemove(otherEnd, featureID, msgs);
387 }
388
389 /**
390 * <!-- begin-user-doc -->
391 * <!-- end-user-doc -->
392 * @generated
393 */
394 @Override
395 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
396 switch (eContainerFeatureID()) {
397 case TaxationPackage.INCOME_DETAIL__INCOME:
398 return eInternalContainer().eInverseRemove(this, TaxationPackage.INCOME__DETAILS, Income.class, msgs);
399 }
400 return super.eBasicRemoveFromContainerFeature(msgs);
401 }
402
403 /**
404 * <!-- begin-user-doc -->
405 * <!-- end-user-doc -->
406 * @generated
407 */
408 @Override
409 public Object eGet(int featureID, boolean resolve, boolean coreType) {
410 switch (featureID) {
411 case TaxationPackage.INCOME_DETAIL__AMOUNT:
412 return getAmount();
413 case TaxationPackage.INCOME_DETAIL__IS_WORKED:
414 return isIs_worked();
415 case TaxationPackage.INCOME_DETAIL__DISTANCE:
416 return getDistance();
417 case TaxationPackage.INCOME_DETAIL__WORKED_DAYS:
418 return getWorked_days();
419 case TaxationPackage.INCOME_DETAIL__IS_CONTRIBUTING_CNS:
420 return isIs_contributing_CNS();
421 case TaxationPackage.INCOME_DETAIL__ID5:
422 return getId5();
423 case TaxationPackage.INCOME_DETAIL__INCOME:
424 return getIncome();
425 }
426 return super.eGet(featureID, resolve, coreType);
427 }
428
429 /**
430 * <!-- begin-user-doc -->
431 * <!-- end-user-doc -->
432 * @generated
433 */
434 @Override
435 public void eSet(int featureID, Object newValue) {
436 switch (featureID) {
437 case TaxationPackage.INCOME_DETAIL__AMOUNT:
438 setAmount((Double)newValue);
439 return;
440 case TaxationPackage.INCOME_DETAIL__IS_WORKED:
441 setIs_worked((Boolean)newValue);
442 return;
443 case TaxationPackage.INCOME_DETAIL__DISTANCE:
444 setDistance((Double)newValue);
445 return;
446 case TaxationPackage.INCOME_DETAIL__WORKED_DAYS:
447 setWorked_days((Integer)newValue);
448 return;
449 case TaxationPackage.INCOME_DETAIL__IS_CONTRIBUTING_CNS:
450 setIs_contributing_CNS((Boolean)newValue);
451 return;
452 case TaxationPackage.INCOME_DETAIL__ID5:
453 setId5((String)newValue);
454 return;
455 case TaxationPackage.INCOME_DETAIL__INCOME:
456 setIncome((Income)newValue);
457 return;
458 }
459 super.eSet(featureID, newValue);
460 }
461
462 /**
463 * <!-- begin-user-doc -->
464 * <!-- end-user-doc -->
465 * @generated
466 */
467 @Override
468 public void eUnset(int featureID) {
469 switch (featureID) {
470 case TaxationPackage.INCOME_DETAIL__AMOUNT:
471 setAmount(AMOUNT_EDEFAULT);
472 return;
473 case TaxationPackage.INCOME_DETAIL__IS_WORKED:
474 setIs_worked(IS_WORKED_EDEFAULT);
475 return;
476 case TaxationPackage.INCOME_DETAIL__DISTANCE:
477 setDistance(DISTANCE_EDEFAULT);
478 return;
479 case TaxationPackage.INCOME_DETAIL__WORKED_DAYS:
480 setWorked_days(WORKED_DAYS_EDEFAULT);
481 return;
482 case TaxationPackage.INCOME_DETAIL__IS_CONTRIBUTING_CNS:
483 setIs_contributing_CNS(IS_CONTRIBUTING_CNS_EDEFAULT);
484 return;
485 case TaxationPackage.INCOME_DETAIL__ID5:
486 setId5(ID5_EDEFAULT);
487 return;
488 case TaxationPackage.INCOME_DETAIL__INCOME:
489 setIncome((Income)null);
490 return;
491 }
492 super.eUnset(featureID);
493 }
494
495 /**
496 * <!-- begin-user-doc -->
497 * <!-- end-user-doc -->
498 * @generated
499 */
500 @Override
501 public boolean eIsSet(int featureID) {
502 switch (featureID) {
503 case TaxationPackage.INCOME_DETAIL__AMOUNT:
504 return amount != AMOUNT_EDEFAULT;
505 case TaxationPackage.INCOME_DETAIL__IS_WORKED:
506 return is_worked != IS_WORKED_EDEFAULT;
507 case TaxationPackage.INCOME_DETAIL__DISTANCE:
508 return distance != DISTANCE_EDEFAULT;
509 case TaxationPackage.INCOME_DETAIL__WORKED_DAYS:
510 return worked_days != WORKED_DAYS_EDEFAULT;
511 case TaxationPackage.INCOME_DETAIL__IS_CONTRIBUTING_CNS:
512 return is_contributing_CNS != IS_CONTRIBUTING_CNS_EDEFAULT;
513 case TaxationPackage.INCOME_DETAIL__ID5:
514 return ID5_EDEFAULT == null ? id5 != null : !ID5_EDEFAULT.equals(id5);
515 case TaxationPackage.INCOME_DETAIL__INCOME:
516 return getIncome() != null;
517 }
518 return super.eIsSet(featureID);
519 }
520
521 /**
522 * <!-- begin-user-doc -->
523 * <!-- end-user-doc -->
524 * @generated
525 */
526 @Override
527 public String toString() {
528 if (eIsProxy()) return super.toString();
529
530 StringBuilder result = new StringBuilder(super.toString());
531 result.append(" (amount: ");
532 result.append(amount);
533 result.append(", is_worked: ");
534 result.append(is_worked);
535 result.append(", distance: ");
536 result.append(distance);
537 result.append(", worked_days: ");
538 result.append(worked_days);
539 result.append(", is_contributing_CNS: ");
540 result.append(is_contributing_CNS);
541 result.append(", id5: ");
542 result.append(id5);
543 result.append(')');
544 return result.toString();
545 }
546
547} //Income_DetailImpl