diff options
author | 20001LastOrder <boqi.chen@mail.mcgill.ca> | 2020-11-04 01:33:58 -0500 |
---|---|---|
committer | 20001LastOrder <boqi.chen@mail.mcgill.ca> | 2020-11-04 01:33:58 -0500 |
commit | a20af4d0dbf5eab84ee271d426528aabb5a8ac3b (patch) | |
tree | a9ab772ee313125aaf3a941d66e131b408d949ba /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java | |
parent | changes in settings of measurements (diff) | |
parent | merge with current master, comment numerical solver related logging (diff) | |
download | VIATRA-Generator-a20af4d0dbf5eab84ee271d426528aabb5a8ac3b.tar.gz VIATRA-Generator-a20af4d0dbf5eab84ee271d426528aabb5a8ac3b.tar.zst VIATRA-Generator-a20af4d0dbf5eab84ee271d426528aabb5a8ac3b.zip |
fix merging issue
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java | 465 |
1 files changed, 465 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java new file mode 100644 index 00000000..fcd0a7fc --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/AddressImpl.java | |||
@@ -0,0 +1,465 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package TaxationWithRoot.impl; | ||
4 | |||
5 | import TaxationWithRoot.Address; | ||
6 | import TaxationWithRoot.Country; | ||
7 | import TaxationWithRoot.Physical_Person; | ||
8 | import TaxationWithRoot.TaxationPackage; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | |||
15 | import org.eclipse.emf.common.util.EList; | ||
16 | |||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.emf.ecore.InternalEObject; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
21 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Address</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getCountry <em>Country</em>}</li> | ||
35 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getStreet <em>Street</em>}</li> | ||
36 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getZipCode <em>Zip Code</em>}</li> | ||
37 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getCity <em>City</em>}</li> | ||
38 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getId2 <em>Id2</em>}</li> | ||
39 | * <li>{@link TaxationWithRoot.impl.AddressImpl#getTaxPayer <em>Tax Payer</em>}</li> | ||
40 | * </ul> | ||
41 | * | ||
42 | * @generated | ||
43 | */ | ||
44 | public class AddressImpl extends MinimalEObjectImpl.Container implements Address { | ||
45 | /** | ||
46 | * The default value of the '{@link #getCountry() <em>Country</em>}' attribute. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getCountry() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected static final Country COUNTRY_EDEFAULT = Country.ZZ; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getCountry() <em>Country</em>}' attribute. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getCountry() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected Country country = COUNTRY_EDEFAULT; | ||
64 | |||
65 | /** | ||
66 | * The default value of the '{@link #getStreet() <em>Street</em>}' attribute. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #getStreet() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected static final String STREET_EDEFAULT = null; | ||
74 | |||
75 | /** | ||
76 | * The cached value of the '{@link #getStreet() <em>Street</em>}' attribute. | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @see #getStreet() | ||
80 | * @generated | ||
81 | * @ordered | ||
82 | */ | ||
83 | protected String street = STREET_EDEFAULT; | ||
84 | |||
85 | /** | ||
86 | * The default value of the '{@link #getZipCode() <em>Zip Code</em>}' attribute. | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @see #getZipCode() | ||
90 | * @generated | ||
91 | * @ordered | ||
92 | */ | ||
93 | protected static final String ZIP_CODE_EDEFAULT = null; | ||
94 | |||
95 | /** | ||
96 | * The cached value of the '{@link #getZipCode() <em>Zip Code</em>}' attribute. | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @see #getZipCode() | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | protected String zipCode = ZIP_CODE_EDEFAULT; | ||
104 | |||
105 | /** | ||
106 | * The default value of the '{@link #getCity() <em>City</em>}' attribute. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @see #getCity() | ||
110 | * @generated | ||
111 | * @ordered | ||
112 | */ | ||
113 | protected static final String CITY_EDEFAULT = null; | ||
114 | |||
115 | /** | ||
116 | * The cached value of the '{@link #getCity() <em>City</em>}' attribute. | ||
117 | * <!-- begin-user-doc --> | ||
118 | * <!-- end-user-doc --> | ||
119 | * @see #getCity() | ||
120 | * @generated | ||
121 | * @ordered | ||
122 | */ | ||
123 | protected String city = CITY_EDEFAULT; | ||
124 | |||
125 | /** | ||
126 | * The default value of the '{@link #getId2() <em>Id2</em>}' attribute. | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @see #getId2() | ||
130 | * @generated | ||
131 | * @ordered | ||
132 | */ | ||
133 | protected static final String ID2_EDEFAULT = null; | ||
134 | |||
135 | /** | ||
136 | * The cached value of the '{@link #getId2() <em>Id2</em>}' attribute. | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @see #getId2() | ||
140 | * @generated | ||
141 | * @ordered | ||
142 | */ | ||
143 | protected String id2 = ID2_EDEFAULT; | ||
144 | |||
145 | /** | ||
146 | * The cached value of the '{@link #getTaxPayer() <em>Tax Payer</em>}' reference list. | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @see #getTaxPayer() | ||
150 | * @generated | ||
151 | * @ordered | ||
152 | */ | ||
153 | protected EList<Physical_Person> taxPayer; | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | protected AddressImpl() { | ||
161 | super(); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | protected EClass eStaticClass() { | ||
171 | return TaxationPackage.Literals.ADDRESS; | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <!-- end-user-doc --> | ||
177 | * @generated | ||
178 | */ | ||
179 | @Override | ||
180 | public Country getCountry() { | ||
181 | return country; | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | @Override | ||
190 | public void setCountry(Country newCountry) { | ||
191 | Country oldCountry = country; | ||
192 | country = newCountry == null ? COUNTRY_EDEFAULT : newCountry; | ||
193 | if (eNotificationRequired()) | ||
194 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.ADDRESS__COUNTRY, oldCountry, country)); | ||
195 | } | ||
196 | |||
197 | /** | ||
198 | * <!-- begin-user-doc --> | ||
199 | * <!-- end-user-doc --> | ||
200 | * @generated | ||
201 | */ | ||
202 | @Override | ||
203 | public String getStreet() { | ||
204 | return street; | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public void setStreet(String newStreet) { | ||
214 | String oldStreet = street; | ||
215 | street = newStreet; | ||
216 | if (eNotificationRequired()) | ||
217 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.ADDRESS__STREET, oldStreet, street)); | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * <!-- begin-user-doc --> | ||
222 | * <!-- end-user-doc --> | ||
223 | * @generated | ||
224 | */ | ||
225 | @Override | ||
226 | public String getZipCode() { | ||
227 | return zipCode; | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public void setZipCode(String newZipCode) { | ||
237 | String oldZipCode = zipCode; | ||
238 | zipCode = newZipCode; | ||
239 | if (eNotificationRequired()) | ||
240 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.ADDRESS__ZIP_CODE, oldZipCode, zipCode)); | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | @Override | ||
249 | public String getCity() { | ||
250 | return city; | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * <!-- begin-user-doc --> | ||
255 | * <!-- end-user-doc --> | ||
256 | * @generated | ||
257 | */ | ||
258 | @Override | ||
259 | public void setCity(String newCity) { | ||
260 | String oldCity = city; | ||
261 | city = newCity; | ||
262 | if (eNotificationRequired()) | ||
263 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.ADDRESS__CITY, oldCity, city)); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * <!-- begin-user-doc --> | ||
268 | * <!-- end-user-doc --> | ||
269 | * @generated | ||
270 | */ | ||
271 | @Override | ||
272 | public String getId2() { | ||
273 | return id2; | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * <!-- begin-user-doc --> | ||
278 | * <!-- end-user-doc --> | ||
279 | * @generated | ||
280 | */ | ||
281 | @Override | ||
282 | public void setId2(String newId2) { | ||
283 | String oldId2 = id2; | ||
284 | id2 = newId2; | ||
285 | if (eNotificationRequired()) | ||
286 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.ADDRESS__ID2, oldId2, id2)); | ||
287 | } | ||
288 | |||
289 | /** | ||
290 | * <!-- begin-user-doc --> | ||
291 | * <!-- end-user-doc --> | ||
292 | * @generated | ||
293 | */ | ||
294 | @Override | ||
295 | public EList<Physical_Person> getTaxPayer() { | ||
296 | if (taxPayer == null) { | ||
297 | taxPayer = new EObjectWithInverseResolvingEList.ManyInverse<Physical_Person>(Physical_Person.class, this, TaxationPackage.ADDRESS__TAX_PAYER, TaxationPackage.PHYSICAL_PERSON__ADDRESSES); | ||
298 | } | ||
299 | return taxPayer; | ||
300 | } | ||
301 | |||
302 | /** | ||
303 | * <!-- begin-user-doc --> | ||
304 | * <!-- end-user-doc --> | ||
305 | * @generated | ||
306 | */ | ||
307 | @SuppressWarnings("unchecked") | ||
308 | @Override | ||
309 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
310 | switch (featureID) { | ||
311 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
312 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getTaxPayer()).basicAdd(otherEnd, msgs); | ||
313 | } | ||
314 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
315 | } | ||
316 | |||
317 | /** | ||
318 | * <!-- begin-user-doc --> | ||
319 | * <!-- end-user-doc --> | ||
320 | * @generated | ||
321 | */ | ||
322 | @Override | ||
323 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
324 | switch (featureID) { | ||
325 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
326 | return ((InternalEList<?>)getTaxPayer()).basicRemove(otherEnd, msgs); | ||
327 | } | ||
328 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
329 | } | ||
330 | |||
331 | /** | ||
332 | * <!-- begin-user-doc --> | ||
333 | * <!-- end-user-doc --> | ||
334 | * @generated | ||
335 | */ | ||
336 | @Override | ||
337 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
338 | switch (featureID) { | ||
339 | case TaxationPackage.ADDRESS__COUNTRY: | ||
340 | return getCountry(); | ||
341 | case TaxationPackage.ADDRESS__STREET: | ||
342 | return getStreet(); | ||
343 | case TaxationPackage.ADDRESS__ZIP_CODE: | ||
344 | return getZipCode(); | ||
345 | case TaxationPackage.ADDRESS__CITY: | ||
346 | return getCity(); | ||
347 | case TaxationPackage.ADDRESS__ID2: | ||
348 | return getId2(); | ||
349 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
350 | return getTaxPayer(); | ||
351 | } | ||
352 | return super.eGet(featureID, resolve, coreType); | ||
353 | } | ||
354 | |||
355 | /** | ||
356 | * <!-- begin-user-doc --> | ||
357 | * <!-- end-user-doc --> | ||
358 | * @generated | ||
359 | */ | ||
360 | @SuppressWarnings("unchecked") | ||
361 | @Override | ||
362 | public void eSet(int featureID, Object newValue) { | ||
363 | switch (featureID) { | ||
364 | case TaxationPackage.ADDRESS__COUNTRY: | ||
365 | setCountry((Country)newValue); | ||
366 | return; | ||
367 | case TaxationPackage.ADDRESS__STREET: | ||
368 | setStreet((String)newValue); | ||
369 | return; | ||
370 | case TaxationPackage.ADDRESS__ZIP_CODE: | ||
371 | setZipCode((String)newValue); | ||
372 | return; | ||
373 | case TaxationPackage.ADDRESS__CITY: | ||
374 | setCity((String)newValue); | ||
375 | return; | ||
376 | case TaxationPackage.ADDRESS__ID2: | ||
377 | setId2((String)newValue); | ||
378 | return; | ||
379 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
380 | getTaxPayer().clear(); | ||
381 | getTaxPayer().addAll((Collection<? extends Physical_Person>)newValue); | ||
382 | return; | ||
383 | } | ||
384 | super.eSet(featureID, newValue); | ||
385 | } | ||
386 | |||
387 | /** | ||
388 | * <!-- begin-user-doc --> | ||
389 | * <!-- end-user-doc --> | ||
390 | * @generated | ||
391 | */ | ||
392 | @Override | ||
393 | public void eUnset(int featureID) { | ||
394 | switch (featureID) { | ||
395 | case TaxationPackage.ADDRESS__COUNTRY: | ||
396 | setCountry(COUNTRY_EDEFAULT); | ||
397 | return; | ||
398 | case TaxationPackage.ADDRESS__STREET: | ||
399 | setStreet(STREET_EDEFAULT); | ||
400 | return; | ||
401 | case TaxationPackage.ADDRESS__ZIP_CODE: | ||
402 | setZipCode(ZIP_CODE_EDEFAULT); | ||
403 | return; | ||
404 | case TaxationPackage.ADDRESS__CITY: | ||
405 | setCity(CITY_EDEFAULT); | ||
406 | return; | ||
407 | case TaxationPackage.ADDRESS__ID2: | ||
408 | setId2(ID2_EDEFAULT); | ||
409 | return; | ||
410 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
411 | getTaxPayer().clear(); | ||
412 | return; | ||
413 | } | ||
414 | super.eUnset(featureID); | ||
415 | } | ||
416 | |||
417 | /** | ||
418 | * <!-- begin-user-doc --> | ||
419 | * <!-- end-user-doc --> | ||
420 | * @generated | ||
421 | */ | ||
422 | @Override | ||
423 | public boolean eIsSet(int featureID) { | ||
424 | switch (featureID) { | ||
425 | case TaxationPackage.ADDRESS__COUNTRY: | ||
426 | return country != COUNTRY_EDEFAULT; | ||
427 | case TaxationPackage.ADDRESS__STREET: | ||
428 | return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street); | ||
429 | case TaxationPackage.ADDRESS__ZIP_CODE: | ||
430 | return ZIP_CODE_EDEFAULT == null ? zipCode != null : !ZIP_CODE_EDEFAULT.equals(zipCode); | ||
431 | case TaxationPackage.ADDRESS__CITY: | ||
432 | return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city); | ||
433 | case TaxationPackage.ADDRESS__ID2: | ||
434 | return ID2_EDEFAULT == null ? id2 != null : !ID2_EDEFAULT.equals(id2); | ||
435 | case TaxationPackage.ADDRESS__TAX_PAYER: | ||
436 | return taxPayer != null && !taxPayer.isEmpty(); | ||
437 | } | ||
438 | return super.eIsSet(featureID); | ||
439 | } | ||
440 | |||
441 | /** | ||
442 | * <!-- begin-user-doc --> | ||
443 | * <!-- end-user-doc --> | ||
444 | * @generated | ||
445 | */ | ||
446 | @Override | ||
447 | public String toString() { | ||
448 | if (eIsProxy()) return super.toString(); | ||
449 | |||
450 | StringBuilder result = new StringBuilder(super.toString()); | ||
451 | result.append(" (country: "); | ||
452 | result.append(country); | ||
453 | result.append(", street: "); | ||
454 | result.append(street); | ||
455 | result.append(", zipCode: "); | ||
456 | result.append(zipCode); | ||
457 | result.append(", city: "); | ||
458 | result.append(city); | ||
459 | result.append(", id2: "); | ||
460 | result.append(id2); | ||
461 | result.append(')'); | ||
462 | return result.toString(); | ||
463 | } | ||
464 | |||
465 | } //AddressImpl | ||