diff options
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDocumentImpl.java')
-rw-r--r-- | Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDocumentImpl.java | 397 |
1 files changed, 397 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDocumentImpl.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDocumentImpl.java new file mode 100644 index 00000000..c0e4c494 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDocumentImpl.java | |||
@@ -0,0 +1,397 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDocument; | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEnumDeclaration; | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFactDeclaration; | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFunctionDefinition; | ||
9 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSRelationDefinition; | ||
10 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSRunCommand; | ||
11 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody; | ||
12 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage; | ||
13 | |||
14 | import java.util.Collection; | ||
15 | |||
16 | import org.eclipse.emf.common.notify.Notification; | ||
17 | import org.eclipse.emf.common.notify.NotificationChain; | ||
18 | |||
19 | import org.eclipse.emf.common.util.EList; | ||
20 | |||
21 | import org.eclipse.emf.ecore.EClass; | ||
22 | import org.eclipse.emf.ecore.InternalEObject; | ||
23 | |||
24 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
25 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
26 | |||
27 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
28 | import org.eclipse.emf.ecore.util.InternalEList; | ||
29 | |||
30 | /** | ||
31 | * <!-- begin-user-doc --> | ||
32 | * An implementation of the model object '<em><b>ALS Document</b></em>'. | ||
33 | * <!-- end-user-doc --> | ||
34 | * <p> | ||
35 | * The following features are implemented: | ||
36 | * </p> | ||
37 | * <ul> | ||
38 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getEnumDeclarations <em>Enum Declarations</em>}</li> | ||
39 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getSignatureBodies <em>Signature Bodies</em>}</li> | ||
40 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getFunctionDefinitions <em>Function Definitions</em>}</li> | ||
41 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getRelationDefinitions <em>Relation Definitions</em>}</li> | ||
42 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getFactDeclarations <em>Fact Declarations</em>}</li> | ||
43 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDocumentImpl#getRunCommand <em>Run Command</em>}</li> | ||
44 | * </ul> | ||
45 | * | ||
46 | * @generated | ||
47 | */ | ||
48 | public class ALSDocumentImpl extends MinimalEObjectImpl.Container implements ALSDocument | ||
49 | { | ||
50 | /** | ||
51 | * The cached value of the '{@link #getEnumDeclarations() <em>Enum Declarations</em>}' containment reference list. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @see #getEnumDeclarations() | ||
55 | * @generated | ||
56 | * @ordered | ||
57 | */ | ||
58 | protected EList<ALSEnumDeclaration> enumDeclarations; | ||
59 | |||
60 | /** | ||
61 | * The cached value of the '{@link #getSignatureBodies() <em>Signature Bodies</em>}' containment reference list. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @see #getSignatureBodies() | ||
65 | * @generated | ||
66 | * @ordered | ||
67 | */ | ||
68 | protected EList<ALSSignatureBody> signatureBodies; | ||
69 | |||
70 | /** | ||
71 | * The cached value of the '{@link #getFunctionDefinitions() <em>Function Definitions</em>}' containment reference list. | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @see #getFunctionDefinitions() | ||
75 | * @generated | ||
76 | * @ordered | ||
77 | */ | ||
78 | protected EList<ALSFunctionDefinition> functionDefinitions; | ||
79 | |||
80 | /** | ||
81 | * The cached value of the '{@link #getRelationDefinitions() <em>Relation Definitions</em>}' containment reference list. | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @see #getRelationDefinitions() | ||
85 | * @generated | ||
86 | * @ordered | ||
87 | */ | ||
88 | protected EList<ALSRelationDefinition> relationDefinitions; | ||
89 | |||
90 | /** | ||
91 | * The cached value of the '{@link #getFactDeclarations() <em>Fact Declarations</em>}' containment reference list. | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @see #getFactDeclarations() | ||
95 | * @generated | ||
96 | * @ordered | ||
97 | */ | ||
98 | protected EList<ALSFactDeclaration> factDeclarations; | ||
99 | |||
100 | /** | ||
101 | * The cached value of the '{@link #getRunCommand() <em>Run Command</em>}' containment reference. | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @see #getRunCommand() | ||
105 | * @generated | ||
106 | * @ordered | ||
107 | */ | ||
108 | protected ALSRunCommand runCommand; | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | protected ALSDocumentImpl() | ||
116 | { | ||
117 | super(); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | @Override | ||
126 | protected EClass eStaticClass() | ||
127 | { | ||
128 | return AlloyLanguagePackage.Literals.ALS_DOCUMENT; | ||
129 | } | ||
130 | |||
131 | /** | ||
132 | * <!-- begin-user-doc --> | ||
133 | * <!-- end-user-doc --> | ||
134 | * @generated | ||
135 | */ | ||
136 | public EList<ALSEnumDeclaration> getEnumDeclarations() | ||
137 | { | ||
138 | if (enumDeclarations == null) | ||
139 | { | ||
140 | enumDeclarations = new EObjectContainmentEList<ALSEnumDeclaration>(ALSEnumDeclaration.class, this, AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS); | ||
141 | } | ||
142 | return enumDeclarations; | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | public EList<ALSSignatureBody> getSignatureBodies() | ||
151 | { | ||
152 | if (signatureBodies == null) | ||
153 | { | ||
154 | signatureBodies = new EObjectContainmentEList<ALSSignatureBody>(ALSSignatureBody.class, this, AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES); | ||
155 | } | ||
156 | return signatureBodies; | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @generated | ||
163 | */ | ||
164 | public EList<ALSFunctionDefinition> getFunctionDefinitions() | ||
165 | { | ||
166 | if (functionDefinitions == null) | ||
167 | { | ||
168 | functionDefinitions = new EObjectContainmentEList<ALSFunctionDefinition>(ALSFunctionDefinition.class, this, AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS); | ||
169 | } | ||
170 | return functionDefinitions; | ||
171 | } | ||
172 | |||
173 | /** | ||
174 | * <!-- begin-user-doc --> | ||
175 | * <!-- end-user-doc --> | ||
176 | * @generated | ||
177 | */ | ||
178 | public EList<ALSRelationDefinition> getRelationDefinitions() | ||
179 | { | ||
180 | if (relationDefinitions == null) | ||
181 | { | ||
182 | relationDefinitions = new EObjectContainmentEList<ALSRelationDefinition>(ALSRelationDefinition.class, this, AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS); | ||
183 | } | ||
184 | return relationDefinitions; | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | public EList<ALSFactDeclaration> getFactDeclarations() | ||
193 | { | ||
194 | if (factDeclarations == null) | ||
195 | { | ||
196 | factDeclarations = new EObjectContainmentEList<ALSFactDeclaration>(ALSFactDeclaration.class, this, AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS); | ||
197 | } | ||
198 | return factDeclarations; | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | public ALSRunCommand getRunCommand() | ||
207 | { | ||
208 | return runCommand; | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | public NotificationChain basicSetRunCommand(ALSRunCommand newRunCommand, NotificationChain msgs) | ||
217 | { | ||
218 | ALSRunCommand oldRunCommand = runCommand; | ||
219 | runCommand = newRunCommand; | ||
220 | if (eNotificationRequired()) | ||
221 | { | ||
222 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND, oldRunCommand, newRunCommand); | ||
223 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
224 | } | ||
225 | return msgs; | ||
226 | } | ||
227 | |||
228 | /** | ||
229 | * <!-- begin-user-doc --> | ||
230 | * <!-- end-user-doc --> | ||
231 | * @generated | ||
232 | */ | ||
233 | public void setRunCommand(ALSRunCommand newRunCommand) | ||
234 | { | ||
235 | if (newRunCommand != runCommand) | ||
236 | { | ||
237 | NotificationChain msgs = null; | ||
238 | if (runCommand != null) | ||
239 | msgs = ((InternalEObject)runCommand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND, null, msgs); | ||
240 | if (newRunCommand != null) | ||
241 | msgs = ((InternalEObject)newRunCommand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND, null, msgs); | ||
242 | msgs = basicSetRunCommand(newRunCommand, msgs); | ||
243 | if (msgs != null) msgs.dispatch(); | ||
244 | } | ||
245 | else if (eNotificationRequired()) | ||
246 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND, newRunCommand, newRunCommand)); | ||
247 | } | ||
248 | |||
249 | /** | ||
250 | * <!-- begin-user-doc --> | ||
251 | * <!-- end-user-doc --> | ||
252 | * @generated | ||
253 | */ | ||
254 | @Override | ||
255 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
256 | { | ||
257 | switch (featureID) | ||
258 | { | ||
259 | case AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS: | ||
260 | return ((InternalEList<?>)getEnumDeclarations()).basicRemove(otherEnd, msgs); | ||
261 | case AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES: | ||
262 | return ((InternalEList<?>)getSignatureBodies()).basicRemove(otherEnd, msgs); | ||
263 | case AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS: | ||
264 | return ((InternalEList<?>)getFunctionDefinitions()).basicRemove(otherEnd, msgs); | ||
265 | case AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS: | ||
266 | return ((InternalEList<?>)getRelationDefinitions()).basicRemove(otherEnd, msgs); | ||
267 | case AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS: | ||
268 | return ((InternalEList<?>)getFactDeclarations()).basicRemove(otherEnd, msgs); | ||
269 | case AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND: | ||
270 | return basicSetRunCommand(null, msgs); | ||
271 | } | ||
272 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
273 | } | ||
274 | |||
275 | /** | ||
276 | * <!-- begin-user-doc --> | ||
277 | * <!-- end-user-doc --> | ||
278 | * @generated | ||
279 | */ | ||
280 | @Override | ||
281 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
282 | { | ||
283 | switch (featureID) | ||
284 | { | ||
285 | case AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS: | ||
286 | return getEnumDeclarations(); | ||
287 | case AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES: | ||
288 | return getSignatureBodies(); | ||
289 | case AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS: | ||
290 | return getFunctionDefinitions(); | ||
291 | case AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS: | ||
292 | return getRelationDefinitions(); | ||
293 | case AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS: | ||
294 | return getFactDeclarations(); | ||
295 | case AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND: | ||
296 | return getRunCommand(); | ||
297 | } | ||
298 | return super.eGet(featureID, resolve, coreType); | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * <!-- begin-user-doc --> | ||
303 | * <!-- end-user-doc --> | ||
304 | * @generated | ||
305 | */ | ||
306 | @SuppressWarnings("unchecked") | ||
307 | @Override | ||
308 | public void eSet(int featureID, Object newValue) | ||
309 | { | ||
310 | switch (featureID) | ||
311 | { | ||
312 | case AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS: | ||
313 | getEnumDeclarations().clear(); | ||
314 | getEnumDeclarations().addAll((Collection<? extends ALSEnumDeclaration>)newValue); | ||
315 | return; | ||
316 | case AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES: | ||
317 | getSignatureBodies().clear(); | ||
318 | getSignatureBodies().addAll((Collection<? extends ALSSignatureBody>)newValue); | ||
319 | return; | ||
320 | case AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS: | ||
321 | getFunctionDefinitions().clear(); | ||
322 | getFunctionDefinitions().addAll((Collection<? extends ALSFunctionDefinition>)newValue); | ||
323 | return; | ||
324 | case AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS: | ||
325 | getRelationDefinitions().clear(); | ||
326 | getRelationDefinitions().addAll((Collection<? extends ALSRelationDefinition>)newValue); | ||
327 | return; | ||
328 | case AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS: | ||
329 | getFactDeclarations().clear(); | ||
330 | getFactDeclarations().addAll((Collection<? extends ALSFactDeclaration>)newValue); | ||
331 | return; | ||
332 | case AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND: | ||
333 | setRunCommand((ALSRunCommand)newValue); | ||
334 | return; | ||
335 | } | ||
336 | super.eSet(featureID, newValue); | ||
337 | } | ||
338 | |||
339 | /** | ||
340 | * <!-- begin-user-doc --> | ||
341 | * <!-- end-user-doc --> | ||
342 | * @generated | ||
343 | */ | ||
344 | @Override | ||
345 | public void eUnset(int featureID) | ||
346 | { | ||
347 | switch (featureID) | ||
348 | { | ||
349 | case AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS: | ||
350 | getEnumDeclarations().clear(); | ||
351 | return; | ||
352 | case AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES: | ||
353 | getSignatureBodies().clear(); | ||
354 | return; | ||
355 | case AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS: | ||
356 | getFunctionDefinitions().clear(); | ||
357 | return; | ||
358 | case AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS: | ||
359 | getRelationDefinitions().clear(); | ||
360 | return; | ||
361 | case AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS: | ||
362 | getFactDeclarations().clear(); | ||
363 | return; | ||
364 | case AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND: | ||
365 | setRunCommand((ALSRunCommand)null); | ||
366 | return; | ||
367 | } | ||
368 | super.eUnset(featureID); | ||
369 | } | ||
370 | |||
371 | /** | ||
372 | * <!-- begin-user-doc --> | ||
373 | * <!-- end-user-doc --> | ||
374 | * @generated | ||
375 | */ | ||
376 | @Override | ||
377 | public boolean eIsSet(int featureID) | ||
378 | { | ||
379 | switch (featureID) | ||
380 | { | ||
381 | case AlloyLanguagePackage.ALS_DOCUMENT__ENUM_DECLARATIONS: | ||
382 | return enumDeclarations != null && !enumDeclarations.isEmpty(); | ||
383 | case AlloyLanguagePackage.ALS_DOCUMENT__SIGNATURE_BODIES: | ||
384 | return signatureBodies != null && !signatureBodies.isEmpty(); | ||
385 | case AlloyLanguagePackage.ALS_DOCUMENT__FUNCTION_DEFINITIONS: | ||
386 | return functionDefinitions != null && !functionDefinitions.isEmpty(); | ||
387 | case AlloyLanguagePackage.ALS_DOCUMENT__RELATION_DEFINITIONS: | ||
388 | return relationDefinitions != null && !relationDefinitions.isEmpty(); | ||
389 | case AlloyLanguagePackage.ALS_DOCUMENT__FACT_DECLARATIONS: | ||
390 | return factDeclarations != null && !factDeclarations.isEmpty(); | ||
391 | case AlloyLanguagePackage.ALS_DOCUMENT__RUN_COMMAND: | ||
392 | return runCommand != null; | ||
393 | } | ||
394 | return super.eIsSet(featureID); | ||
395 | } | ||
396 | |||
397 | } //ALSDocumentImpl | ||