aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java324
1 files changed, 324 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java
new file mode 100644
index 00000000..8b5e4683
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PropertyImpl.java
@@ -0,0 +1,324 @@
1/**
2 */
3package TaxationWithRoot.impl;
4
5import TaxationWithRoot.Legal_Union_Record;
6import TaxationWithRoot.Tax_Property;
7import TaxationWithRoot.TaxationWithRootPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>Tax Property</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link TaxationWithRoot.impl.Tax_PropertyImpl#getStarting_year <em>Starting year</em>}</li>
29 * <li>{@link TaxationWithRoot.impl.Tax_PropertyImpl#getId10 <em>Id10</em>}</li>
30 * <li>{@link TaxationWithRoot.impl.Tax_PropertyImpl#getUnion_record <em>Union record</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class Tax_PropertyImpl extends MinimalEObjectImpl.Container implements Tax_Property {
36 /**
37 * The default value of the '{@link #getStarting_year() <em>Starting year</em>}' attribute.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getStarting_year()
41 * @generated
42 * @ordered
43 */
44 protected static final int STARTING_YEAR_EDEFAULT = 0;
45
46 /**
47 * The cached value of the '{@link #getStarting_year() <em>Starting year</em>}' attribute.
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @see #getStarting_year()
51 * @generated
52 * @ordered
53 */
54 protected int starting_year = STARTING_YEAR_EDEFAULT;
55
56 /**
57 * The default value of the '{@link #getId10() <em>Id10</em>}' attribute.
58 * <!-- begin-user-doc -->
59 * <!-- end-user-doc -->
60 * @see #getId10()
61 * @generated
62 * @ordered
63 */
64 protected static final String ID10_EDEFAULT = null;
65
66 /**
67 * The cached value of the '{@link #getId10() <em>Id10</em>}' attribute.
68 * <!-- begin-user-doc -->
69 * <!-- end-user-doc -->
70 * @see #getId10()
71 * @generated
72 * @ordered
73 */
74 protected String id10 = ID10_EDEFAULT;
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 protected Tax_PropertyImpl() {
82 super();
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 @Override
91 protected EClass eStaticClass() {
92 return TaxationWithRootPackage.Literals.TAX_PROPERTY;
93 }
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 @Override
101 public int getStarting_year() {
102 return starting_year;
103 }
104
105 /**
106 * <!-- begin-user-doc -->
107 * <!-- end-user-doc -->
108 * @generated
109 */
110 @Override
111 public void setStarting_year(int newStarting_year) {
112 int oldStarting_year = starting_year;
113 starting_year = newStarting_year;
114 if (eNotificationRequired())
115 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PROPERTY__STARTING_YEAR, oldStarting_year, starting_year));
116 }
117
118 /**
119 * <!-- begin-user-doc -->
120 * <!-- end-user-doc -->
121 * @generated
122 */
123 @Override
124 public String getId10() {
125 return id10;
126 }
127
128 /**
129 * <!-- begin-user-doc -->
130 * <!-- end-user-doc -->
131 * @generated
132 */
133 @Override
134 public void setId10(String newId10) {
135 String oldId10 = id10;
136 id10 = newId10;
137 if (eNotificationRequired())
138 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PROPERTY__ID10, oldId10, id10));
139 }
140
141 /**
142 * <!-- begin-user-doc -->
143 * <!-- end-user-doc -->
144 * @generated
145 */
146 @Override
147 public Legal_Union_Record getUnion_record() {
148 if (eContainerFeatureID() != TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD) return null;
149 return (Legal_Union_Record)eInternalContainer();
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 public NotificationChain basicSetUnion_record(Legal_Union_Record newUnion_record, NotificationChain msgs) {
158 msgs = eBasicSetContainer((InternalEObject)newUnion_record, TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD, msgs);
159 return msgs;
160 }
161
162 /**
163 * <!-- begin-user-doc -->
164 * <!-- end-user-doc -->
165 * @generated
166 */
167 @Override
168 public void setUnion_record(Legal_Union_Record newUnion_record) {
169 if (newUnion_record != eInternalContainer() || (eContainerFeatureID() != TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD && newUnion_record != null)) {
170 if (EcoreUtil.isAncestor(this, newUnion_record))
171 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
172 NotificationChain msgs = null;
173 if (eInternalContainer() != null)
174 msgs = eBasicRemoveFromContainer(msgs);
175 if (newUnion_record != null)
176 msgs = ((InternalEObject)newUnion_record).eInverseAdd(this, TaxationWithRootPackage.LEGAL_UNION_RECORD__PROPERTIES, Legal_Union_Record.class, msgs);
177 msgs = basicSetUnion_record(newUnion_record, msgs);
178 if (msgs != null) msgs.dispatch();
179 }
180 else if (eNotificationRequired())
181 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD, newUnion_record, newUnion_record));
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 @Override
190 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
191 switch (featureID) {
192 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
193 if (eInternalContainer() != null)
194 msgs = eBasicRemoveFromContainer(msgs);
195 return basicSetUnion_record((Legal_Union_Record)otherEnd, msgs);
196 }
197 return super.eInverseAdd(otherEnd, featureID, msgs);
198 }
199
200 /**
201 * <!-- begin-user-doc -->
202 * <!-- end-user-doc -->
203 * @generated
204 */
205 @Override
206 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
207 switch (featureID) {
208 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
209 return basicSetUnion_record(null, msgs);
210 }
211 return super.eInverseRemove(otherEnd, featureID, msgs);
212 }
213
214 /**
215 * <!-- begin-user-doc -->
216 * <!-- end-user-doc -->
217 * @generated
218 */
219 @Override
220 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
221 switch (eContainerFeatureID()) {
222 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
223 return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.LEGAL_UNION_RECORD__PROPERTIES, Legal_Union_Record.class, msgs);
224 }
225 return super.eBasicRemoveFromContainerFeature(msgs);
226 }
227
228 /**
229 * <!-- begin-user-doc -->
230 * <!-- end-user-doc -->
231 * @generated
232 */
233 @Override
234 public Object eGet(int featureID, boolean resolve, boolean coreType) {
235 switch (featureID) {
236 case TaxationWithRootPackage.TAX_PROPERTY__STARTING_YEAR:
237 return getStarting_year();
238 case TaxationWithRootPackage.TAX_PROPERTY__ID10:
239 return getId10();
240 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
241 return getUnion_record();
242 }
243 return super.eGet(featureID, resolve, coreType);
244 }
245
246 /**
247 * <!-- begin-user-doc -->
248 * <!-- end-user-doc -->
249 * @generated
250 */
251 @Override
252 public void eSet(int featureID, Object newValue) {
253 switch (featureID) {
254 case TaxationWithRootPackage.TAX_PROPERTY__STARTING_YEAR:
255 setStarting_year((Integer)newValue);
256 return;
257 case TaxationWithRootPackage.TAX_PROPERTY__ID10:
258 setId10((String)newValue);
259 return;
260 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
261 setUnion_record((Legal_Union_Record)newValue);
262 return;
263 }
264 super.eSet(featureID, newValue);
265 }
266
267 /**
268 * <!-- begin-user-doc -->
269 * <!-- end-user-doc -->
270 * @generated
271 */
272 @Override
273 public void eUnset(int featureID) {
274 switch (featureID) {
275 case TaxationWithRootPackage.TAX_PROPERTY__STARTING_YEAR:
276 setStarting_year(STARTING_YEAR_EDEFAULT);
277 return;
278 case TaxationWithRootPackage.TAX_PROPERTY__ID10:
279 setId10(ID10_EDEFAULT);
280 return;
281 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
282 setUnion_record((Legal_Union_Record)null);
283 return;
284 }
285 super.eUnset(featureID);
286 }
287
288 /**
289 * <!-- begin-user-doc -->
290 * <!-- end-user-doc -->
291 * @generated
292 */
293 @Override
294 public boolean eIsSet(int featureID) {
295 switch (featureID) {
296 case TaxationWithRootPackage.TAX_PROPERTY__STARTING_YEAR:
297 return starting_year != STARTING_YEAR_EDEFAULT;
298 case TaxationWithRootPackage.TAX_PROPERTY__ID10:
299 return ID10_EDEFAULT == null ? id10 != null : !ID10_EDEFAULT.equals(id10);
300 case TaxationWithRootPackage.TAX_PROPERTY__UNION_RECORD:
301 return getUnion_record() != null;
302 }
303 return super.eIsSet(featureID);
304 }
305
306 /**
307 * <!-- begin-user-doc -->
308 * <!-- end-user-doc -->
309 * @generated
310 */
311 @Override
312 public String toString() {
313 if (eIsProxy()) return super.toString();
314
315 StringBuilder result = new StringBuilder(super.toString());
316 result.append(" (starting_year: ");
317 result.append(starting_year);
318 result.append(", id10: ");
319 result.append(id10);
320 result.append(')');
321 return result.toString();
322 }
323
324} //Tax_PropertyImpl