diff options
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java')
-rw-r--r-- | language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java | 378 |
1 files changed, 0 insertions, 378 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java deleted file mode 100644 index 8df2715f..00000000 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ReferenceDeclarationImpl.java +++ /dev/null | |||
@@ -1,378 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | import org.eclipse.viatra.solver.language.model.problem.Multiplicity; | ||
13 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.Relation; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Reference Declaration</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getReferenceType <em>Reference Type</em>}</li> | ||
26 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getOpposite <em>Opposite</em>}</li> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#isContainment <em>Containment</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ReferenceDeclarationImpl#getMultiplicity <em>Multiplicity</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class ReferenceDeclarationImpl extends RelationImpl implements ReferenceDeclaration { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getReferenceType() <em>Reference Type</em>}' reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getReferenceType() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Relation referenceType; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getOpposite() <em>Opposite</em>}' reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getOpposite() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected ReferenceDeclaration opposite; | ||
53 | |||
54 | /** | ||
55 | * The default value of the '{@link #isContainment() <em>Containment</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #isContainment() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected static final boolean CONTAINMENT_EDEFAULT = false; | ||
63 | |||
64 | /** | ||
65 | * The cached value of the '{@link #isContainment() <em>Containment</em>}' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #isContainment() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected boolean containment = CONTAINMENT_EDEFAULT; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' containment reference. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getMultiplicity() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected Multiplicity multiplicity; | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | protected ReferenceDeclarationImpl() { | ||
90 | super(); | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | @Override | ||
99 | protected EClass eStaticClass() { | ||
100 | return ProblemPackage.Literals.REFERENCE_DECLARATION; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public Relation getReferenceType() { | ||
109 | if (referenceType != null && referenceType.eIsProxy()) { | ||
110 | InternalEObject oldReferenceType = (InternalEObject) referenceType; | ||
111 | referenceType = (Relation) eResolveProxy(oldReferenceType); | ||
112 | if (referenceType != oldReferenceType) { | ||
113 | if (eNotificationRequired()) | ||
114 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
115 | ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, oldReferenceType, referenceType)); | ||
116 | } | ||
117 | } | ||
118 | return referenceType; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | public Relation basicGetReferenceType() { | ||
127 | return referenceType; | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | public void setReferenceType(Relation newReferenceType) { | ||
136 | Relation oldReferenceType = referenceType; | ||
137 | referenceType = newReferenceType; | ||
138 | if (eNotificationRequired()) | ||
139 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE, | ||
140 | oldReferenceType, referenceType)); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | public ReferenceDeclaration getOpposite() { | ||
149 | if (opposite != null && opposite.eIsProxy()) { | ||
150 | InternalEObject oldOpposite = (InternalEObject) opposite; | ||
151 | opposite = (ReferenceDeclaration) eResolveProxy(oldOpposite); | ||
152 | if (opposite != oldOpposite) { | ||
153 | if (eNotificationRequired()) | ||
154 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
155 | ProblemPackage.REFERENCE_DECLARATION__OPPOSITE, oldOpposite, opposite)); | ||
156 | } | ||
157 | } | ||
158 | return opposite; | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * <!-- begin-user-doc --> | ||
163 | * <!-- end-user-doc --> | ||
164 | * @generated | ||
165 | */ | ||
166 | public ReferenceDeclaration basicGetOpposite() { | ||
167 | return opposite; | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | public void setOpposite(ReferenceDeclaration newOpposite) { | ||
176 | ReferenceDeclaration oldOpposite = opposite; | ||
177 | opposite = newOpposite; | ||
178 | if (eNotificationRequired()) | ||
179 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__OPPOSITE, | ||
180 | oldOpposite, opposite)); | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * <!-- begin-user-doc --> | ||
185 | * <!-- end-user-doc --> | ||
186 | * @generated | ||
187 | */ | ||
188 | public boolean isContainment() { | ||
189 | return containment; | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | public void setContainment(boolean newContainment) { | ||
198 | boolean oldContainment = containment; | ||
199 | containment = newContainment; | ||
200 | if (eNotificationRequired()) | ||
201 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT, | ||
202 | oldContainment, containment)); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | public Multiplicity getMultiplicity() { | ||
211 | return multiplicity; | ||
212 | } | ||
213 | |||
214 | /** | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @generated | ||
218 | */ | ||
219 | public NotificationChain basicSetMultiplicity(Multiplicity newMultiplicity, NotificationChain msgs) { | ||
220 | Multiplicity oldMultiplicity = multiplicity; | ||
221 | multiplicity = newMultiplicity; | ||
222 | if (eNotificationRequired()) { | ||
223 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
224 | ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, oldMultiplicity, newMultiplicity); | ||
225 | if (msgs == null) | ||
226 | msgs = notification; | ||
227 | else | ||
228 | msgs.add(notification); | ||
229 | } | ||
230 | return msgs; | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * <!-- begin-user-doc --> | ||
235 | * <!-- end-user-doc --> | ||
236 | * @generated | ||
237 | */ | ||
238 | public void setMultiplicity(Multiplicity newMultiplicity) { | ||
239 | if (newMultiplicity != multiplicity) { | ||
240 | NotificationChain msgs = null; | ||
241 | if (multiplicity != null) | ||
242 | msgs = ((InternalEObject) multiplicity).eInverseRemove(this, | ||
243 | EOPPOSITE_FEATURE_BASE - ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, null, msgs); | ||
244 | if (newMultiplicity != null) | ||
245 | msgs = ((InternalEObject) newMultiplicity).eInverseAdd(this, | ||
246 | EOPPOSITE_FEATURE_BASE - ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, null, msgs); | ||
247 | msgs = basicSetMultiplicity(newMultiplicity, msgs); | ||
248 | if (msgs != null) | ||
249 | msgs.dispatch(); | ||
250 | } else if (eNotificationRequired()) | ||
251 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY, | ||
252 | newMultiplicity, newMultiplicity)); | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
262 | switch (featureID) { | ||
263 | case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: | ||
264 | return basicSetMultiplicity(null, msgs); | ||
265 | } | ||
266 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
267 | } | ||
268 | |||
269 | /** | ||
270 | * <!-- begin-user-doc --> | ||
271 | * <!-- end-user-doc --> | ||
272 | * @generated | ||
273 | */ | ||
274 | @Override | ||
275 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
276 | switch (featureID) { | ||
277 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | ||
278 | if (resolve) | ||
279 | return getReferenceType(); | ||
280 | return basicGetReferenceType(); | ||
281 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | ||
282 | if (resolve) | ||
283 | return getOpposite(); | ||
284 | return basicGetOpposite(); | ||
285 | case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: | ||
286 | return isContainment(); | ||
287 | case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: | ||
288 | return getMultiplicity(); | ||
289 | } | ||
290 | return super.eGet(featureID, resolve, coreType); | ||
291 | } | ||
292 | |||
293 | /** | ||
294 | * <!-- begin-user-doc --> | ||
295 | * <!-- end-user-doc --> | ||
296 | * @generated | ||
297 | */ | ||
298 | @Override | ||
299 | public void eSet(int featureID, Object newValue) { | ||
300 | switch (featureID) { | ||
301 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | ||
302 | setReferenceType((Relation) newValue); | ||
303 | return; | ||
304 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | ||
305 | setOpposite((ReferenceDeclaration) newValue); | ||
306 | return; | ||
307 | case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: | ||
308 | setContainment((Boolean) newValue); | ||
309 | return; | ||
310 | case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: | ||
311 | setMultiplicity((Multiplicity) newValue); | ||
312 | return; | ||
313 | } | ||
314 | super.eSet(featureID, newValue); | ||
315 | } | ||
316 | |||
317 | /** | ||
318 | * <!-- begin-user-doc --> | ||
319 | * <!-- end-user-doc --> | ||
320 | * @generated | ||
321 | */ | ||
322 | @Override | ||
323 | public void eUnset(int featureID) { | ||
324 | switch (featureID) { | ||
325 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | ||
326 | setReferenceType((Relation) null); | ||
327 | return; | ||
328 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | ||
329 | setOpposite((ReferenceDeclaration) null); | ||
330 | return; | ||
331 | case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: | ||
332 | setContainment(CONTAINMENT_EDEFAULT); | ||
333 | return; | ||
334 | case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: | ||
335 | setMultiplicity((Multiplicity) null); | ||
336 | return; | ||
337 | } | ||
338 | super.eUnset(featureID); | ||
339 | } | ||
340 | |||
341 | /** | ||
342 | * <!-- begin-user-doc --> | ||
343 | * <!-- end-user-doc --> | ||
344 | * @generated | ||
345 | */ | ||
346 | @Override | ||
347 | public boolean eIsSet(int featureID) { | ||
348 | switch (featureID) { | ||
349 | case ProblemPackage.REFERENCE_DECLARATION__REFERENCE_TYPE: | ||
350 | return referenceType != null; | ||
351 | case ProblemPackage.REFERENCE_DECLARATION__OPPOSITE: | ||
352 | return opposite != null; | ||
353 | case ProblemPackage.REFERENCE_DECLARATION__CONTAINMENT: | ||
354 | return containment != CONTAINMENT_EDEFAULT; | ||
355 | case ProblemPackage.REFERENCE_DECLARATION__MULTIPLICITY: | ||
356 | return multiplicity != null; | ||
357 | } | ||
358 | return super.eIsSet(featureID); | ||
359 | } | ||
360 | |||
361 | /** | ||
362 | * <!-- begin-user-doc --> | ||
363 | * <!-- end-user-doc --> | ||
364 | * @generated | ||
365 | */ | ||
366 | @Override | ||
367 | public String toString() { | ||
368 | if (eIsProxy()) | ||
369 | return super.toString(); | ||
370 | |||
371 | StringBuilder result = new StringBuilder(super.toString()); | ||
372 | result.append(" (containment: "); | ||
373 | result.append(containment); | ||
374 | result.append(')'); | ||
375 | return result.toString(); | ||
376 | } | ||
377 | |||
378 | } //ReferenceDeclarationImpl | ||