diff options
Diffstat (limited to 'Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java')
-rw-r--r-- | Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java | 385 |
1 files changed, 385 insertions, 0 deletions
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java new file mode 100644 index 00000000..557da4c1 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3PackageImpl.java | |||
@@ -0,0 +1,385 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import modes3.Modes3Factory; | ||
6 | import modes3.Modes3ModelRoot; | ||
7 | import modes3.Modes3Package; | ||
8 | import modes3.Segment; | ||
9 | import modes3.SimpleSegment; | ||
10 | import modes3.Train; | ||
11 | import modes3.Turnout; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EAttribute; | ||
14 | import org.eclipse.emf.ecore.EClass; | ||
15 | import org.eclipse.emf.ecore.EPackage; | ||
16 | import org.eclipse.emf.ecore.EReference; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
19 | |||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * An implementation of the model <b>Package</b>. | ||
23 | * <!-- end-user-doc --> | ||
24 | * @generated | ||
25 | */ | ||
26 | public class Modes3PackageImpl extends EPackageImpl implements Modes3Package { | ||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | private EClass segmentEClass = null; | ||
33 | |||
34 | /** | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @generated | ||
38 | */ | ||
39 | private EClass modes3ModelRootEClass = null; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | private EClass turnoutEClass = null; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | private EClass trainEClass = null; | ||
54 | |||
55 | /** | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @generated | ||
59 | */ | ||
60 | private EClass simpleSegmentEClass = null; | ||
61 | |||
62 | /** | ||
63 | * Creates an instance of the model <b>Package</b>, registered with | ||
64 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
65 | * package URI value. | ||
66 | * <p>Note: the correct way to create the package is via the static | ||
67 | * factory method {@link #init init()}, which also performs | ||
68 | * initialization of the package, or returns the registered package, | ||
69 | * if one already exists. | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
73 | * @see modes3.Modes3Package#eNS_URI | ||
74 | * @see #init() | ||
75 | * @generated | ||
76 | */ | ||
77 | private Modes3PackageImpl() { | ||
78 | super(eNS_URI, Modes3Factory.eINSTANCE); | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | private static boolean isInited = false; | ||
87 | |||
88 | /** | ||
89 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
90 | * | ||
91 | * <p>This method is used to initialize {@link Modes3Package#eINSTANCE} when that field is accessed. | ||
92 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @see #eNS_URI | ||
96 | * @see #createPackageContents() | ||
97 | * @see #initializePackageContents() | ||
98 | * @generated | ||
99 | */ | ||
100 | public static Modes3Package init() { | ||
101 | if (isInited) return (Modes3Package)EPackage.Registry.INSTANCE.getEPackage(Modes3Package.eNS_URI); | ||
102 | |||
103 | // Obtain or create and register package | ||
104 | Object registeredModes3Package = EPackage.Registry.INSTANCE.get(eNS_URI); | ||
105 | Modes3PackageImpl theModes3Package = registeredModes3Package instanceof Modes3PackageImpl ? (Modes3PackageImpl)registeredModes3Package : new Modes3PackageImpl(); | ||
106 | |||
107 | isInited = true; | ||
108 | |||
109 | // Create package meta-data objects | ||
110 | theModes3Package.createPackageContents(); | ||
111 | |||
112 | // Initialize created meta-data | ||
113 | theModes3Package.initializePackageContents(); | ||
114 | |||
115 | // Mark meta-data to indicate it can't be changed | ||
116 | theModes3Package.freeze(); | ||
117 | |||
118 | // Update the registry and return the package | ||
119 | EPackage.Registry.INSTANCE.put(Modes3Package.eNS_URI, theModes3Package); | ||
120 | return theModes3Package; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | public EClass getSegment() { | ||
129 | return segmentEClass; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | public EReference getSegment_ConnectedTo() { | ||
138 | return (EReference)segmentEClass.getEStructuralFeatures().get(0); | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public EReference getSegment_OccupiedBy() { | ||
147 | return (EReference)segmentEClass.getEStructuralFeatures().get(1); | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @generated | ||
154 | */ | ||
155 | public EAttribute getSegment_Id() { | ||
156 | return (EAttribute)segmentEClass.getEStructuralFeatures().get(2); | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @generated | ||
163 | */ | ||
164 | public EClass getModes3ModelRoot() { | ||
165 | return modes3ModelRootEClass; | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | public EAttribute getModes3ModelRoot_Id() { | ||
174 | return (EAttribute)modes3ModelRootEClass.getEStructuralFeatures().get(0); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | public EReference getModes3ModelRoot_Trains() { | ||
183 | return (EReference)modes3ModelRootEClass.getEStructuralFeatures().get(1); | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | public EReference getModes3ModelRoot_Segments() { | ||
192 | return (EReference)modes3ModelRootEClass.getEStructuralFeatures().get(2); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | public EReference getModes3ModelRoot_Turnouts() { | ||
201 | return (EReference)modes3ModelRootEClass.getEStructuralFeatures().get(3); | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <!-- begin-user-doc --> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @generated | ||
208 | */ | ||
209 | public EClass getTurnout() { | ||
210 | return turnoutEClass; | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | public EReference getTurnout_Straight() { | ||
219 | return (EReference)turnoutEClass.getEStructuralFeatures().get(0); | ||
220 | } | ||
221 | |||
222 | /** | ||
223 | * <!-- begin-user-doc --> | ||
224 | * <!-- end-user-doc --> | ||
225 | * @generated | ||
226 | */ | ||
227 | public EReference getTurnout_Divergent() { | ||
228 | return (EReference)turnoutEClass.getEStructuralFeatures().get(1); | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | public EClass getTrain() { | ||
237 | return trainEClass; | ||
238 | } | ||
239 | |||
240 | /** | ||
241 | * <!-- begin-user-doc --> | ||
242 | * <!-- end-user-doc --> | ||
243 | * @generated | ||
244 | */ | ||
245 | public EReference getTrain_Location() { | ||
246 | return (EReference)trainEClass.getEStructuralFeatures().get(0); | ||
247 | } | ||
248 | |||
249 | /** | ||
250 | * <!-- begin-user-doc --> | ||
251 | * <!-- end-user-doc --> | ||
252 | * @generated | ||
253 | */ | ||
254 | public EAttribute getTrain_Id() { | ||
255 | return (EAttribute)trainEClass.getEStructuralFeatures().get(1); | ||
256 | } | ||
257 | |||
258 | /** | ||
259 | * <!-- begin-user-doc --> | ||
260 | * <!-- end-user-doc --> | ||
261 | * @generated | ||
262 | */ | ||
263 | public EAttribute getTrain_Speed() { | ||
264 | return (EAttribute)trainEClass.getEStructuralFeatures().get(2); | ||
265 | } | ||
266 | |||
267 | /** | ||
268 | * <!-- begin-user-doc --> | ||
269 | * <!-- end-user-doc --> | ||
270 | * @generated | ||
271 | */ | ||
272 | public EClass getSimpleSegment() { | ||
273 | return simpleSegmentEClass; | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * <!-- begin-user-doc --> | ||
278 | * <!-- end-user-doc --> | ||
279 | * @generated | ||
280 | */ | ||
281 | public Modes3Factory getModes3Factory() { | ||
282 | return (Modes3Factory)getEFactoryInstance(); | ||
283 | } | ||
284 | |||
285 | /** | ||
286 | * <!-- begin-user-doc --> | ||
287 | * <!-- end-user-doc --> | ||
288 | * @generated | ||
289 | */ | ||
290 | private boolean isCreated = false; | ||
291 | |||
292 | /** | ||
293 | * Creates the meta-model objects for the package. This method is | ||
294 | * guarded to have no affect on any invocation but its first. | ||
295 | * <!-- begin-user-doc --> | ||
296 | * <!-- end-user-doc --> | ||
297 | * @generated | ||
298 | */ | ||
299 | public void createPackageContents() { | ||
300 | if (isCreated) return; | ||
301 | isCreated = true; | ||
302 | |||
303 | // Create classes and their features | ||
304 | segmentEClass = createEClass(SEGMENT); | ||
305 | createEReference(segmentEClass, SEGMENT__CONNECTED_TO); | ||
306 | createEReference(segmentEClass, SEGMENT__OCCUPIED_BY); | ||
307 | createEAttribute(segmentEClass, SEGMENT__ID); | ||
308 | |||
309 | modes3ModelRootEClass = createEClass(MODES3_MODEL_ROOT); | ||
310 | createEAttribute(modes3ModelRootEClass, MODES3_MODEL_ROOT__ID); | ||
311 | createEReference(modes3ModelRootEClass, MODES3_MODEL_ROOT__TRAINS); | ||
312 | createEReference(modes3ModelRootEClass, MODES3_MODEL_ROOT__SEGMENTS); | ||
313 | createEReference(modes3ModelRootEClass, MODES3_MODEL_ROOT__TURNOUTS); | ||
314 | |||
315 | turnoutEClass = createEClass(TURNOUT); | ||
316 | createEReference(turnoutEClass, TURNOUT__STRAIGHT); | ||
317 | createEReference(turnoutEClass, TURNOUT__DIVERGENT); | ||
318 | |||
319 | trainEClass = createEClass(TRAIN); | ||
320 | createEReference(trainEClass, TRAIN__LOCATION); | ||
321 | createEAttribute(trainEClass, TRAIN__ID); | ||
322 | createEAttribute(trainEClass, TRAIN__SPEED); | ||
323 | |||
324 | simpleSegmentEClass = createEClass(SIMPLE_SEGMENT); | ||
325 | } | ||
326 | |||
327 | /** | ||
328 | * <!-- begin-user-doc --> | ||
329 | * <!-- end-user-doc --> | ||
330 | * @generated | ||
331 | */ | ||
332 | private boolean isInitialized = false; | ||
333 | |||
334 | /** | ||
335 | * Complete the initialization of the package and its meta-model. This | ||
336 | * method is guarded to have no affect on any invocation but its first. | ||
337 | * <!-- begin-user-doc --> | ||
338 | * <!-- end-user-doc --> | ||
339 | * @generated | ||
340 | */ | ||
341 | public void initializePackageContents() { | ||
342 | if (isInitialized) return; | ||
343 | isInitialized = true; | ||
344 | |||
345 | // Initialize package | ||
346 | setName(eNAME); | ||
347 | setNsPrefix(eNS_PREFIX); | ||
348 | setNsURI(eNS_URI); | ||
349 | |||
350 | // Create type parameters | ||
351 | |||
352 | // Set bounds for type parameters | ||
353 | |||
354 | // Add supertypes to classes | ||
355 | turnoutEClass.getESuperTypes().add(this.getSegment()); | ||
356 | simpleSegmentEClass.getESuperTypes().add(this.getSegment()); | ||
357 | |||
358 | // Initialize classes, features, and operations; add parameters | ||
359 | initEClass(segmentEClass, Segment.class, "Segment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
360 | initEReference(getSegment_ConnectedTo(), this.getSegment(), null, "connectedTo", null, 0, 2, Segment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
361 | initEReference(getSegment_OccupiedBy(), this.getTrain(), this.getTrain_Location(), "occupiedBy", null, 0, 1, Segment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
362 | initEAttribute(getSegment_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Segment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
363 | |||
364 | initEClass(modes3ModelRootEClass, Modes3ModelRoot.class, "Modes3ModelRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
365 | initEAttribute(getModes3ModelRoot_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
366 | initEReference(getModes3ModelRoot_Trains(), this.getTrain(), null, "trains", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
367 | initEReference(getModes3ModelRoot_Segments(), this.getSimpleSegment(), null, "segments", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
368 | initEReference(getModes3ModelRoot_Turnouts(), this.getTurnout(), null, "turnouts", null, 0, -1, Modes3ModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
369 | |||
370 | initEClass(turnoutEClass, Turnout.class, "Turnout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
371 | initEReference(getTurnout_Straight(), this.getSegment(), null, "straight", null, 1, 1, Turnout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
372 | initEReference(getTurnout_Divergent(), this.getSegment(), null, "divergent", null, 1, 1, Turnout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
373 | |||
374 | initEClass(trainEClass, Train.class, "Train", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
375 | initEReference(getTrain_Location(), this.getSegment(), this.getSegment_OccupiedBy(), "location", null, 1, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
376 | initEAttribute(getTrain_Id(), ecorePackage.getEInt(), "id", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
377 | initEAttribute(getTrain_Speed(), ecorePackage.getEDouble(), "speed", null, 0, 1, Train.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
378 | |||
379 | initEClass(simpleSegmentEClass, SimpleSegment.class, "SimpleSegment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
380 | |||
381 | // Create resource | ||
382 | createResource(eNS_URI); | ||
383 | } | ||
384 | |||
385 | } //Modes3PackageImpl | ||