diff options
author | 2020-06-25 19:55:10 +0200 | |
---|---|---|
committer | 2020-06-25 19:55:10 +0200 | |
commit | c3a6d4b9cf3657070d180aa65ddbf0459e880329 (patch) | |
tree | 780c4fc61578dcb309af53fb0c164c7627e51676 /Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java | |
parent | New configuration language parser WIP (diff) | |
parent | Scope unsat benchmarks (diff) | |
download | VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.tar.gz VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.tar.zst VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.zip |
Merge branch 'kris'
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java | 405 |
1 files changed, 405 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java new file mode 100644 index 00000000..cea2d6f4 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java | |||
@@ -0,0 +1,405 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.domains.cps.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; | ||
9 | import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.Notification; | ||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.ecore.EClass; | ||
15 | import org.eclipse.emf.ecore.InternalEObject; | ||
16 | |||
17 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
18 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
19 | |||
20 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
21 | |||
22 | /** | ||
23 | * <!-- begin-user-doc --> | ||
24 | * An implementation of the model object '<em><b>Application Instance</b></em>'. | ||
25 | * <!-- end-user-doc --> | ||
26 | * <p> | ||
27 | * The following features are implemented: | ||
28 | * </p> | ||
29 | * <ul> | ||
30 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getRequirement <em>Requirement</em>}</li> | ||
31 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getType <em>Type</em>}</li> | ||
32 | * <li>{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getAllocatedTo <em>Allocated To</em>}</li> | ||
33 | * </ul> | ||
34 | * | ||
35 | * @generated | ||
36 | */ | ||
37 | public class ApplicationInstanceImpl extends MinimalEObjectImpl.Container implements ApplicationInstance { | ||
38 | /** | ||
39 | * The cached value of the '{@link #getRequirement() <em>Requirement</em>}' reference. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getRequirement() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected Requirement requirement; | ||
47 | |||
48 | /** | ||
49 | * The cached value of the '{@link #getAllocatedTo() <em>Allocated To</em>}' reference. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getAllocatedTo() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected HostInstance allocatedTo; | ||
57 | |||
58 | /** | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @generated | ||
62 | */ | ||
63 | protected ApplicationInstanceImpl() { | ||
64 | super(); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | protected EClass eStaticClass() { | ||
74 | return CpsPackage.Literals.APPLICATION_INSTANCE; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public Requirement getRequirement() { | ||
84 | if (requirement != null && requirement.eIsProxy()) { | ||
85 | InternalEObject oldRequirement = (InternalEObject) requirement; | ||
86 | requirement = (Requirement) eResolveProxy(oldRequirement); | ||
87 | if (requirement != oldRequirement) { | ||
88 | if (eNotificationRequired()) | ||
89 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
90 | CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, oldRequirement, requirement)); | ||
91 | } | ||
92 | } | ||
93 | return requirement; | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @generated | ||
100 | */ | ||
101 | public Requirement basicGetRequirement() { | ||
102 | return requirement; | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | public NotificationChain basicSetRequirement(Requirement newRequirement, NotificationChain msgs) { | ||
111 | Requirement oldRequirement = requirement; | ||
112 | requirement = newRequirement; | ||
113 | if (eNotificationRequired()) { | ||
114 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
115 | CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, oldRequirement, newRequirement); | ||
116 | if (msgs == null) | ||
117 | msgs = notification; | ||
118 | else | ||
119 | msgs.add(notification); | ||
120 | } | ||
121 | return msgs; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | @Override | ||
130 | public void setRequirement(Requirement newRequirement) { | ||
131 | if (newRequirement != requirement) { | ||
132 | NotificationChain msgs = null; | ||
133 | if (requirement != null) | ||
134 | msgs = ((InternalEObject) requirement).eInverseRemove(this, CpsPackage.REQUIREMENT__INSTANCES, | ||
135 | Requirement.class, msgs); | ||
136 | if (newRequirement != null) | ||
137 | msgs = ((InternalEObject) newRequirement).eInverseAdd(this, CpsPackage.REQUIREMENT__INSTANCES, | ||
138 | Requirement.class, msgs); | ||
139 | msgs = basicSetRequirement(newRequirement, msgs); | ||
140 | if (msgs != null) | ||
141 | msgs.dispatch(); | ||
142 | } else if (eNotificationRequired()) | ||
143 | eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, | ||
144 | newRequirement, newRequirement)); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public ApplicationType getType() { | ||
154 | if (eContainerFeatureID() != CpsPackage.APPLICATION_INSTANCE__TYPE) | ||
155 | return null; | ||
156 | return (ApplicationType) eInternalContainer(); | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @generated | ||
163 | */ | ||
164 | public NotificationChain basicSetType(ApplicationType newType, NotificationChain msgs) { | ||
165 | msgs = eBasicSetContainer((InternalEObject) newType, CpsPackage.APPLICATION_INSTANCE__TYPE, msgs); | ||
166 | return msgs; | ||
167 | } | ||
168 | |||
169 | /** | ||
170 | * <!-- begin-user-doc --> | ||
171 | * <!-- end-user-doc --> | ||
172 | * @generated | ||
173 | */ | ||
174 | @Override | ||
175 | public void setType(ApplicationType newType) { | ||
176 | if (newType != eInternalContainer() | ||
177 | || (eContainerFeatureID() != CpsPackage.APPLICATION_INSTANCE__TYPE && newType != null)) { | ||
178 | if (EcoreUtil.isAncestor(this, newType)) | ||
179 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
180 | NotificationChain msgs = null; | ||
181 | if (eInternalContainer() != null) | ||
182 | msgs = eBasicRemoveFromContainer(msgs); | ||
183 | if (newType != null) | ||
184 | msgs = ((InternalEObject) newType).eInverseAdd(this, CpsPackage.APPLICATION_TYPE__INSTANCES, | ||
185 | ApplicationType.class, msgs); | ||
186 | msgs = basicSetType(newType, msgs); | ||
187 | if (msgs != null) | ||
188 | msgs.dispatch(); | ||
189 | } else if (eNotificationRequired()) | ||
190 | eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__TYPE, newType, | ||
191 | newType)); | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * <!-- begin-user-doc --> | ||
196 | * <!-- end-user-doc --> | ||
197 | * @generated | ||
198 | */ | ||
199 | @Override | ||
200 | public HostInstance getAllocatedTo() { | ||
201 | if (allocatedTo != null && allocatedTo.eIsProxy()) { | ||
202 | InternalEObject oldAllocatedTo = (InternalEObject) allocatedTo; | ||
203 | allocatedTo = (HostInstance) eResolveProxy(oldAllocatedTo); | ||
204 | if (allocatedTo != oldAllocatedTo) { | ||
205 | if (eNotificationRequired()) | ||
206 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
207 | CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, oldAllocatedTo, allocatedTo)); | ||
208 | } | ||
209 | } | ||
210 | return allocatedTo; | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | public HostInstance basicGetAllocatedTo() { | ||
219 | return allocatedTo; | ||
220 | } | ||
221 | |||
222 | /** | ||
223 | * <!-- begin-user-doc --> | ||
224 | * <!-- end-user-doc --> | ||
225 | * @generated | ||
226 | */ | ||
227 | public NotificationChain basicSetAllocatedTo(HostInstance newAllocatedTo, NotificationChain msgs) { | ||
228 | HostInstance oldAllocatedTo = allocatedTo; | ||
229 | allocatedTo = newAllocatedTo; | ||
230 | if (eNotificationRequired()) { | ||
231 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
232 | CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, oldAllocatedTo, newAllocatedTo); | ||
233 | if (msgs == null) | ||
234 | msgs = notification; | ||
235 | else | ||
236 | msgs.add(notification); | ||
237 | } | ||
238 | return msgs; | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * <!-- begin-user-doc --> | ||
243 | * <!-- end-user-doc --> | ||
244 | * @generated | ||
245 | */ | ||
246 | @Override | ||
247 | public void setAllocatedTo(HostInstance newAllocatedTo) { | ||
248 | if (newAllocatedTo != allocatedTo) { | ||
249 | NotificationChain msgs = null; | ||
250 | if (allocatedTo != null) | ||
251 | msgs = ((InternalEObject) allocatedTo).eInverseRemove(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, | ||
252 | HostInstance.class, msgs); | ||
253 | if (newAllocatedTo != null) | ||
254 | msgs = ((InternalEObject) newAllocatedTo).eInverseAdd(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, | ||
255 | HostInstance.class, msgs); | ||
256 | msgs = basicSetAllocatedTo(newAllocatedTo, msgs); | ||
257 | if (msgs != null) | ||
258 | msgs.dispatch(); | ||
259 | } else if (eNotificationRequired()) | ||
260 | eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, | ||
261 | newAllocatedTo, newAllocatedTo)); | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * <!-- begin-user-doc --> | ||
266 | * <!-- end-user-doc --> | ||
267 | * @generated | ||
268 | */ | ||
269 | @Override | ||
270 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
271 | switch (featureID) { | ||
272 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
273 | if (requirement != null) | ||
274 | msgs = ((InternalEObject) requirement).eInverseRemove(this, CpsPackage.REQUIREMENT__INSTANCES, | ||
275 | Requirement.class, msgs); | ||
276 | return basicSetRequirement((Requirement) otherEnd, msgs); | ||
277 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
278 | if (eInternalContainer() != null) | ||
279 | msgs = eBasicRemoveFromContainer(msgs); | ||
280 | return basicSetType((ApplicationType) otherEnd, msgs); | ||
281 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
282 | if (allocatedTo != null) | ||
283 | msgs = ((InternalEObject) allocatedTo).eInverseRemove(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, | ||
284 | HostInstance.class, msgs); | ||
285 | return basicSetAllocatedTo((HostInstance) otherEnd, msgs); | ||
286 | } | ||
287 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
288 | } | ||
289 | |||
290 | /** | ||
291 | * <!-- begin-user-doc --> | ||
292 | * <!-- end-user-doc --> | ||
293 | * @generated | ||
294 | */ | ||
295 | @Override | ||
296 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
297 | switch (featureID) { | ||
298 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
299 | return basicSetRequirement(null, msgs); | ||
300 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
301 | return basicSetType(null, msgs); | ||
302 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
303 | return basicSetAllocatedTo(null, msgs); | ||
304 | } | ||
305 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
306 | } | ||
307 | |||
308 | /** | ||
309 | * <!-- begin-user-doc --> | ||
310 | * <!-- end-user-doc --> | ||
311 | * @generated | ||
312 | */ | ||
313 | @Override | ||
314 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
315 | switch (eContainerFeatureID()) { | ||
316 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
317 | return eInternalContainer().eInverseRemove(this, CpsPackage.APPLICATION_TYPE__INSTANCES, | ||
318 | ApplicationType.class, msgs); | ||
319 | } | ||
320 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
321 | } | ||
322 | |||
323 | /** | ||
324 | * <!-- begin-user-doc --> | ||
325 | * <!-- end-user-doc --> | ||
326 | * @generated | ||
327 | */ | ||
328 | @Override | ||
329 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
330 | switch (featureID) { | ||
331 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
332 | if (resolve) | ||
333 | return getRequirement(); | ||
334 | return basicGetRequirement(); | ||
335 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
336 | return getType(); | ||
337 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
338 | if (resolve) | ||
339 | return getAllocatedTo(); | ||
340 | return basicGetAllocatedTo(); | ||
341 | } | ||
342 | return super.eGet(featureID, resolve, coreType); | ||
343 | } | ||
344 | |||
345 | /** | ||
346 | * <!-- begin-user-doc --> | ||
347 | * <!-- end-user-doc --> | ||
348 | * @generated | ||
349 | */ | ||
350 | @Override | ||
351 | public void eSet(int featureID, Object newValue) { | ||
352 | switch (featureID) { | ||
353 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
354 | setRequirement((Requirement) newValue); | ||
355 | return; | ||
356 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
357 | setType((ApplicationType) newValue); | ||
358 | return; | ||
359 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
360 | setAllocatedTo((HostInstance) newValue); | ||
361 | return; | ||
362 | } | ||
363 | super.eSet(featureID, newValue); | ||
364 | } | ||
365 | |||
366 | /** | ||
367 | * <!-- begin-user-doc --> | ||
368 | * <!-- end-user-doc --> | ||
369 | * @generated | ||
370 | */ | ||
371 | @Override | ||
372 | public void eUnset(int featureID) { | ||
373 | switch (featureID) { | ||
374 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
375 | setRequirement((Requirement) null); | ||
376 | return; | ||
377 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
378 | setType((ApplicationType) null); | ||
379 | return; | ||
380 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
381 | setAllocatedTo((HostInstance) null); | ||
382 | return; | ||
383 | } | ||
384 | super.eUnset(featureID); | ||
385 | } | ||
386 | |||
387 | /** | ||
388 | * <!-- begin-user-doc --> | ||
389 | * <!-- end-user-doc --> | ||
390 | * @generated | ||
391 | */ | ||
392 | @Override | ||
393 | public boolean eIsSet(int featureID) { | ||
394 | switch (featureID) { | ||
395 | case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: | ||
396 | return requirement != null; | ||
397 | case CpsPackage.APPLICATION_INSTANCE__TYPE: | ||
398 | return getType() != null; | ||
399 | case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: | ||
400 | return allocatedTo != null; | ||
401 | } | ||
402 | return super.eIsSet(featureID); | ||
403 | } | ||
404 | |||
405 | } //ApplicationInstanceImpl | ||