diff options
author | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2020-04-26 18:23:13 -0400 |
---|---|---|
committer | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2020-04-26 18:23:13 -0400 |
commit | c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e (patch) | |
tree | 0c2e212e4e95c1d2311629128641d5cd561210f3 /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TaxImpl.java | |
parent | Merge branch 'Attribute-Solver' (diff) | |
download | VIATRA-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_TaxImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TaxImpl.java | 340 |
1 files changed, 340 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TaxImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TaxImpl.java new file mode 100644 index 00000000..3083b3fa --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TaxImpl.java | |||
@@ -0,0 +1,340 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package Taxation.impl; | ||
4 | |||
5 | import Taxation.Income_Tax; | ||
6 | import Taxation.Tax_Payer; | ||
7 | import Taxation.TaxationPackage; | ||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | import org.eclipse.emf.ecore.InternalEObject; | ||
12 | |||
13 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
14 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model object '<em><b>Income Tax</b></em>'. | ||
19 | * <!-- end-user-doc --> | ||
20 | * <p> | ||
21 | * The following features are implemented: | ||
22 | * </p> | ||
23 | * <ul> | ||
24 | * <li>{@link Taxation.impl.Income_TaxImpl#getTaxPayer <em>Tax Payer</em>}</li> | ||
25 | * <li>{@link Taxation.impl.Income_TaxImpl#getTax_amount <em>Tax amount</em>}</li> | ||
26 | * <li>{@link Taxation.impl.Income_TaxImpl#getTax_year <em>Tax year</em>}</li> | ||
27 | * <li>{@link Taxation.impl.Income_TaxImpl#getId6 <em>Id6</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class Income_TaxImpl extends MinimalEObjectImpl.Container implements Income_Tax { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getTaxPayer() <em>Tax Payer</em>}' reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getTaxPayer() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected Tax_Payer taxPayer; | ||
42 | |||
43 | /** | ||
44 | * The default value of the '{@link #getTax_amount() <em>Tax amount</em>}' attribute. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getTax_amount() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected static final double TAX_AMOUNT_EDEFAULT = 0.0; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getTax_amount() <em>Tax amount</em>}' attribute. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getTax_amount() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected double tax_amount = TAX_AMOUNT_EDEFAULT; | ||
62 | |||
63 | /** | ||
64 | * The default value of the '{@link #getTax_year() <em>Tax year</em>}' attribute. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #getTax_year() | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | protected static final int TAX_YEAR_EDEFAULT = 0; | ||
72 | |||
73 | /** | ||
74 | * The cached value of the '{@link #getTax_year() <em>Tax year</em>}' attribute. | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @see #getTax_year() | ||
78 | * @generated | ||
79 | * @ordered | ||
80 | */ | ||
81 | protected int tax_year = TAX_YEAR_EDEFAULT; | ||
82 | |||
83 | /** | ||
84 | * The default value of the '{@link #getId6() <em>Id6</em>}' attribute. | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @see #getId6() | ||
88 | * @generated | ||
89 | * @ordered | ||
90 | */ | ||
91 | protected static final String ID6_EDEFAULT = null; | ||
92 | |||
93 | /** | ||
94 | * The cached value of the '{@link #getId6() <em>Id6</em>}' attribute. | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @see #getId6() | ||
98 | * @generated | ||
99 | * @ordered | ||
100 | */ | ||
101 | protected String id6 = ID6_EDEFAULT; | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | protected Income_TaxImpl() { | ||
109 | super(); | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | @Override | ||
118 | protected EClass eStaticClass() { | ||
119 | return TaxationPackage.Literals.INCOME_TAX; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public Tax_Payer getTaxPayer() { | ||
129 | if (taxPayer != null && taxPayer.eIsProxy()) { | ||
130 | InternalEObject oldTaxPayer = (InternalEObject)taxPayer; | ||
131 | taxPayer = (Tax_Payer)eResolveProxy(oldTaxPayer); | ||
132 | if (taxPayer != oldTaxPayer) { | ||
133 | if (eNotificationRequired()) | ||
134 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationPackage.INCOME_TAX__TAX_PAYER, oldTaxPayer, taxPayer)); | ||
135 | } | ||
136 | } | ||
137 | return taxPayer; | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * <!-- begin-user-doc --> | ||
142 | * <!-- end-user-doc --> | ||
143 | * @generated | ||
144 | */ | ||
145 | public Tax_Payer basicGetTaxPayer() { | ||
146 | return taxPayer; | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | @Override | ||
155 | public void setTaxPayer(Tax_Payer newTaxPayer) { | ||
156 | Tax_Payer oldTaxPayer = taxPayer; | ||
157 | taxPayer = newTaxPayer; | ||
158 | if (eNotificationRequired()) | ||
159 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TAX__TAX_PAYER, oldTaxPayer, taxPayer)); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public double getTax_amount() { | ||
169 | return tax_amount; | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @generated | ||
176 | */ | ||
177 | @Override | ||
178 | public void setTax_amount(double newTax_amount) { | ||
179 | double oldTax_amount = tax_amount; | ||
180 | tax_amount = newTax_amount; | ||
181 | if (eNotificationRequired()) | ||
182 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TAX__TAX_AMOUNT, oldTax_amount, tax_amount)); | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | @Override | ||
191 | public int getTax_year() { | ||
192 | return tax_year; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public void setTax_year(int newTax_year) { | ||
202 | int oldTax_year = tax_year; | ||
203 | tax_year = newTax_year; | ||
204 | if (eNotificationRequired()) | ||
205 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TAX__TAX_YEAR, oldTax_year, tax_year)); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @Override | ||
214 | public String getId6() { | ||
215 | return id6; | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @Override | ||
224 | public void setId6(String newId6) { | ||
225 | String oldId6 = id6; | ||
226 | id6 = newId6; | ||
227 | if (eNotificationRequired()) | ||
228 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TAX__ID6, oldId6, id6)); | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | @Override | ||
237 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
238 | switch (featureID) { | ||
239 | case TaxationPackage.INCOME_TAX__TAX_PAYER: | ||
240 | if (resolve) return getTaxPayer(); | ||
241 | return basicGetTaxPayer(); | ||
242 | case TaxationPackage.INCOME_TAX__TAX_AMOUNT: | ||
243 | return getTax_amount(); | ||
244 | case TaxationPackage.INCOME_TAX__TAX_YEAR: | ||
245 | return getTax_year(); | ||
246 | case TaxationPackage.INCOME_TAX__ID6: | ||
247 | return getId6(); | ||
248 | } | ||
249 | return super.eGet(featureID, resolve, coreType); | ||
250 | } | ||
251 | |||
252 | /** | ||
253 | * <!-- begin-user-doc --> | ||
254 | * <!-- end-user-doc --> | ||
255 | * @generated | ||
256 | */ | ||
257 | @Override | ||
258 | public void eSet(int featureID, Object newValue) { | ||
259 | switch (featureID) { | ||
260 | case TaxationPackage.INCOME_TAX__TAX_PAYER: | ||
261 | setTaxPayer((Tax_Payer)newValue); | ||
262 | return; | ||
263 | case TaxationPackage.INCOME_TAX__TAX_AMOUNT: | ||
264 | setTax_amount((Double)newValue); | ||
265 | return; | ||
266 | case TaxationPackage.INCOME_TAX__TAX_YEAR: | ||
267 | setTax_year((Integer)newValue); | ||
268 | return; | ||
269 | case TaxationPackage.INCOME_TAX__ID6: | ||
270 | setId6((String)newValue); | ||
271 | return; | ||
272 | } | ||
273 | super.eSet(featureID, newValue); | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * <!-- begin-user-doc --> | ||
278 | * <!-- end-user-doc --> | ||
279 | * @generated | ||
280 | */ | ||
281 | @Override | ||
282 | public void eUnset(int featureID) { | ||
283 | switch (featureID) { | ||
284 | case TaxationPackage.INCOME_TAX__TAX_PAYER: | ||
285 | setTaxPayer((Tax_Payer)null); | ||
286 | return; | ||
287 | case TaxationPackage.INCOME_TAX__TAX_AMOUNT: | ||
288 | setTax_amount(TAX_AMOUNT_EDEFAULT); | ||
289 | return; | ||
290 | case TaxationPackage.INCOME_TAX__TAX_YEAR: | ||
291 | setTax_year(TAX_YEAR_EDEFAULT); | ||
292 | return; | ||
293 | case TaxationPackage.INCOME_TAX__ID6: | ||
294 | setId6(ID6_EDEFAULT); | ||
295 | return; | ||
296 | } | ||
297 | super.eUnset(featureID); | ||
298 | } | ||
299 | |||
300 | /** | ||
301 | * <!-- begin-user-doc --> | ||
302 | * <!-- end-user-doc --> | ||
303 | * @generated | ||
304 | */ | ||
305 | @Override | ||
306 | public boolean eIsSet(int featureID) { | ||
307 | switch (featureID) { | ||
308 | case TaxationPackage.INCOME_TAX__TAX_PAYER: | ||
309 | return taxPayer != null; | ||
310 | case TaxationPackage.INCOME_TAX__TAX_AMOUNT: | ||
311 | return tax_amount != TAX_AMOUNT_EDEFAULT; | ||
312 | case TaxationPackage.INCOME_TAX__TAX_YEAR: | ||
313 | return tax_year != TAX_YEAR_EDEFAULT; | ||
314 | case TaxationPackage.INCOME_TAX__ID6: | ||
315 | return ID6_EDEFAULT == null ? id6 != null : !ID6_EDEFAULT.equals(id6); | ||
316 | } | ||
317 | return super.eIsSet(featureID); | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * <!-- begin-user-doc --> | ||
322 | * <!-- end-user-doc --> | ||
323 | * @generated | ||
324 | */ | ||
325 | @Override | ||
326 | public String toString() { | ||
327 | if (eIsProxy()) return super.toString(); | ||
328 | |||
329 | StringBuilder result = new StringBuilder(super.toString()); | ||
330 | result.append(" (tax_amount: "); | ||
331 | result.append(tax_amount); | ||
332 | result.append(", tax_year: "); | ||
333 | result.append(tax_year); | ||
334 | result.append(", id6: "); | ||
335 | result.append(id6); | ||
336 | result.append(')'); | ||
337 | return result.toString(); | ||
338 | } | ||
339 | |||
340 | } //Income_TaxImpl | ||