diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2020-08-06 16:07:16 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 2020-08-06 16:07:16 +0200 |
commit | a620f07468780778bd55dcffc30245def37ece69 (patch) | |
tree | 57189ad9c8bf15211a05a3cd50ee90e90f434557 /Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3 | |
parent | Fix time measurement (diff) | |
download | VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.tar.gz VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.tar.zst VIATRA-Generator-a620f07468780778bd55dcffc30245def37ece69.zip |
MoDeS3 unit propagation WIP
Diffstat (limited to 'Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3')
14 files changed, 3046 insertions, 0 deletions
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java new file mode 100644 index 00000000..73188db1 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Factory.java | |||
@@ -0,0 +1,69 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EFactory; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * The <b>Factory</b> for the model. | ||
10 | * It provides a create method for each non-abstract class of the model. | ||
11 | * <!-- end-user-doc --> | ||
12 | * @see modes3.Modes3Package | ||
13 | * @generated | ||
14 | */ | ||
15 | public interface Modes3Factory extends EFactory { | ||
16 | /** | ||
17 | * The singleton instance of the factory. | ||
18 | * <!-- begin-user-doc --> | ||
19 | * <!-- end-user-doc --> | ||
20 | * @generated | ||
21 | */ | ||
22 | Modes3Factory eINSTANCE = modes3.impl.Modes3FactoryImpl.init(); | ||
23 | |||
24 | /** | ||
25 | * Returns a new object of class '<em>Segment</em>'. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <!-- end-user-doc --> | ||
28 | * @return a new object of class '<em>Segment</em>'. | ||
29 | * @generated | ||
30 | */ | ||
31 | Segment createSegment(); | ||
32 | |||
33 | /** | ||
34 | * Returns a new object of class '<em>Model Root</em>'. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @return a new object of class '<em>Model Root</em>'. | ||
38 | * @generated | ||
39 | */ | ||
40 | Modes3ModelRoot createModes3ModelRoot(); | ||
41 | |||
42 | /** | ||
43 | * Returns a new object of class '<em>Turnout</em>'. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @return a new object of class '<em>Turnout</em>'. | ||
47 | * @generated | ||
48 | */ | ||
49 | Turnout createTurnout(); | ||
50 | |||
51 | /** | ||
52 | * Returns a new object of class '<em>Train</em>'. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @return a new object of class '<em>Train</em>'. | ||
56 | * @generated | ||
57 | */ | ||
58 | Train createTrain(); | ||
59 | |||
60 | /** | ||
61 | * Returns the package supported by this factory. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @return the package supported by this factory. | ||
65 | * @generated | ||
66 | */ | ||
67 | Modes3Package getModes3Package(); | ||
68 | |||
69 | } //Modes3Factory | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java new file mode 100644 index 00000000..4f925b7a --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3ModelRoot.java | |||
@@ -0,0 +1,87 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>Model Root</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link modes3.Modes3ModelRoot#getId <em>Id</em>}</li> | ||
19 | * <li>{@link modes3.Modes3ModelRoot#getTrains <em>Trains</em>}</li> | ||
20 | * <li>{@link modes3.Modes3ModelRoot#getSegments <em>Segments</em>}</li> | ||
21 | * <li>{@link modes3.Modes3ModelRoot#getTurnouts <em>Turnouts</em>}</li> | ||
22 | * </ul> | ||
23 | * | ||
24 | * @see modes3.Modes3Package#getModes3ModelRoot() | ||
25 | * @model | ||
26 | * @generated | ||
27 | */ | ||
28 | public interface Modes3ModelRoot extends EObject { | ||
29 | /** | ||
30 | * Returns the value of the '<em><b>Id</b></em>' attribute. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @return the value of the '<em>Id</em>' attribute. | ||
34 | * @see #setId(int) | ||
35 | * @see modes3.Modes3Package#getModes3ModelRoot_Id() | ||
36 | * @model | ||
37 | * @generated | ||
38 | */ | ||
39 | int getId(); | ||
40 | |||
41 | /** | ||
42 | * Sets the value of the '{@link modes3.Modes3ModelRoot#getId <em>Id</em>}' attribute. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @param value the new value of the '<em>Id</em>' attribute. | ||
46 | * @see #getId() | ||
47 | * @generated | ||
48 | */ | ||
49 | void setId(int value); | ||
50 | |||
51 | /** | ||
52 | * Returns the value of the '<em><b>Trains</b></em>' containment reference list. | ||
53 | * The list contents are of type {@link modes3.Train}. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @return the value of the '<em>Trains</em>' containment reference list. | ||
57 | * @see modes3.Modes3Package#getModes3ModelRoot_Trains() | ||
58 | * @model containment="true" | ||
59 | * @generated | ||
60 | */ | ||
61 | EList<Train> getTrains(); | ||
62 | |||
63 | /** | ||
64 | * Returns the value of the '<em><b>Segments</b></em>' containment reference list. | ||
65 | * The list contents are of type {@link modes3.Segment}. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @return the value of the '<em>Segments</em>' containment reference list. | ||
69 | * @see modes3.Modes3Package#getModes3ModelRoot_Segments() | ||
70 | * @model containment="true" | ||
71 | * @generated | ||
72 | */ | ||
73 | EList<Segment> getSegments(); | ||
74 | |||
75 | /** | ||
76 | * Returns the value of the '<em><b>Turnouts</b></em>' containment reference list. | ||
77 | * The list contents are of type {@link modes3.Turnout}. | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @return the value of the '<em>Turnouts</em>' containment reference list. | ||
81 | * @see modes3.Modes3Package#getModes3ModelRoot_Turnouts() | ||
82 | * @model containment="true" | ||
83 | * @generated | ||
84 | */ | ||
85 | EList<Turnout> getTurnouts(); | ||
86 | |||
87 | } // Modes3ModelRoot | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java new file mode 100644 index 00000000..4760af9d --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Modes3Package.java | |||
@@ -0,0 +1,640 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | ||
7 | import org.eclipse.emf.ecore.EPackage; | ||
8 | import org.eclipse.emf.ecore.EReference; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * The <b>Package</b> for the model. | ||
13 | * It contains accessors for the meta objects to represent | ||
14 | * <ul> | ||
15 | * <li>each class,</li> | ||
16 | * <li>each feature of each class,</li> | ||
17 | * <li>each operation of each class,</li> | ||
18 | * <li>each enum,</li> | ||
19 | * <li>and each data type</li> | ||
20 | * </ul> | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see modes3.Modes3Factory | ||
23 | * @model kind="package" | ||
24 | * @generated | ||
25 | */ | ||
26 | public interface Modes3Package extends EPackage { | ||
27 | /** | ||
28 | * The package name. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <!-- end-user-doc --> | ||
31 | * @generated | ||
32 | */ | ||
33 | String eNAME = "modes3"; | ||
34 | |||
35 | /** | ||
36 | * The package namespace URI. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | String eNS_URI = "http://www.ece.mcgill.ca/wcet/modes3"; | ||
42 | |||
43 | /** | ||
44 | * The package namespace name. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @generated | ||
48 | */ | ||
49 | String eNS_PREFIX = "modes3"; | ||
50 | |||
51 | /** | ||
52 | * The singleton instance of the package. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | Modes3Package eINSTANCE = modes3.impl.Modes3PackageImpl.init(); | ||
58 | |||
59 | /** | ||
60 | * The meta object id for the '{@link modes3.impl.SegmentImpl <em>Segment</em>}' class. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see modes3.impl.SegmentImpl | ||
64 | * @see modes3.impl.Modes3PackageImpl#getSegment() | ||
65 | * @generated | ||
66 | */ | ||
67 | int SEGMENT = 0; | ||
68 | |||
69 | /** | ||
70 | * The feature id for the '<em><b>Connected To</b></em>' reference list. | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | * @ordered | ||
75 | */ | ||
76 | int SEGMENT__CONNECTED_TO = 0; | ||
77 | |||
78 | /** | ||
79 | * The feature id for the '<em><b>Occupied By</b></em>' reference. | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | int SEGMENT__OCCUPIED_BY = 1; | ||
86 | |||
87 | /** | ||
88 | * The feature id for the '<em><b>Id</b></em>' attribute. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | * @ordered | ||
93 | */ | ||
94 | int SEGMENT__ID = 2; | ||
95 | |||
96 | /** | ||
97 | * The number of structural features of the '<em>Segment</em>' class. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | int SEGMENT_FEATURE_COUNT = 3; | ||
104 | |||
105 | /** | ||
106 | * The number of operations of the '<em>Segment</em>' class. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | * @ordered | ||
111 | */ | ||
112 | int SEGMENT_OPERATION_COUNT = 0; | ||
113 | |||
114 | /** | ||
115 | * The meta object id for the '{@link modes3.impl.Modes3ModelRootImpl <em>Model Root</em>}' class. | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @see modes3.impl.Modes3ModelRootImpl | ||
119 | * @see modes3.impl.Modes3PackageImpl#getModes3ModelRoot() | ||
120 | * @generated | ||
121 | */ | ||
122 | int MODES3_MODEL_ROOT = 1; | ||
123 | |||
124 | /** | ||
125 | * The feature id for the '<em><b>Id</b></em>' attribute. | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | * @ordered | ||
130 | */ | ||
131 | int MODES3_MODEL_ROOT__ID = 0; | ||
132 | |||
133 | /** | ||
134 | * The feature id for the '<em><b>Trains</b></em>' containment reference list. | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | * @ordered | ||
139 | */ | ||
140 | int MODES3_MODEL_ROOT__TRAINS = 1; | ||
141 | |||
142 | /** | ||
143 | * The feature id for the '<em><b>Segments</b></em>' containment reference list. | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | * @ordered | ||
148 | */ | ||
149 | int MODES3_MODEL_ROOT__SEGMENTS = 2; | ||
150 | |||
151 | /** | ||
152 | * The feature id for the '<em><b>Turnouts</b></em>' containment reference list. | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | * @ordered | ||
157 | */ | ||
158 | int MODES3_MODEL_ROOT__TURNOUTS = 3; | ||
159 | |||
160 | /** | ||
161 | * The number of structural features of the '<em>Model Root</em>' class. | ||
162 | * <!-- begin-user-doc --> | ||
163 | * <!-- end-user-doc --> | ||
164 | * @generated | ||
165 | * @ordered | ||
166 | */ | ||
167 | int MODES3_MODEL_ROOT_FEATURE_COUNT = 4; | ||
168 | |||
169 | /** | ||
170 | * The number of operations of the '<em>Model Root</em>' class. | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | * @ordered | ||
175 | */ | ||
176 | int MODES3_MODEL_ROOT_OPERATION_COUNT = 0; | ||
177 | |||
178 | /** | ||
179 | * The meta object id for the '{@link modes3.impl.TurnoutImpl <em>Turnout</em>}' class. | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @see modes3.impl.TurnoutImpl | ||
183 | * @see modes3.impl.Modes3PackageImpl#getTurnout() | ||
184 | * @generated | ||
185 | */ | ||
186 | int TURNOUT = 2; | ||
187 | |||
188 | /** | ||
189 | * The feature id for the '<em><b>Connected To</b></em>' reference list. | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | * @ordered | ||
194 | */ | ||
195 | int TURNOUT__CONNECTED_TO = SEGMENT__CONNECTED_TO; | ||
196 | |||
197 | /** | ||
198 | * The feature id for the '<em><b>Occupied By</b></em>' reference. | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | * @ordered | ||
203 | */ | ||
204 | int TURNOUT__OCCUPIED_BY = SEGMENT__OCCUPIED_BY; | ||
205 | |||
206 | /** | ||
207 | * The feature id for the '<em><b>Id</b></em>' attribute. | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | * @ordered | ||
212 | */ | ||
213 | int TURNOUT__ID = SEGMENT__ID; | ||
214 | |||
215 | /** | ||
216 | * The feature id for the '<em><b>Straight</b></em>' reference. | ||
217 | * <!-- begin-user-doc --> | ||
218 | * <!-- end-user-doc --> | ||
219 | * @generated | ||
220 | * @ordered | ||
221 | */ | ||
222 | int TURNOUT__STRAIGHT = SEGMENT_FEATURE_COUNT + 0; | ||
223 | |||
224 | /** | ||
225 | * The feature id for the '<em><b>Divergent</b></em>' reference. | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | * @ordered | ||
230 | */ | ||
231 | int TURNOUT__DIVERGENT = SEGMENT_FEATURE_COUNT + 1; | ||
232 | |||
233 | /** | ||
234 | * The number of structural features of the '<em>Turnout</em>' class. | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | * @ordered | ||
239 | */ | ||
240 | int TURNOUT_FEATURE_COUNT = SEGMENT_FEATURE_COUNT + 2; | ||
241 | |||
242 | /** | ||
243 | * The number of operations of the '<em>Turnout</em>' class. | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | * @ordered | ||
248 | */ | ||
249 | int TURNOUT_OPERATION_COUNT = SEGMENT_OPERATION_COUNT + 0; | ||
250 | |||
251 | /** | ||
252 | * The meta object id for the '{@link modes3.impl.TrainImpl <em>Train</em>}' class. | ||
253 | * <!-- begin-user-doc --> | ||
254 | * <!-- end-user-doc --> | ||
255 | * @see modes3.impl.TrainImpl | ||
256 | * @see modes3.impl.Modes3PackageImpl#getTrain() | ||
257 | * @generated | ||
258 | */ | ||
259 | int TRAIN = 3; | ||
260 | |||
261 | /** | ||
262 | * The feature id for the '<em><b>Location</b></em>' reference. | ||
263 | * <!-- begin-user-doc --> | ||
264 | * <!-- end-user-doc --> | ||
265 | * @generated | ||
266 | * @ordered | ||
267 | */ | ||
268 | int TRAIN__LOCATION = 0; | ||
269 | |||
270 | /** | ||
271 | * The feature id for the '<em><b>Id</b></em>' attribute. | ||
272 | * <!-- begin-user-doc --> | ||
273 | * <!-- end-user-doc --> | ||
274 | * @generated | ||
275 | * @ordered | ||
276 | */ | ||
277 | int TRAIN__ID = 1; | ||
278 | |||
279 | /** | ||
280 | * The feature id for the '<em><b>Speed</b></em>' attribute. | ||
281 | * <!-- begin-user-doc --> | ||
282 | * <!-- end-user-doc --> | ||
283 | * @generated | ||
284 | * @ordered | ||
285 | */ | ||
286 | int TRAIN__SPEED = 2; | ||
287 | |||
288 | /** | ||
289 | * The number of structural features of the '<em>Train</em>' class. | ||
290 | * <!-- begin-user-doc --> | ||
291 | * <!-- end-user-doc --> | ||
292 | * @generated | ||
293 | * @ordered | ||
294 | */ | ||
295 | int TRAIN_FEATURE_COUNT = 3; | ||
296 | |||
297 | /** | ||
298 | * The number of operations of the '<em>Train</em>' class. | ||
299 | * <!-- begin-user-doc --> | ||
300 | * <!-- end-user-doc --> | ||
301 | * @generated | ||
302 | * @ordered | ||
303 | */ | ||
304 | int TRAIN_OPERATION_COUNT = 0; | ||
305 | |||
306 | |||
307 | /** | ||
308 | * Returns the meta object for class '{@link modes3.Segment <em>Segment</em>}'. | ||
309 | * <!-- begin-user-doc --> | ||
310 | * <!-- end-user-doc --> | ||
311 | * @return the meta object for class '<em>Segment</em>'. | ||
312 | * @see modes3.Segment | ||
313 | * @generated | ||
314 | */ | ||
315 | EClass getSegment(); | ||
316 | |||
317 | /** | ||
318 | * Returns the meta object for the reference list '{@link modes3.Segment#getConnectedTo <em>Connected To</em>}'. | ||
319 | * <!-- begin-user-doc --> | ||
320 | * <!-- end-user-doc --> | ||
321 | * @return the meta object for the reference list '<em>Connected To</em>'. | ||
322 | * @see modes3.Segment#getConnectedTo() | ||
323 | * @see #getSegment() | ||
324 | * @generated | ||
325 | */ | ||
326 | EReference getSegment_ConnectedTo(); | ||
327 | |||
328 | /** | ||
329 | * Returns the meta object for the reference '{@link modes3.Segment#getOccupiedBy <em>Occupied By</em>}'. | ||
330 | * <!-- begin-user-doc --> | ||
331 | * <!-- end-user-doc --> | ||
332 | * @return the meta object for the reference '<em>Occupied By</em>'. | ||
333 | * @see modes3.Segment#getOccupiedBy() | ||
334 | * @see #getSegment() | ||
335 | * @generated | ||
336 | */ | ||
337 | EReference getSegment_OccupiedBy(); | ||
338 | |||
339 | /** | ||
340 | * Returns the meta object for the attribute '{@link modes3.Segment#getId <em>Id</em>}'. | ||
341 | * <!-- begin-user-doc --> | ||
342 | * <!-- end-user-doc --> | ||
343 | * @return the meta object for the attribute '<em>Id</em>'. | ||
344 | * @see modes3.Segment#getId() | ||
345 | * @see #getSegment() | ||
346 | * @generated | ||
347 | */ | ||
348 | EAttribute getSegment_Id(); | ||
349 | |||
350 | /** | ||
351 | * Returns the meta object for class '{@link modes3.Modes3ModelRoot <em>Model Root</em>}'. | ||
352 | * <!-- begin-user-doc --> | ||
353 | * <!-- end-user-doc --> | ||
354 | * @return the meta object for class '<em>Model Root</em>'. | ||
355 | * @see modes3.Modes3ModelRoot | ||
356 | * @generated | ||
357 | */ | ||
358 | EClass getModes3ModelRoot(); | ||
359 | |||
360 | /** | ||
361 | * Returns the meta object for the attribute '{@link modes3.Modes3ModelRoot#getId <em>Id</em>}'. | ||
362 | * <!-- begin-user-doc --> | ||
363 | * <!-- end-user-doc --> | ||
364 | * @return the meta object for the attribute '<em>Id</em>'. | ||
365 | * @see modes3.Modes3ModelRoot#getId() | ||
366 | * @see #getModes3ModelRoot() | ||
367 | * @generated | ||
368 | */ | ||
369 | EAttribute getModes3ModelRoot_Id(); | ||
370 | |||
371 | /** | ||
372 | * Returns the meta object for the containment reference list '{@link modes3.Modes3ModelRoot#getTrains <em>Trains</em>}'. | ||
373 | * <!-- begin-user-doc --> | ||
374 | * <!-- end-user-doc --> | ||
375 | * @return the meta object for the containment reference list '<em>Trains</em>'. | ||
376 | * @see modes3.Modes3ModelRoot#getTrains() | ||
377 | * @see #getModes3ModelRoot() | ||
378 | * @generated | ||
379 | */ | ||
380 | EReference getModes3ModelRoot_Trains(); | ||
381 | |||
382 | /** | ||
383 | * Returns the meta object for the containment reference list '{@link modes3.Modes3ModelRoot#getSegments <em>Segments</em>}'. | ||
384 | * <!-- begin-user-doc --> | ||
385 | * <!-- end-user-doc --> | ||
386 | * @return the meta object for the containment reference list '<em>Segments</em>'. | ||
387 | * @see modes3.Modes3ModelRoot#getSegments() | ||
388 | * @see #getModes3ModelRoot() | ||
389 | * @generated | ||
390 | */ | ||
391 | EReference getModes3ModelRoot_Segments(); | ||
392 | |||
393 | /** | ||
394 | * Returns the meta object for the containment reference list '{@link modes3.Modes3ModelRoot#getTurnouts <em>Turnouts</em>}'. | ||
395 | * <!-- begin-user-doc --> | ||
396 | * <!-- end-user-doc --> | ||
397 | * @return the meta object for the containment reference list '<em>Turnouts</em>'. | ||
398 | * @see modes3.Modes3ModelRoot#getTurnouts() | ||
399 | * @see #getModes3ModelRoot() | ||
400 | * @generated | ||
401 | */ | ||
402 | EReference getModes3ModelRoot_Turnouts(); | ||
403 | |||
404 | /** | ||
405 | * Returns the meta object for class '{@link modes3.Turnout <em>Turnout</em>}'. | ||
406 | * <!-- begin-user-doc --> | ||
407 | * <!-- end-user-doc --> | ||
408 | * @return the meta object for class '<em>Turnout</em>'. | ||
409 | * @see modes3.Turnout | ||
410 | * @generated | ||
411 | */ | ||
412 | EClass getTurnout(); | ||
413 | |||
414 | /** | ||
415 | * Returns the meta object for the reference '{@link modes3.Turnout#getStraight <em>Straight</em>}'. | ||
416 | * <!-- begin-user-doc --> | ||
417 | * <!-- end-user-doc --> | ||
418 | * @return the meta object for the reference '<em>Straight</em>'. | ||
419 | * @see modes3.Turnout#getStraight() | ||
420 | * @see #getTurnout() | ||
421 | * @generated | ||
422 | */ | ||
423 | EReference getTurnout_Straight(); | ||
424 | |||
425 | /** | ||
426 | * Returns the meta object for the reference '{@link modes3.Turnout#getDivergent <em>Divergent</em>}'. | ||
427 | * <!-- begin-user-doc --> | ||
428 | * <!-- end-user-doc --> | ||
429 | * @return the meta object for the reference '<em>Divergent</em>'. | ||
430 | * @see modes3.Turnout#getDivergent() | ||
431 | * @see #getTurnout() | ||
432 | * @generated | ||
433 | */ | ||
434 | EReference getTurnout_Divergent(); | ||
435 | |||
436 | /** | ||
437 | * Returns the meta object for class '{@link modes3.Train <em>Train</em>}'. | ||
438 | * <!-- begin-user-doc --> | ||
439 | * <!-- end-user-doc --> | ||
440 | * @return the meta object for class '<em>Train</em>'. | ||
441 | * @see modes3.Train | ||
442 | * @generated | ||
443 | */ | ||
444 | EClass getTrain(); | ||
445 | |||
446 | /** | ||
447 | * Returns the meta object for the reference '{@link modes3.Train#getLocation <em>Location</em>}'. | ||
448 | * <!-- begin-user-doc --> | ||
449 | * <!-- end-user-doc --> | ||
450 | * @return the meta object for the reference '<em>Location</em>'. | ||
451 | * @see modes3.Train#getLocation() | ||
452 | * @see #getTrain() | ||
453 | * @generated | ||
454 | */ | ||
455 | EReference getTrain_Location(); | ||
456 | |||
457 | /** | ||
458 | * Returns the meta object for the attribute '{@link modes3.Train#getId <em>Id</em>}'. | ||
459 | * <!-- begin-user-doc --> | ||
460 | * <!-- end-user-doc --> | ||
461 | * @return the meta object for the attribute '<em>Id</em>'. | ||
462 | * @see modes3.Train#getId() | ||
463 | * @see #getTrain() | ||
464 | * @generated | ||
465 | */ | ||
466 | EAttribute getTrain_Id(); | ||
467 | |||
468 | /** | ||
469 | * Returns the meta object for the attribute '{@link modes3.Train#getSpeed <em>Speed</em>}'. | ||
470 | * <!-- begin-user-doc --> | ||
471 | * <!-- end-user-doc --> | ||
472 | * @return the meta object for the attribute '<em>Speed</em>'. | ||
473 | * @see modes3.Train#getSpeed() | ||
474 | * @see #getTrain() | ||
475 | * @generated | ||
476 | */ | ||
477 | EAttribute getTrain_Speed(); | ||
478 | |||
479 | /** | ||
480 | * Returns the factory that creates the instances of the model. | ||
481 | * <!-- begin-user-doc --> | ||
482 | * <!-- end-user-doc --> | ||
483 | * @return the factory that creates the instances of the model. | ||
484 | * @generated | ||
485 | */ | ||
486 | Modes3Factory getModes3Factory(); | ||
487 | |||
488 | /** | ||
489 | * <!-- begin-user-doc --> | ||
490 | * Defines literals for the meta objects that represent | ||
491 | * <ul> | ||
492 | * <li>each class,</li> | ||
493 | * <li>each feature of each class,</li> | ||
494 | * <li>each operation of each class,</li> | ||
495 | * <li>each enum,</li> | ||
496 | * <li>and each data type</li> | ||
497 | * </ul> | ||
498 | * <!-- end-user-doc --> | ||
499 | * @generated | ||
500 | */ | ||
501 | interface Literals { | ||
502 | /** | ||
503 | * The meta object literal for the '{@link modes3.impl.SegmentImpl <em>Segment</em>}' class. | ||
504 | * <!-- begin-user-doc --> | ||
505 | * <!-- end-user-doc --> | ||
506 | * @see modes3.impl.SegmentImpl | ||
507 | * @see modes3.impl.Modes3PackageImpl#getSegment() | ||
508 | * @generated | ||
509 | */ | ||
510 | EClass SEGMENT = eINSTANCE.getSegment(); | ||
511 | |||
512 | /** | ||
513 | * The meta object literal for the '<em><b>Connected To</b></em>' reference list feature. | ||
514 | * <!-- begin-user-doc --> | ||
515 | * <!-- end-user-doc --> | ||
516 | * @generated | ||
517 | */ | ||
518 | EReference SEGMENT__CONNECTED_TO = eINSTANCE.getSegment_ConnectedTo(); | ||
519 | |||
520 | /** | ||
521 | * The meta object literal for the '<em><b>Occupied By</b></em>' reference feature. | ||
522 | * <!-- begin-user-doc --> | ||
523 | * <!-- end-user-doc --> | ||
524 | * @generated | ||
525 | */ | ||
526 | EReference SEGMENT__OCCUPIED_BY = eINSTANCE.getSegment_OccupiedBy(); | ||
527 | |||
528 | /** | ||
529 | * The meta object literal for the '<em><b>Id</b></em>' attribute feature. | ||
530 | * <!-- begin-user-doc --> | ||
531 | * <!-- end-user-doc --> | ||
532 | * @generated | ||
533 | */ | ||
534 | EAttribute SEGMENT__ID = eINSTANCE.getSegment_Id(); | ||
535 | |||
536 | /** | ||
537 | * The meta object literal for the '{@link modes3.impl.Modes3ModelRootImpl <em>Model Root</em>}' class. | ||
538 | * <!-- begin-user-doc --> | ||
539 | * <!-- end-user-doc --> | ||
540 | * @see modes3.impl.Modes3ModelRootImpl | ||
541 | * @see modes3.impl.Modes3PackageImpl#getModes3ModelRoot() | ||
542 | * @generated | ||
543 | */ | ||
544 | EClass MODES3_MODEL_ROOT = eINSTANCE.getModes3ModelRoot(); | ||
545 | |||
546 | /** | ||
547 | * The meta object literal for the '<em><b>Id</b></em>' attribute feature. | ||
548 | * <!-- begin-user-doc --> | ||
549 | * <!-- end-user-doc --> | ||
550 | * @generated | ||
551 | */ | ||
552 | EAttribute MODES3_MODEL_ROOT__ID = eINSTANCE.getModes3ModelRoot_Id(); | ||
553 | |||
554 | /** | ||
555 | * The meta object literal for the '<em><b>Trains</b></em>' containment reference list feature. | ||
556 | * <!-- begin-user-doc --> | ||
557 | * <!-- end-user-doc --> | ||
558 | * @generated | ||
559 | */ | ||
560 | EReference MODES3_MODEL_ROOT__TRAINS = eINSTANCE.getModes3ModelRoot_Trains(); | ||
561 | |||
562 | /** | ||
563 | * The meta object literal for the '<em><b>Segments</b></em>' containment reference list feature. | ||
564 | * <!-- begin-user-doc --> | ||
565 | * <!-- end-user-doc --> | ||
566 | * @generated | ||
567 | */ | ||
568 | EReference MODES3_MODEL_ROOT__SEGMENTS = eINSTANCE.getModes3ModelRoot_Segments(); | ||
569 | |||
570 | /** | ||
571 | * The meta object literal for the '<em><b>Turnouts</b></em>' containment reference list feature. | ||
572 | * <!-- begin-user-doc --> | ||
573 | * <!-- end-user-doc --> | ||
574 | * @generated | ||
575 | */ | ||
576 | EReference MODES3_MODEL_ROOT__TURNOUTS = eINSTANCE.getModes3ModelRoot_Turnouts(); | ||
577 | |||
578 | /** | ||
579 | * The meta object literal for the '{@link modes3.impl.TurnoutImpl <em>Turnout</em>}' class. | ||
580 | * <!-- begin-user-doc --> | ||
581 | * <!-- end-user-doc --> | ||
582 | * @see modes3.impl.TurnoutImpl | ||
583 | * @see modes3.impl.Modes3PackageImpl#getTurnout() | ||
584 | * @generated | ||
585 | */ | ||
586 | EClass TURNOUT = eINSTANCE.getTurnout(); | ||
587 | |||
588 | /** | ||
589 | * The meta object literal for the '<em><b>Straight</b></em>' reference feature. | ||
590 | * <!-- begin-user-doc --> | ||
591 | * <!-- end-user-doc --> | ||
592 | * @generated | ||
593 | */ | ||
594 | EReference TURNOUT__STRAIGHT = eINSTANCE.getTurnout_Straight(); | ||
595 | |||
596 | /** | ||
597 | * The meta object literal for the '<em><b>Divergent</b></em>' reference feature. | ||
598 | * <!-- begin-user-doc --> | ||
599 | * <!-- end-user-doc --> | ||
600 | * @generated | ||
601 | */ | ||
602 | EReference TURNOUT__DIVERGENT = eINSTANCE.getTurnout_Divergent(); | ||
603 | |||
604 | /** | ||
605 | * The meta object literal for the '{@link modes3.impl.TrainImpl <em>Train</em>}' class. | ||
606 | * <!-- begin-user-doc --> | ||
607 | * <!-- end-user-doc --> | ||
608 | * @see modes3.impl.TrainImpl | ||
609 | * @see modes3.impl.Modes3PackageImpl#getTrain() | ||
610 | * @generated | ||
611 | */ | ||
612 | EClass TRAIN = eINSTANCE.getTrain(); | ||
613 | |||
614 | /** | ||
615 | * The meta object literal for the '<em><b>Location</b></em>' reference feature. | ||
616 | * <!-- begin-user-doc --> | ||
617 | * <!-- end-user-doc --> | ||
618 | * @generated | ||
619 | */ | ||
620 | EReference TRAIN__LOCATION = eINSTANCE.getTrain_Location(); | ||
621 | |||
622 | /** | ||
623 | * The meta object literal for the '<em><b>Id</b></em>' attribute feature. | ||
624 | * <!-- begin-user-doc --> | ||
625 | * <!-- end-user-doc --> | ||
626 | * @generated | ||
627 | */ | ||
628 | EAttribute TRAIN__ID = eINSTANCE.getTrain_Id(); | ||
629 | |||
630 | /** | ||
631 | * The meta object literal for the '<em><b>Speed</b></em>' attribute feature. | ||
632 | * <!-- begin-user-doc --> | ||
633 | * <!-- end-user-doc --> | ||
634 | * @generated | ||
635 | */ | ||
636 | EAttribute TRAIN__SPEED = eINSTANCE.getTrain_Speed(); | ||
637 | |||
638 | } | ||
639 | |||
640 | } //Modes3Package | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Segment.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Segment.java new file mode 100644 index 00000000..002f25a5 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Segment.java | |||
@@ -0,0 +1,86 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>Segment</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link modes3.Segment#getConnectedTo <em>Connected To</em>}</li> | ||
19 | * <li>{@link modes3.Segment#getOccupiedBy <em>Occupied By</em>}</li> | ||
20 | * <li>{@link modes3.Segment#getId <em>Id</em>}</li> | ||
21 | * </ul> | ||
22 | * | ||
23 | * @see modes3.Modes3Package#getSegment() | ||
24 | * @model | ||
25 | * @generated | ||
26 | */ | ||
27 | public interface Segment extends EObject { | ||
28 | /** | ||
29 | * Returns the value of the '<em><b>Connected To</b></em>' reference list. | ||
30 | * The list contents are of type {@link modes3.Segment}. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @return the value of the '<em>Connected To</em>' reference list. | ||
34 | * @see modes3.Modes3Package#getSegment_ConnectedTo() | ||
35 | * @model upper="2" | ||
36 | * @generated | ||
37 | */ | ||
38 | EList<Segment> getConnectedTo(); | ||
39 | |||
40 | /** | ||
41 | * Returns the value of the '<em><b>Occupied By</b></em>' reference. | ||
42 | * It is bidirectional and its opposite is '{@link modes3.Train#getLocation <em>Location</em>}'. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @return the value of the '<em>Occupied By</em>' reference. | ||
46 | * @see #setOccupiedBy(Train) | ||
47 | * @see modes3.Modes3Package#getSegment_OccupiedBy() | ||
48 | * @see modes3.Train#getLocation | ||
49 | * @model opposite="location" | ||
50 | * @generated | ||
51 | */ | ||
52 | Train getOccupiedBy(); | ||
53 | |||
54 | /** | ||
55 | * Sets the value of the '{@link modes3.Segment#getOccupiedBy <em>Occupied By</em>}' reference. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @param value the new value of the '<em>Occupied By</em>' reference. | ||
59 | * @see #getOccupiedBy() | ||
60 | * @generated | ||
61 | */ | ||
62 | void setOccupiedBy(Train value); | ||
63 | |||
64 | /** | ||
65 | * Returns the value of the '<em><b>Id</b></em>' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @return the value of the '<em>Id</em>' attribute. | ||
69 | * @see #setId(int) | ||
70 | * @see modes3.Modes3Package#getSegment_Id() | ||
71 | * @model | ||
72 | * @generated | ||
73 | */ | ||
74 | int getId(); | ||
75 | |||
76 | /** | ||
77 | * Sets the value of the '{@link modes3.Segment#getId <em>Id</em>}' attribute. | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @param value the new value of the '<em>Id</em>' attribute. | ||
81 | * @see #getId() | ||
82 | * @generated | ||
83 | */ | ||
84 | void setId(int value); | ||
85 | |||
86 | } // Segment | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Train.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Train.java new file mode 100644 index 00000000..1829586d --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Train.java | |||
@@ -0,0 +1,94 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Train</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link modes3.Train#getLocation <em>Location</em>}</li> | ||
17 | * <li>{@link modes3.Train#getId <em>Id</em>}</li> | ||
18 | * <li>{@link modes3.Train#getSpeed <em>Speed</em>}</li> | ||
19 | * </ul> | ||
20 | * | ||
21 | * @see modes3.Modes3Package#getTrain() | ||
22 | * @model | ||
23 | * @generated | ||
24 | */ | ||
25 | public interface Train extends EObject { | ||
26 | /** | ||
27 | * Returns the value of the '<em><b>Location</b></em>' reference. | ||
28 | * It is bidirectional and its opposite is '{@link modes3.Segment#getOccupiedBy <em>Occupied By</em>}'. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <!-- end-user-doc --> | ||
31 | * @return the value of the '<em>Location</em>' reference. | ||
32 | * @see #setLocation(Segment) | ||
33 | * @see modes3.Modes3Package#getTrain_Location() | ||
34 | * @see modes3.Segment#getOccupiedBy | ||
35 | * @model opposite="occupiedBy" required="true" | ||
36 | * @generated | ||
37 | */ | ||
38 | Segment getLocation(); | ||
39 | |||
40 | /** | ||
41 | * Sets the value of the '{@link modes3.Train#getLocation <em>Location</em>}' reference. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @param value the new value of the '<em>Location</em>' reference. | ||
45 | * @see #getLocation() | ||
46 | * @generated | ||
47 | */ | ||
48 | void setLocation(Segment value); | ||
49 | |||
50 | /** | ||
51 | * Returns the value of the '<em><b>Id</b></em>' attribute. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @return the value of the '<em>Id</em>' attribute. | ||
55 | * @see #setId(int) | ||
56 | * @see modes3.Modes3Package#getTrain_Id() | ||
57 | * @model | ||
58 | * @generated | ||
59 | */ | ||
60 | int getId(); | ||
61 | |||
62 | /** | ||
63 | * Sets the value of the '{@link modes3.Train#getId <em>Id</em>}' attribute. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @param value the new value of the '<em>Id</em>' attribute. | ||
67 | * @see #getId() | ||
68 | * @generated | ||
69 | */ | ||
70 | void setId(int value); | ||
71 | |||
72 | /** | ||
73 | * Returns the value of the '<em><b>Speed</b></em>' attribute. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @return the value of the '<em>Speed</em>' attribute. | ||
77 | * @see #setSpeed(double) | ||
78 | * @see modes3.Modes3Package#getTrain_Speed() | ||
79 | * @model | ||
80 | * @generated | ||
81 | */ | ||
82 | double getSpeed(); | ||
83 | |||
84 | /** | ||
85 | * Sets the value of the '{@link modes3.Train#getSpeed <em>Speed</em>}' attribute. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @param value the new value of the '<em>Speed</em>' attribute. | ||
89 | * @see #getSpeed() | ||
90 | * @generated | ||
91 | */ | ||
92 | void setSpeed(double value); | ||
93 | |||
94 | } // Train | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Turnout.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Turnout.java new file mode 100644 index 00000000..799f8d7b --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/Turnout.java | |||
@@ -0,0 +1,68 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3; | ||
4 | |||
5 | |||
6 | /** | ||
7 | * <!-- begin-user-doc --> | ||
8 | * A representation of the model object '<em><b>Turnout</b></em>'. | ||
9 | * <!-- end-user-doc --> | ||
10 | * | ||
11 | * <p> | ||
12 | * The following features are supported: | ||
13 | * </p> | ||
14 | * <ul> | ||
15 | * <li>{@link modes3.Turnout#getStraight <em>Straight</em>}</li> | ||
16 | * <li>{@link modes3.Turnout#getDivergent <em>Divergent</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see modes3.Modes3Package#getTurnout() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface Turnout extends Segment { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Straight</b></em>' reference. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <!-- end-user-doc --> | ||
28 | * @return the value of the '<em>Straight</em>' reference. | ||
29 | * @see #setStraight(Segment) | ||
30 | * @see modes3.Modes3Package#getTurnout_Straight() | ||
31 | * @model required="true" | ||
32 | * @generated | ||
33 | */ | ||
34 | Segment getStraight(); | ||
35 | |||
36 | /** | ||
37 | * Sets the value of the '{@link modes3.Turnout#getStraight <em>Straight</em>}' reference. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @param value the new value of the '<em>Straight</em>' reference. | ||
41 | * @see #getStraight() | ||
42 | * @generated | ||
43 | */ | ||
44 | void setStraight(Segment value); | ||
45 | |||
46 | /** | ||
47 | * Returns the value of the '<em><b>Divergent</b></em>' reference. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @return the value of the '<em>Divergent</em>' reference. | ||
51 | * @see #setDivergent(Segment) | ||
52 | * @see modes3.Modes3Package#getTurnout_Divergent() | ||
53 | * @model required="true" | ||
54 | * @generated | ||
55 | */ | ||
56 | Segment getDivergent(); | ||
57 | |||
58 | /** | ||
59 | * Sets the value of the '{@link modes3.Turnout#getDivergent <em>Divergent</em>}' reference. | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @param value the new value of the '<em>Divergent</em>' reference. | ||
63 | * @see #getDivergent() | ||
64 | * @generated | ||
65 | */ | ||
66 | void setDivergent(Segment value); | ||
67 | |||
68 | } // Turnout | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java new file mode 100644 index 00000000..6ec86cb6 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3FactoryImpl.java | |||
@@ -0,0 +1,128 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import modes3.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Factory</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class Modes3FactoryImpl extends EFactoryImpl implements Modes3Factory { | ||
22 | /** | ||
23 | * Creates the default factory implementation. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @generated | ||
27 | */ | ||
28 | public static Modes3Factory init() { | ||
29 | try { | ||
30 | Modes3Factory theModes3Factory = (Modes3Factory)EPackage.Registry.INSTANCE.getEFactory(Modes3Package.eNS_URI); | ||
31 | if (theModes3Factory != null) { | ||
32 | return theModes3Factory; | ||
33 | } | ||
34 | } | ||
35 | catch (Exception exception) { | ||
36 | EcorePlugin.INSTANCE.log(exception); | ||
37 | } | ||
38 | return new Modes3FactoryImpl(); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Creates an instance of the factory. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | public Modes3FactoryImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | public EObject create(EClass eClass) { | ||
58 | switch (eClass.getClassifierID()) { | ||
59 | case Modes3Package.SEGMENT: return createSegment(); | ||
60 | case Modes3Package.MODES3_MODEL_ROOT: return createModes3ModelRoot(); | ||
61 | case Modes3Package.TURNOUT: return createTurnout(); | ||
62 | case Modes3Package.TRAIN: return createTrain(); | ||
63 | default: | ||
64 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | public Segment createSegment() { | ||
74 | SegmentImpl segment = new SegmentImpl(); | ||
75 | return segment; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public Modes3ModelRoot createModes3ModelRoot() { | ||
84 | Modes3ModelRootImpl modes3ModelRoot = new Modes3ModelRootImpl(); | ||
85 | return modes3ModelRoot; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public Turnout createTurnout() { | ||
94 | TurnoutImpl turnout = new TurnoutImpl(); | ||
95 | return turnout; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | public Train createTrain() { | ||
104 | TrainImpl train = new TrainImpl(); | ||
105 | return train; | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | public Modes3Package getModes3Package() { | ||
114 | return (Modes3Package)getEPackage(); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @deprecated | ||
121 | * @generated | ||
122 | */ | ||
123 | @Deprecated | ||
124 | public static Modes3Package getPackage() { | ||
125 | return Modes3Package.eINSTANCE; | ||
126 | } | ||
127 | |||
128 | } //Modes3FactoryImpl | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java new file mode 100644 index 00000000..d1ee25ff --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/Modes3ModelRootImpl.java | |||
@@ -0,0 +1,296 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import modes3.Modes3ModelRoot; | ||
8 | import modes3.Modes3Package; | ||
9 | import modes3.Segment; | ||
10 | import modes3.Train; | ||
11 | import modes3.Turnout; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
14 | import org.eclipse.emf.common.notify.NotificationChain; | ||
15 | |||
16 | import org.eclipse.emf.common.util.EList; | ||
17 | |||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.emf.ecore.InternalEObject; | ||
20 | |||
21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
22 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
23 | |||
24 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
25 | import org.eclipse.emf.ecore.util.InternalEList; | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * An implementation of the model object '<em><b>Model Root</b></em>'. | ||
30 | * <!-- end-user-doc --> | ||
31 | * <p> | ||
32 | * The following features are implemented: | ||
33 | * </p> | ||
34 | * <ul> | ||
35 | * <li>{@link modes3.impl.Modes3ModelRootImpl#getId <em>Id</em>}</li> | ||
36 | * <li>{@link modes3.impl.Modes3ModelRootImpl#getTrains <em>Trains</em>}</li> | ||
37 | * <li>{@link modes3.impl.Modes3ModelRootImpl#getSegments <em>Segments</em>}</li> | ||
38 | * <li>{@link modes3.impl.Modes3ModelRootImpl#getTurnouts <em>Turnouts</em>}</li> | ||
39 | * </ul> | ||
40 | * | ||
41 | * @generated | ||
42 | */ | ||
43 | public class Modes3ModelRootImpl extends MinimalEObjectImpl.Container implements Modes3ModelRoot { | ||
44 | /** | ||
45 | * The default value of the '{@link #getId() <em>Id</em>}' attribute. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getId() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected static final int ID_EDEFAULT = 0; | ||
53 | |||
54 | /** | ||
55 | * The cached value of the '{@link #getId() <em>Id</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #getId() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected int id = ID_EDEFAULT; | ||
63 | |||
64 | /** | ||
65 | * The cached value of the '{@link #getTrains() <em>Trains</em>}' containment reference list. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #getTrains() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected EList<Train> trains; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #getSegments() <em>Segments</em>}' containment reference list. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getSegments() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected EList<Segment> segments; | ||
83 | |||
84 | /** | ||
85 | * The cached value of the '{@link #getTurnouts() <em>Turnouts</em>}' containment reference list. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @see #getTurnouts() | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | protected EList<Turnout> turnouts; | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | protected Modes3ModelRootImpl() { | ||
100 | super(); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | protected EClass eStaticClass() { | ||
110 | return Modes3Package.Literals.MODES3_MODEL_ROOT; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public int getId() { | ||
119 | return id; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public void setId(int newId) { | ||
128 | int oldId = id; | ||
129 | id = newId; | ||
130 | if (eNotificationRequired()) | ||
131 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.MODES3_MODEL_ROOT__ID, oldId, id)); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | public EList<Train> getTrains() { | ||
140 | if (trains == null) { | ||
141 | trains = new EObjectContainmentEList<Train>(Train.class, this, Modes3Package.MODES3_MODEL_ROOT__TRAINS); | ||
142 | } | ||
143 | return trains; | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | public EList<Segment> getSegments() { | ||
152 | if (segments == null) { | ||
153 | segments = new EObjectContainmentEList<Segment>(Segment.class, this, Modes3Package.MODES3_MODEL_ROOT__SEGMENTS); | ||
154 | } | ||
155 | return segments; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | public EList<Turnout> getTurnouts() { | ||
164 | if (turnouts == null) { | ||
165 | turnouts = new EObjectContainmentEList<Turnout>(Turnout.class, this, Modes3Package.MODES3_MODEL_ROOT__TURNOUTS); | ||
166 | } | ||
167 | return turnouts; | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | @Override | ||
176 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
177 | switch (featureID) { | ||
178 | case Modes3Package.MODES3_MODEL_ROOT__TRAINS: | ||
179 | return ((InternalEList<?>)getTrains()).basicRemove(otherEnd, msgs); | ||
180 | case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: | ||
181 | return ((InternalEList<?>)getSegments()).basicRemove(otherEnd, msgs); | ||
182 | case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: | ||
183 | return ((InternalEList<?>)getTurnouts()).basicRemove(otherEnd, msgs); | ||
184 | } | ||
185 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | @Override | ||
194 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
195 | switch (featureID) { | ||
196 | case Modes3Package.MODES3_MODEL_ROOT__ID: | ||
197 | return getId(); | ||
198 | case Modes3Package.MODES3_MODEL_ROOT__TRAINS: | ||
199 | return getTrains(); | ||
200 | case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: | ||
201 | return getSegments(); | ||
202 | case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: | ||
203 | return getTurnouts(); | ||
204 | } | ||
205 | return super.eGet(featureID, resolve, coreType); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @SuppressWarnings("unchecked") | ||
214 | @Override | ||
215 | public void eSet(int featureID, Object newValue) { | ||
216 | switch (featureID) { | ||
217 | case Modes3Package.MODES3_MODEL_ROOT__ID: | ||
218 | setId((Integer)newValue); | ||
219 | return; | ||
220 | case Modes3Package.MODES3_MODEL_ROOT__TRAINS: | ||
221 | getTrains().clear(); | ||
222 | getTrains().addAll((Collection<? extends Train>)newValue); | ||
223 | return; | ||
224 | case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: | ||
225 | getSegments().clear(); | ||
226 | getSegments().addAll((Collection<? extends Segment>)newValue); | ||
227 | return; | ||
228 | case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: | ||
229 | getTurnouts().clear(); | ||
230 | getTurnouts().addAll((Collection<? extends Turnout>)newValue); | ||
231 | return; | ||
232 | } | ||
233 | super.eSet(featureID, newValue); | ||
234 | } | ||
235 | |||
236 | /** | ||
237 | * <!-- begin-user-doc --> | ||
238 | * <!-- end-user-doc --> | ||
239 | * @generated | ||
240 | */ | ||
241 | @Override | ||
242 | public void eUnset(int featureID) { | ||
243 | switch (featureID) { | ||
244 | case Modes3Package.MODES3_MODEL_ROOT__ID: | ||
245 | setId(ID_EDEFAULT); | ||
246 | return; | ||
247 | case Modes3Package.MODES3_MODEL_ROOT__TRAINS: | ||
248 | getTrains().clear(); | ||
249 | return; | ||
250 | case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: | ||
251 | getSegments().clear(); | ||
252 | return; | ||
253 | case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: | ||
254 | getTurnouts().clear(); | ||
255 | return; | ||
256 | } | ||
257 | super.eUnset(featureID); | ||
258 | } | ||
259 | |||
260 | /** | ||
261 | * <!-- begin-user-doc --> | ||
262 | * <!-- end-user-doc --> | ||
263 | * @generated | ||
264 | */ | ||
265 | @Override | ||
266 | public boolean eIsSet(int featureID) { | ||
267 | switch (featureID) { | ||
268 | case Modes3Package.MODES3_MODEL_ROOT__ID: | ||
269 | return id != ID_EDEFAULT; | ||
270 | case Modes3Package.MODES3_MODEL_ROOT__TRAINS: | ||
271 | return trains != null && !trains.isEmpty(); | ||
272 | case Modes3Package.MODES3_MODEL_ROOT__SEGMENTS: | ||
273 | return segments != null && !segments.isEmpty(); | ||
274 | case Modes3Package.MODES3_MODEL_ROOT__TURNOUTS: | ||
275 | return turnouts != null && !turnouts.isEmpty(); | ||
276 | } | ||
277 | return super.eIsSet(featureID); | ||
278 | } | ||
279 | |||
280 | /** | ||
281 | * <!-- begin-user-doc --> | ||
282 | * <!-- end-user-doc --> | ||
283 | * @generated | ||
284 | */ | ||
285 | @Override | ||
286 | public String toString() { | ||
287 | if (eIsProxy()) return super.toString(); | ||
288 | |||
289 | StringBuilder result = new StringBuilder(super.toString()); | ||
290 | result.append(" (id: "); | ||
291 | result.append(id); | ||
292 | result.append(')'); | ||
293 | return result.toString(); | ||
294 | } | ||
295 | |||
296 | } //Modes3ModelRootImpl | ||
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 | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SegmentImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SegmentImpl.java new file mode 100644 index 00000000..905bcec1 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/SegmentImpl.java | |||
@@ -0,0 +1,319 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import modes3.Modes3Package; | ||
8 | import modes3.Segment; | ||
9 | import modes3.Train; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.Notification; | ||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Segment</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link modes3.impl.SegmentImpl#getConnectedTo <em>Connected To</em>}</li> | ||
33 | * <li>{@link modes3.impl.SegmentImpl#getOccupiedBy <em>Occupied By</em>}</li> | ||
34 | * <li>{@link modes3.impl.SegmentImpl#getId <em>Id</em>}</li> | ||
35 | * </ul> | ||
36 | * | ||
37 | * @generated | ||
38 | */ | ||
39 | public class SegmentImpl extends MinimalEObjectImpl.Container implements Segment { | ||
40 | /** | ||
41 | * The cached value of the '{@link #getConnectedTo() <em>Connected To</em>}' reference list. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @see #getConnectedTo() | ||
45 | * @generated | ||
46 | * @ordered | ||
47 | */ | ||
48 | protected EList<Segment> connectedTo; | ||
49 | |||
50 | /** | ||
51 | * The cached value of the '{@link #getOccupiedBy() <em>Occupied By</em>}' reference. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @see #getOccupiedBy() | ||
55 | * @generated | ||
56 | * @ordered | ||
57 | */ | ||
58 | protected Train occupiedBy; | ||
59 | |||
60 | /** | ||
61 | * The default value of the '{@link #getId() <em>Id</em>}' attribute. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @see #getId() | ||
65 | * @generated | ||
66 | * @ordered | ||
67 | */ | ||
68 | protected static final int ID_EDEFAULT = 0; | ||
69 | |||
70 | /** | ||
71 | * The cached value of the '{@link #getId() <em>Id</em>}' attribute. | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @see #getId() | ||
75 | * @generated | ||
76 | * @ordered | ||
77 | */ | ||
78 | protected int id = ID_EDEFAULT; | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | protected SegmentImpl() { | ||
86 | super(); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | protected EClass eStaticClass() { | ||
96 | return Modes3Package.Literals.SEGMENT; | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | public EList<Segment> getConnectedTo() { | ||
105 | if (connectedTo == null) { | ||
106 | connectedTo = new EObjectResolvingEList<Segment>(Segment.class, this, Modes3Package.SEGMENT__CONNECTED_TO); | ||
107 | } | ||
108 | return connectedTo; | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | public Train getOccupiedBy() { | ||
117 | if (occupiedBy != null && occupiedBy.eIsProxy()) { | ||
118 | InternalEObject oldOccupiedBy = (InternalEObject)occupiedBy; | ||
119 | occupiedBy = (Train)eResolveProxy(oldOccupiedBy); | ||
120 | if (occupiedBy != oldOccupiedBy) { | ||
121 | if (eNotificationRequired()) | ||
122 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, Modes3Package.SEGMENT__OCCUPIED_BY, oldOccupiedBy, occupiedBy)); | ||
123 | } | ||
124 | } | ||
125 | return occupiedBy; | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @generated | ||
132 | */ | ||
133 | public Train basicGetOccupiedBy() { | ||
134 | return occupiedBy; | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * <!-- begin-user-doc --> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @generated | ||
141 | */ | ||
142 | public NotificationChain basicSetOccupiedBy(Train newOccupiedBy, NotificationChain msgs) { | ||
143 | Train oldOccupiedBy = occupiedBy; | ||
144 | occupiedBy = newOccupiedBy; | ||
145 | if (eNotificationRequired()) { | ||
146 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Modes3Package.SEGMENT__OCCUPIED_BY, oldOccupiedBy, newOccupiedBy); | ||
147 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
148 | } | ||
149 | return msgs; | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | public void setOccupiedBy(Train newOccupiedBy) { | ||
158 | if (newOccupiedBy != occupiedBy) { | ||
159 | NotificationChain msgs = null; | ||
160 | if (occupiedBy != null) | ||
161 | msgs = ((InternalEObject)occupiedBy).eInverseRemove(this, Modes3Package.TRAIN__LOCATION, Train.class, msgs); | ||
162 | if (newOccupiedBy != null) | ||
163 | msgs = ((InternalEObject)newOccupiedBy).eInverseAdd(this, Modes3Package.TRAIN__LOCATION, Train.class, msgs); | ||
164 | msgs = basicSetOccupiedBy(newOccupiedBy, msgs); | ||
165 | if (msgs != null) msgs.dispatch(); | ||
166 | } | ||
167 | else if (eNotificationRequired()) | ||
168 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.SEGMENT__OCCUPIED_BY, newOccupiedBy, newOccupiedBy)); | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | */ | ||
176 | public int getId() { | ||
177 | return id; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | public void setId(int newId) { | ||
186 | int oldId = id; | ||
187 | id = newId; | ||
188 | if (eNotificationRequired()) | ||
189 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.SEGMENT__ID, oldId, id)); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | @Override | ||
198 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
199 | switch (featureID) { | ||
200 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
201 | if (occupiedBy != null) | ||
202 | msgs = ((InternalEObject)occupiedBy).eInverseRemove(this, Modes3Package.TRAIN__LOCATION, Train.class, msgs); | ||
203 | return basicSetOccupiedBy((Train)otherEnd, msgs); | ||
204 | } | ||
205 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @Override | ||
214 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
215 | switch (featureID) { | ||
216 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
217 | return basicSetOccupiedBy(null, msgs); | ||
218 | } | ||
219 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
220 | } | ||
221 | |||
222 | /** | ||
223 | * <!-- begin-user-doc --> | ||
224 | * <!-- end-user-doc --> | ||
225 | * @generated | ||
226 | */ | ||
227 | @Override | ||
228 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
229 | switch (featureID) { | ||
230 | case Modes3Package.SEGMENT__CONNECTED_TO: | ||
231 | return getConnectedTo(); | ||
232 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
233 | if (resolve) return getOccupiedBy(); | ||
234 | return basicGetOccupiedBy(); | ||
235 | case Modes3Package.SEGMENT__ID: | ||
236 | return getId(); | ||
237 | } | ||
238 | return super.eGet(featureID, resolve, coreType); | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * <!-- begin-user-doc --> | ||
243 | * <!-- end-user-doc --> | ||
244 | * @generated | ||
245 | */ | ||
246 | @SuppressWarnings("unchecked") | ||
247 | @Override | ||
248 | public void eSet(int featureID, Object newValue) { | ||
249 | switch (featureID) { | ||
250 | case Modes3Package.SEGMENT__CONNECTED_TO: | ||
251 | getConnectedTo().clear(); | ||
252 | getConnectedTo().addAll((Collection<? extends Segment>)newValue); | ||
253 | return; | ||
254 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
255 | setOccupiedBy((Train)newValue); | ||
256 | return; | ||
257 | case Modes3Package.SEGMENT__ID: | ||
258 | setId((Integer)newValue); | ||
259 | return; | ||
260 | } | ||
261 | super.eSet(featureID, newValue); | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * <!-- begin-user-doc --> | ||
266 | * <!-- end-user-doc --> | ||
267 | * @generated | ||
268 | */ | ||
269 | @Override | ||
270 | public void eUnset(int featureID) { | ||
271 | switch (featureID) { | ||
272 | case Modes3Package.SEGMENT__CONNECTED_TO: | ||
273 | getConnectedTo().clear(); | ||
274 | return; | ||
275 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
276 | setOccupiedBy((Train)null); | ||
277 | return; | ||
278 | case Modes3Package.SEGMENT__ID: | ||
279 | setId(ID_EDEFAULT); | ||
280 | return; | ||
281 | } | ||
282 | super.eUnset(featureID); | ||
283 | } | ||
284 | |||
285 | /** | ||
286 | * <!-- begin-user-doc --> | ||
287 | * <!-- end-user-doc --> | ||
288 | * @generated | ||
289 | */ | ||
290 | @Override | ||
291 | public boolean eIsSet(int featureID) { | ||
292 | switch (featureID) { | ||
293 | case Modes3Package.SEGMENT__CONNECTED_TO: | ||
294 | return connectedTo != null && !connectedTo.isEmpty(); | ||
295 | case Modes3Package.SEGMENT__OCCUPIED_BY: | ||
296 | return occupiedBy != null; | ||
297 | case Modes3Package.SEGMENT__ID: | ||
298 | return id != ID_EDEFAULT; | ||
299 | } | ||
300 | return super.eIsSet(featureID); | ||
301 | } | ||
302 | |||
303 | /** | ||
304 | * <!-- begin-user-doc --> | ||
305 | * <!-- end-user-doc --> | ||
306 | * @generated | ||
307 | */ | ||
308 | @Override | ||
309 | public String toString() { | ||
310 | if (eIsProxy()) return super.toString(); | ||
311 | |||
312 | StringBuilder result = new StringBuilder(super.toString()); | ||
313 | result.append(" (id: "); | ||
314 | result.append(id); | ||
315 | result.append(')'); | ||
316 | return result.toString(); | ||
317 | } | ||
318 | |||
319 | } //SegmentImpl | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TrainImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TrainImpl.java new file mode 100644 index 00000000..f096dca8 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TrainImpl.java | |||
@@ -0,0 +1,332 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import modes3.Modes3Package; | ||
6 | import modes3.Segment; | ||
7 | import modes3.Train; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Train</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link modes3.impl.TrainImpl#getLocation <em>Location</em>}</li> | ||
27 | * <li>{@link modes3.impl.TrainImpl#getId <em>Id</em>}</li> | ||
28 | * <li>{@link modes3.impl.TrainImpl#getSpeed <em>Speed</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class TrainImpl extends MinimalEObjectImpl.Container implements Train { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getLocation() <em>Location</em>}' reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getLocation() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Segment location; | ||
43 | |||
44 | /** | ||
45 | * The default value of the '{@link #getId() <em>Id</em>}' attribute. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getId() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected static final int ID_EDEFAULT = 0; | ||
53 | |||
54 | /** | ||
55 | * The cached value of the '{@link #getId() <em>Id</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #getId() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected int id = ID_EDEFAULT; | ||
63 | |||
64 | /** | ||
65 | * The default value of the '{@link #getSpeed() <em>Speed</em>}' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #getSpeed() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected static final double SPEED_EDEFAULT = 0.0; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #getSpeed() <em>Speed</em>}' attribute. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getSpeed() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected double speed = SPEED_EDEFAULT; | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | protected TrainImpl() { | ||
90 | super(); | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | @Override | ||
99 | protected EClass eStaticClass() { | ||
100 | return Modes3Package.Literals.TRAIN; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public Segment getLocation() { | ||
109 | if (location != null && location.eIsProxy()) { | ||
110 | InternalEObject oldLocation = (InternalEObject)location; | ||
111 | location = (Segment)eResolveProxy(oldLocation); | ||
112 | if (location != oldLocation) { | ||
113 | if (eNotificationRequired()) | ||
114 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, Modes3Package.TRAIN__LOCATION, oldLocation, location)); | ||
115 | } | ||
116 | } | ||
117 | return location; | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | public Segment basicGetLocation() { | ||
126 | return location; | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | public NotificationChain basicSetLocation(Segment newLocation, NotificationChain msgs) { | ||
135 | Segment oldLocation = location; | ||
136 | location = newLocation; | ||
137 | if (eNotificationRequired()) { | ||
138 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Modes3Package.TRAIN__LOCATION, oldLocation, newLocation); | ||
139 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
140 | } | ||
141 | return msgs; | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | public void setLocation(Segment newLocation) { | ||
150 | if (newLocation != location) { | ||
151 | NotificationChain msgs = null; | ||
152 | if (location != null) | ||
153 | msgs = ((InternalEObject)location).eInverseRemove(this, Modes3Package.SEGMENT__OCCUPIED_BY, Segment.class, msgs); | ||
154 | if (newLocation != null) | ||
155 | msgs = ((InternalEObject)newLocation).eInverseAdd(this, Modes3Package.SEGMENT__OCCUPIED_BY, Segment.class, msgs); | ||
156 | msgs = basicSetLocation(newLocation, msgs); | ||
157 | if (msgs != null) msgs.dispatch(); | ||
158 | } | ||
159 | else if (eNotificationRequired()) | ||
160 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.TRAIN__LOCATION, newLocation, newLocation)); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | public int getId() { | ||
169 | return id; | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @generated | ||
176 | */ | ||
177 | public void setId(int newId) { | ||
178 | int oldId = id; | ||
179 | id = newId; | ||
180 | if (eNotificationRequired()) | ||
181 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.TRAIN__ID, oldId, id)); | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | public double getSpeed() { | ||
190 | return speed; | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * <!-- begin-user-doc --> | ||
195 | * <!-- end-user-doc --> | ||
196 | * @generated | ||
197 | */ | ||
198 | public void setSpeed(double newSpeed) { | ||
199 | double oldSpeed = speed; | ||
200 | speed = newSpeed; | ||
201 | if (eNotificationRequired()) | ||
202 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.TRAIN__SPEED, oldSpeed, speed)); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | @Override | ||
211 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
212 | switch (featureID) { | ||
213 | case Modes3Package.TRAIN__LOCATION: | ||
214 | if (location != null) | ||
215 | msgs = ((InternalEObject)location).eInverseRemove(this, Modes3Package.SEGMENT__OCCUPIED_BY, Segment.class, msgs); | ||
216 | return basicSetLocation((Segment)otherEnd, msgs); | ||
217 | } | ||
218 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
219 | } | ||
220 | |||
221 | /** | ||
222 | * <!-- begin-user-doc --> | ||
223 | * <!-- end-user-doc --> | ||
224 | * @generated | ||
225 | */ | ||
226 | @Override | ||
227 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
228 | switch (featureID) { | ||
229 | case Modes3Package.TRAIN__LOCATION: | ||
230 | return basicSetLocation(null, msgs); | ||
231 | } | ||
232 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @Override | ||
241 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
242 | switch (featureID) { | ||
243 | case Modes3Package.TRAIN__LOCATION: | ||
244 | if (resolve) return getLocation(); | ||
245 | return basicGetLocation(); | ||
246 | case Modes3Package.TRAIN__ID: | ||
247 | return getId(); | ||
248 | case Modes3Package.TRAIN__SPEED: | ||
249 | return getSpeed(); | ||
250 | } | ||
251 | return super.eGet(featureID, resolve, coreType); | ||
252 | } | ||
253 | |||
254 | /** | ||
255 | * <!-- begin-user-doc --> | ||
256 | * <!-- end-user-doc --> | ||
257 | * @generated | ||
258 | */ | ||
259 | @Override | ||
260 | public void eSet(int featureID, Object newValue) { | ||
261 | switch (featureID) { | ||
262 | case Modes3Package.TRAIN__LOCATION: | ||
263 | setLocation((Segment)newValue); | ||
264 | return; | ||
265 | case Modes3Package.TRAIN__ID: | ||
266 | setId((Integer)newValue); | ||
267 | return; | ||
268 | case Modes3Package.TRAIN__SPEED: | ||
269 | setSpeed((Double)newValue); | ||
270 | return; | ||
271 | } | ||
272 | super.eSet(featureID, newValue); | ||
273 | } | ||
274 | |||
275 | /** | ||
276 | * <!-- begin-user-doc --> | ||
277 | * <!-- end-user-doc --> | ||
278 | * @generated | ||
279 | */ | ||
280 | @Override | ||
281 | public void eUnset(int featureID) { | ||
282 | switch (featureID) { | ||
283 | case Modes3Package.TRAIN__LOCATION: | ||
284 | setLocation((Segment)null); | ||
285 | return; | ||
286 | case Modes3Package.TRAIN__ID: | ||
287 | setId(ID_EDEFAULT); | ||
288 | return; | ||
289 | case Modes3Package.TRAIN__SPEED: | ||
290 | setSpeed(SPEED_EDEFAULT); | ||
291 | return; | ||
292 | } | ||
293 | super.eUnset(featureID); | ||
294 | } | ||
295 | |||
296 | /** | ||
297 | * <!-- begin-user-doc --> | ||
298 | * <!-- end-user-doc --> | ||
299 | * @generated | ||
300 | */ | ||
301 | @Override | ||
302 | public boolean eIsSet(int featureID) { | ||
303 | switch (featureID) { | ||
304 | case Modes3Package.TRAIN__LOCATION: | ||
305 | return location != null; | ||
306 | case Modes3Package.TRAIN__ID: | ||
307 | return id != ID_EDEFAULT; | ||
308 | case Modes3Package.TRAIN__SPEED: | ||
309 | return speed != SPEED_EDEFAULT; | ||
310 | } | ||
311 | return super.eIsSet(featureID); | ||
312 | } | ||
313 | |||
314 | /** | ||
315 | * <!-- begin-user-doc --> | ||
316 | * <!-- end-user-doc --> | ||
317 | * @generated | ||
318 | */ | ||
319 | @Override | ||
320 | public String toString() { | ||
321 | if (eIsProxy()) return super.toString(); | ||
322 | |||
323 | StringBuilder result = new StringBuilder(super.toString()); | ||
324 | result.append(" (id: "); | ||
325 | result.append(id); | ||
326 | result.append(", speed: "); | ||
327 | result.append(speed); | ||
328 | result.append(')'); | ||
329 | return result.toString(); | ||
330 | } | ||
331 | |||
332 | } //TrainImpl | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TurnoutImpl.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TurnoutImpl.java new file mode 100644 index 00000000..d20a104e --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/impl/TurnoutImpl.java | |||
@@ -0,0 +1,216 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.impl; | ||
4 | |||
5 | import modes3.Modes3Package; | ||
6 | import modes3.Segment; | ||
7 | import modes3.Turnout; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | import org.eclipse.emf.ecore.InternalEObject; | ||
13 | |||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model object '<em><b>Turnout</b></em>'. | ||
19 | * <!-- end-user-doc --> | ||
20 | * <p> | ||
21 | * The following features are implemented: | ||
22 | * </p> | ||
23 | * <ul> | ||
24 | * <li>{@link modes3.impl.TurnoutImpl#getStraight <em>Straight</em>}</li> | ||
25 | * <li>{@link modes3.impl.TurnoutImpl#getDivergent <em>Divergent</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class TurnoutImpl extends SegmentImpl implements Turnout { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getStraight() <em>Straight</em>}' reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getStraight() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Segment straight; | ||
40 | |||
41 | /** | ||
42 | * The cached value of the '{@link #getDivergent() <em>Divergent</em>}' reference. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getDivergent() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected Segment divergent; | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | protected TurnoutImpl() { | ||
57 | super(); | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | protected EClass eStaticClass() { | ||
67 | return Modes3Package.Literals.TURNOUT; | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | public Segment getStraight() { | ||
76 | if (straight != null && straight.eIsProxy()) { | ||
77 | InternalEObject oldStraight = (InternalEObject)straight; | ||
78 | straight = (Segment)eResolveProxy(oldStraight); | ||
79 | if (straight != oldStraight) { | ||
80 | if (eNotificationRequired()) | ||
81 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, Modes3Package.TURNOUT__STRAIGHT, oldStraight, straight)); | ||
82 | } | ||
83 | } | ||
84 | return straight; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | public Segment basicGetStraight() { | ||
93 | return straight; | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @generated | ||
100 | */ | ||
101 | public void setStraight(Segment newStraight) { | ||
102 | Segment oldStraight = straight; | ||
103 | straight = newStraight; | ||
104 | if (eNotificationRequired()) | ||
105 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.TURNOUT__STRAIGHT, oldStraight, straight)); | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | public Segment getDivergent() { | ||
114 | if (divergent != null && divergent.eIsProxy()) { | ||
115 | InternalEObject oldDivergent = (InternalEObject)divergent; | ||
116 | divergent = (Segment)eResolveProxy(oldDivergent); | ||
117 | if (divergent != oldDivergent) { | ||
118 | if (eNotificationRequired()) | ||
119 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, Modes3Package.TURNOUT__DIVERGENT, oldDivergent, divergent)); | ||
120 | } | ||
121 | } | ||
122 | return divergent; | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | public Segment basicGetDivergent() { | ||
131 | return divergent; | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | public void setDivergent(Segment newDivergent) { | ||
140 | Segment oldDivergent = divergent; | ||
141 | divergent = newDivergent; | ||
142 | if (eNotificationRequired()) | ||
143 | eNotify(new ENotificationImpl(this, Notification.SET, Modes3Package.TURNOUT__DIVERGENT, oldDivergent, divergent)); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
153 | switch (featureID) { | ||
154 | case Modes3Package.TURNOUT__STRAIGHT: | ||
155 | if (resolve) return getStraight(); | ||
156 | return basicGetStraight(); | ||
157 | case Modes3Package.TURNOUT__DIVERGENT: | ||
158 | if (resolve) return getDivergent(); | ||
159 | return basicGetDivergent(); | ||
160 | } | ||
161 | return super.eGet(featureID, resolve, coreType); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public void eSet(int featureID, Object newValue) { | ||
171 | switch (featureID) { | ||
172 | case Modes3Package.TURNOUT__STRAIGHT: | ||
173 | setStraight((Segment)newValue); | ||
174 | return; | ||
175 | case Modes3Package.TURNOUT__DIVERGENT: | ||
176 | setDivergent((Segment)newValue); | ||
177 | return; | ||
178 | } | ||
179 | super.eSet(featureID, newValue); | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @Override | ||
188 | public void eUnset(int featureID) { | ||
189 | switch (featureID) { | ||
190 | case Modes3Package.TURNOUT__STRAIGHT: | ||
191 | setStraight((Segment)null); | ||
192 | return; | ||
193 | case Modes3Package.TURNOUT__DIVERGENT: | ||
194 | setDivergent((Segment)null); | ||
195 | return; | ||
196 | } | ||
197 | super.eUnset(featureID); | ||
198 | } | ||
199 | |||
200 | /** | ||
201 | * <!-- begin-user-doc --> | ||
202 | * <!-- end-user-doc --> | ||
203 | * @generated | ||
204 | */ | ||
205 | @Override | ||
206 | public boolean eIsSet(int featureID) { | ||
207 | switch (featureID) { | ||
208 | case Modes3Package.TURNOUT__STRAIGHT: | ||
209 | return straight != null; | ||
210 | case Modes3Package.TURNOUT__DIVERGENT: | ||
211 | return divergent != null; | ||
212 | } | ||
213 | return super.eIsSet(featureID); | ||
214 | } | ||
215 | |||
216 | } //TurnoutImpl | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java new file mode 100644 index 00000000..86568e9d --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3AdapterFactory.java | |||
@@ -0,0 +1,174 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.util; | ||
4 | |||
5 | import modes3.*; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Adapter; | ||
8 | import org.eclipse.emf.common.notify.Notifier; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EObject; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * The <b>Adapter Factory</b> for the model. | ||
17 | * It provides an adapter <code>createXXX</code> method for each class of the model. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @see modes3.Modes3Package | ||
20 | * @generated | ||
21 | */ | ||
22 | public class Modes3AdapterFactory extends AdapterFactoryImpl { | ||
23 | /** | ||
24 | * The cached model package. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @generated | ||
28 | */ | ||
29 | protected static Modes3Package modelPackage; | ||
30 | |||
31 | /** | ||
32 | * Creates an instance of the adapter factory. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @generated | ||
36 | */ | ||
37 | public Modes3AdapterFactory() { | ||
38 | if (modelPackage == null) { | ||
39 | modelPackage = Modes3Package.eINSTANCE; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * Returns whether this factory is applicable for the type of the object. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. | ||
47 | * <!-- end-user-doc --> | ||
48 | * @return whether this factory is applicable for the type of the object. | ||
49 | * @generated | ||
50 | */ | ||
51 | @Override | ||
52 | public boolean isFactoryForType(Object object) { | ||
53 | if (object == modelPackage) { | ||
54 | return true; | ||
55 | } | ||
56 | if (object instanceof EObject) { | ||
57 | return ((EObject)object).eClass().getEPackage() == modelPackage; | ||
58 | } | ||
59 | return false; | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * The switch that delegates to the <code>createXXX</code> methods. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | protected Modes3Switch<Adapter> modelSwitch = | ||
69 | new Modes3Switch<Adapter>() { | ||
70 | @Override | ||
71 | public Adapter caseSegment(Segment object) { | ||
72 | return createSegmentAdapter(); | ||
73 | } | ||
74 | @Override | ||
75 | public Adapter caseModes3ModelRoot(Modes3ModelRoot object) { | ||
76 | return createModes3ModelRootAdapter(); | ||
77 | } | ||
78 | @Override | ||
79 | public Adapter caseTurnout(Turnout object) { | ||
80 | return createTurnoutAdapter(); | ||
81 | } | ||
82 | @Override | ||
83 | public Adapter caseTrain(Train object) { | ||
84 | return createTrainAdapter(); | ||
85 | } | ||
86 | @Override | ||
87 | public Adapter defaultCase(EObject object) { | ||
88 | return createEObjectAdapter(); | ||
89 | } | ||
90 | }; | ||
91 | |||
92 | /** | ||
93 | * Creates an adapter for the <code>target</code>. | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @param target the object to adapt. | ||
97 | * @return the adapter for the <code>target</code>. | ||
98 | * @generated | ||
99 | */ | ||
100 | @Override | ||
101 | public Adapter createAdapter(Notifier target) { | ||
102 | return modelSwitch.doSwitch((EObject)target); | ||
103 | } | ||
104 | |||
105 | |||
106 | /** | ||
107 | * Creates a new adapter for an object of class '{@link modes3.Segment <em>Segment</em>}'. | ||
108 | * <!-- begin-user-doc --> | ||
109 | * This default implementation returns null so that we can easily ignore cases; | ||
110 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
111 | * <!-- end-user-doc --> | ||
112 | * @return the new adapter. | ||
113 | * @see modes3.Segment | ||
114 | * @generated | ||
115 | */ | ||
116 | public Adapter createSegmentAdapter() { | ||
117 | return null; | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * Creates a new adapter for an object of class '{@link modes3.Modes3ModelRoot <em>Model Root</em>}'. | ||
122 | * <!-- begin-user-doc --> | ||
123 | * This default implementation returns null so that we can easily ignore cases; | ||
124 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
125 | * <!-- end-user-doc --> | ||
126 | * @return the new adapter. | ||
127 | * @see modes3.Modes3ModelRoot | ||
128 | * @generated | ||
129 | */ | ||
130 | public Adapter createModes3ModelRootAdapter() { | ||
131 | return null; | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * Creates a new adapter for an object of class '{@link modes3.Turnout <em>Turnout</em>}'. | ||
136 | * <!-- begin-user-doc --> | ||
137 | * This default implementation returns null so that we can easily ignore cases; | ||
138 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
139 | * <!-- end-user-doc --> | ||
140 | * @return the new adapter. | ||
141 | * @see modes3.Turnout | ||
142 | * @generated | ||
143 | */ | ||
144 | public Adapter createTurnoutAdapter() { | ||
145 | return null; | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * Creates a new adapter for an object of class '{@link modes3.Train <em>Train</em>}'. | ||
150 | * <!-- begin-user-doc --> | ||
151 | * This default implementation returns null so that we can easily ignore cases; | ||
152 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
153 | * <!-- end-user-doc --> | ||
154 | * @return the new adapter. | ||
155 | * @see modes3.Train | ||
156 | * @generated | ||
157 | */ | ||
158 | public Adapter createTrainAdapter() { | ||
159 | return null; | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * Creates a new adapter for the default case. | ||
164 | * <!-- begin-user-doc --> | ||
165 | * This default implementation returns null. | ||
166 | * <!-- end-user-doc --> | ||
167 | * @return the new adapter. | ||
168 | * @generated | ||
169 | */ | ||
170 | public Adapter createEObjectAdapter() { | ||
171 | return null; | ||
172 | } | ||
173 | |||
174 | } //Modes3AdapterFactory | ||
diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java new file mode 100644 index 00000000..5dab272b --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/ecore-gen/modes3/util/Modes3Switch.java | |||
@@ -0,0 +1,174 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package modes3.util; | ||
4 | |||
5 | import modes3.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | |||
10 | import org.eclipse.emf.ecore.util.Switch; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * The <b>Switch</b> for the model's inheritance hierarchy. | ||
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)} | ||
16 | * to invoke the <code>caseXXX</code> method for each class of the model, | ||
17 | * starting with the actual class of the object | ||
18 | * and proceeding up the inheritance hierarchy | ||
19 | * until a non-null result is returned, | ||
20 | * which is the result of the switch. | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see modes3.Modes3Package | ||
23 | * @generated | ||
24 | */ | ||
25 | public class Modes3Switch<T> extends Switch<T> { | ||
26 | /** | ||
27 | * The cached model package | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | protected static Modes3Package modelPackage; | ||
33 | |||
34 | /** | ||
35 | * Creates an instance of the switch. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @generated | ||
39 | */ | ||
40 | public Modes3Switch() { | ||
41 | if (modelPackage == null) { | ||
42 | modelPackage = Modes3Package.eINSTANCE; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * Checks whether this is a switch for the given package. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @param ePackage the package in question. | ||
51 | * @return whether this is a switch for the given package. | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected boolean isSwitchFor(EPackage ePackage) { | ||
56 | return ePackage == modelPackage; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @return the first non-null result returned by a <code>caseXXX</code> call. | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | protected T doSwitch(int classifierID, EObject theEObject) { | ||
68 | switch (classifierID) { | ||
69 | case Modes3Package.SEGMENT: { | ||
70 | Segment segment = (Segment)theEObject; | ||
71 | T result = caseSegment(segment); | ||
72 | if (result == null) result = defaultCase(theEObject); | ||
73 | return result; | ||
74 | } | ||
75 | case Modes3Package.MODES3_MODEL_ROOT: { | ||
76 | Modes3ModelRoot modes3ModelRoot = (Modes3ModelRoot)theEObject; | ||
77 | T result = caseModes3ModelRoot(modes3ModelRoot); | ||
78 | if (result == null) result = defaultCase(theEObject); | ||
79 | return result; | ||
80 | } | ||
81 | case Modes3Package.TURNOUT: { | ||
82 | Turnout turnout = (Turnout)theEObject; | ||
83 | T result = caseTurnout(turnout); | ||
84 | if (result == null) result = caseSegment(turnout); | ||
85 | if (result == null) result = defaultCase(theEObject); | ||
86 | return result; | ||
87 | } | ||
88 | case Modes3Package.TRAIN: { | ||
89 | Train train = (Train)theEObject; | ||
90 | T result = caseTrain(train); | ||
91 | if (result == null) result = defaultCase(theEObject); | ||
92 | return result; | ||
93 | } | ||
94 | default: return defaultCase(theEObject); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * Returns the result of interpreting the object as an instance of '<em>Segment</em>'. | ||
100 | * <!-- begin-user-doc --> | ||
101 | * This implementation returns null; | ||
102 | * returning a non-null result will terminate the switch. | ||
103 | * <!-- end-user-doc --> | ||
104 | * @param object the target of the switch. | ||
105 | * @return the result of interpreting the object as an instance of '<em>Segment</em>'. | ||
106 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
107 | * @generated | ||
108 | */ | ||
109 | public T caseSegment(Segment object) { | ||
110 | return null; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * Returns the result of interpreting the object as an instance of '<em>Model Root</em>'. | ||
115 | * <!-- begin-user-doc --> | ||
116 | * This implementation returns null; | ||
117 | * returning a non-null result will terminate the switch. | ||
118 | * <!-- end-user-doc --> | ||
119 | * @param object the target of the switch. | ||
120 | * @return the result of interpreting the object as an instance of '<em>Model Root</em>'. | ||
121 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
122 | * @generated | ||
123 | */ | ||
124 | public T caseModes3ModelRoot(Modes3ModelRoot object) { | ||
125 | return null; | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * Returns the result of interpreting the object as an instance of '<em>Turnout</em>'. | ||
130 | * <!-- begin-user-doc --> | ||
131 | * This implementation returns null; | ||
132 | * returning a non-null result will terminate the switch. | ||
133 | * <!-- end-user-doc --> | ||
134 | * @param object the target of the switch. | ||
135 | * @return the result of interpreting the object as an instance of '<em>Turnout</em>'. | ||
136 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
137 | * @generated | ||
138 | */ | ||
139 | public T caseTurnout(Turnout object) { | ||
140 | return null; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * Returns the result of interpreting the object as an instance of '<em>Train</em>'. | ||
145 | * <!-- begin-user-doc --> | ||
146 | * This implementation returns null; | ||
147 | * returning a non-null result will terminate the switch. | ||
148 | * <!-- end-user-doc --> | ||
149 | * @param object the target of the switch. | ||
150 | * @return the result of interpreting the object as an instance of '<em>Train</em>'. | ||
151 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
152 | * @generated | ||
153 | */ | ||
154 | public T caseTrain(Train object) { | ||
155 | return null; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
160 | * <!-- begin-user-doc --> | ||
161 | * This implementation returns null; | ||
162 | * returning a non-null result will terminate the switch, but this is the last case anyway. | ||
163 | * <!-- end-user-doc --> | ||
164 | * @param object the target of the switch. | ||
165 | * @return the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
166 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public T defaultCase(EObject object) { | ||
171 | return null; | ||
172 | } | ||
173 | |||
174 | } //Modes3Switch | ||