diff options
author | 2020-04-26 18:23:13 -0400 | |
---|---|---|
committer | 2020-04-26 18:23:13 -0400 | |
commit | c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e (patch) | |
tree | 0c2e212e4e95c1d2311629128641d5cd561210f3 /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/HouseholdImpl.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/HouseholdImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/HouseholdImpl.java | 313 |
1 files changed, 313 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/HouseholdImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/HouseholdImpl.java new file mode 100644 index 00000000..8c3cb920 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/HouseholdImpl.java | |||
@@ -0,0 +1,313 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package Taxation.impl; | ||
4 | |||
5 | import Taxation.Dependent; | ||
6 | import Taxation.Household; | ||
7 | import Taxation.Legal_Union_Record; | ||
8 | import Taxation.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.EObjectContainmentWithInverseEList; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Household</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link Taxation.impl.HouseholdImpl#getParents <em>Parents</em>}</li> | ||
35 | * <li>{@link Taxation.impl.HouseholdImpl#getId1 <em>Id1</em>}</li> | ||
36 | * <li>{@link Taxation.impl.HouseholdImpl#getChildren <em>Children</em>}</li> | ||
37 | * </ul> | ||
38 | * | ||
39 | * @generated | ||
40 | */ | ||
41 | public class HouseholdImpl extends MinimalEObjectImpl.Container implements Household { | ||
42 | /** | ||
43 | * The cached value of the '{@link #getParents() <em>Parents</em>}' containment reference. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #getParents() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected Legal_Union_Record parents; | ||
51 | |||
52 | /** | ||
53 | * The default value of the '{@link #getId1() <em>Id1</em>}' attribute. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @see #getId1() | ||
57 | * @generated | ||
58 | * @ordered | ||
59 | */ | ||
60 | protected static final String ID1_EDEFAULT = null; | ||
61 | |||
62 | /** | ||
63 | * The cached value of the '{@link #getId1() <em>Id1</em>}' attribute. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @see #getId1() | ||
67 | * @generated | ||
68 | * @ordered | ||
69 | */ | ||
70 | protected String id1 = ID1_EDEFAULT; | ||
71 | |||
72 | /** | ||
73 | * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @see #getChildren() | ||
77 | * @generated | ||
78 | * @ordered | ||
79 | */ | ||
80 | protected EList<Dependent> children; | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | protected HouseholdImpl() { | ||
88 | super(); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | protected EClass eStaticClass() { | ||
98 | return TaxationPackage.Literals.HOUSEHOLD; | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | @Override | ||
107 | public Legal_Union_Record getParents() { | ||
108 | return parents; | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | public NotificationChain basicSetParents(Legal_Union_Record newParents, NotificationChain msgs) { | ||
117 | Legal_Union_Record oldParents = parents; | ||
118 | parents = newParents; | ||
119 | if (eNotificationRequired()) { | ||
120 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.HOUSEHOLD__PARENTS, oldParents, newParents); | ||
121 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
122 | } | ||
123 | return msgs; | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | @Override | ||
132 | public void setParents(Legal_Union_Record newParents) { | ||
133 | if (newParents != parents) { | ||
134 | NotificationChain msgs = null; | ||
135 | if (parents != null) | ||
136 | msgs = ((InternalEObject)parents).eInverseRemove(this, TaxationPackage.LEGAL_UNION_RECORD__HOUSEHOLD, Legal_Union_Record.class, msgs); | ||
137 | if (newParents != null) | ||
138 | msgs = ((InternalEObject)newParents).eInverseAdd(this, TaxationPackage.LEGAL_UNION_RECORD__HOUSEHOLD, Legal_Union_Record.class, msgs); | ||
139 | msgs = basicSetParents(newParents, msgs); | ||
140 | if (msgs != null) msgs.dispatch(); | ||
141 | } | ||
142 | else if (eNotificationRequired()) | ||
143 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.HOUSEHOLD__PARENTS, newParents, newParents)); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public String getId1() { | ||
153 | return id1; | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * <!-- begin-user-doc --> | ||
158 | * <!-- end-user-doc --> | ||
159 | * @generated | ||
160 | */ | ||
161 | @Override | ||
162 | public void setId1(String newId1) { | ||
163 | String oldId1 = id1; | ||
164 | id1 = newId1; | ||
165 | if (eNotificationRequired()) | ||
166 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.HOUSEHOLD__ID1, oldId1, id1)); | ||
167 | } | ||
168 | |||
169 | /** | ||
170 | * <!-- begin-user-doc --> | ||
171 | * <!-- end-user-doc --> | ||
172 | * @generated | ||
173 | */ | ||
174 | @Override | ||
175 | public EList<Dependent> getChildren() { | ||
176 | if (children == null) { | ||
177 | children = new EObjectContainmentWithInverseEList<Dependent>(Dependent.class, this, TaxationPackage.HOUSEHOLD__CHILDREN, TaxationPackage.DEPENDENT__HOUSEHOLD); | ||
178 | } | ||
179 | return children; | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @SuppressWarnings("unchecked") | ||
188 | @Override | ||
189 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
190 | switch (featureID) { | ||
191 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
192 | if (parents != null) | ||
193 | msgs = ((InternalEObject)parents).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationPackage.HOUSEHOLD__PARENTS, null, msgs); | ||
194 | return basicSetParents((Legal_Union_Record)otherEnd, msgs); | ||
195 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
196 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd, msgs); | ||
197 | } | ||
198 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | @Override | ||
207 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
208 | switch (featureID) { | ||
209 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
210 | return basicSetParents(null, msgs); | ||
211 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
212 | return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); | ||
213 | } | ||
214 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | @Override | ||
223 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
224 | switch (featureID) { | ||
225 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
226 | return getParents(); | ||
227 | case TaxationPackage.HOUSEHOLD__ID1: | ||
228 | return getId1(); | ||
229 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
230 | return getChildren(); | ||
231 | } | ||
232 | return super.eGet(featureID, resolve, coreType); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @SuppressWarnings("unchecked") | ||
241 | @Override | ||
242 | public void eSet(int featureID, Object newValue) { | ||
243 | switch (featureID) { | ||
244 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
245 | setParents((Legal_Union_Record)newValue); | ||
246 | return; | ||
247 | case TaxationPackage.HOUSEHOLD__ID1: | ||
248 | setId1((String)newValue); | ||
249 | return; | ||
250 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
251 | getChildren().clear(); | ||
252 | getChildren().addAll((Collection<? extends Dependent>)newValue); | ||
253 | return; | ||
254 | } | ||
255 | super.eSet(featureID, newValue); | ||
256 | } | ||
257 | |||
258 | /** | ||
259 | * <!-- begin-user-doc --> | ||
260 | * <!-- end-user-doc --> | ||
261 | * @generated | ||
262 | */ | ||
263 | @Override | ||
264 | public void eUnset(int featureID) { | ||
265 | switch (featureID) { | ||
266 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
267 | setParents((Legal_Union_Record)null); | ||
268 | return; | ||
269 | case TaxationPackage.HOUSEHOLD__ID1: | ||
270 | setId1(ID1_EDEFAULT); | ||
271 | return; | ||
272 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
273 | getChildren().clear(); | ||
274 | return; | ||
275 | } | ||
276 | super.eUnset(featureID); | ||
277 | } | ||
278 | |||
279 | /** | ||
280 | * <!-- begin-user-doc --> | ||
281 | * <!-- end-user-doc --> | ||
282 | * @generated | ||
283 | */ | ||
284 | @Override | ||
285 | public boolean eIsSet(int featureID) { | ||
286 | switch (featureID) { | ||
287 | case TaxationPackage.HOUSEHOLD__PARENTS: | ||
288 | return parents != null; | ||
289 | case TaxationPackage.HOUSEHOLD__ID1: | ||
290 | return ID1_EDEFAULT == null ? id1 != null : !ID1_EDEFAULT.equals(id1); | ||
291 | case TaxationPackage.HOUSEHOLD__CHILDREN: | ||
292 | return children != null && !children.isEmpty(); | ||
293 | } | ||
294 | return super.eIsSet(featureID); | ||
295 | } | ||
296 | |||
297 | /** | ||
298 | * <!-- begin-user-doc --> | ||
299 | * <!-- end-user-doc --> | ||
300 | * @generated | ||
301 | */ | ||
302 | @Override | ||
303 | public String toString() { | ||
304 | if (eIsProxy()) return super.toString(); | ||
305 | |||
306 | StringBuilder result = new StringBuilder(super.toString()); | ||
307 | result.append(" (id1: "); | ||
308 | result.append(id1); | ||
309 | result.append(')'); | ||
310 | return result.toString(); | ||
311 | } | ||
312 | |||
313 | } //HouseholdImpl | ||