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