diff options
author | 2021-01-11 06:42:10 -0500 | |
---|---|---|
committer | 2021-01-11 06:42:10 -0500 | |
commit | e3774317421935b8d63e2e0ad08a141853d31908 (patch) | |
tree | 2bed27fb1471b56cc04b14ce27dbc4bda12dfcda /Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl | |
parent | remove local-docker file transfer (diff) | |
download | VIATRA-Generator-e3774317421935b8d63e2e0ad08a141853d31908.tar.gz VIATRA-Generator-e3774317421935b8d63e2e0ad08a141853d31908.tar.zst VIATRA-Generator-e3774317421935b8d63e2e0ad08a141853d31908.zip |
first version of the simpleScenario MM+VQL. noRealMatches bug found
Diffstat (limited to 'Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl')
12 files changed, 3110 insertions, 0 deletions
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/ActorImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/ActorImpl.java new file mode 100644 index 00000000..10375e9b --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/ActorImpl.java | |||
@@ -0,0 +1,609 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
10 | import org.eclipse.emf.common.util.EList; | ||
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 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | import simpleScenario.Actor; | ||
22 | import simpleScenario.ActorType; | ||
23 | import simpleScenario.Lane; | ||
24 | import simpleScenario.Relation; | ||
25 | import simpleScenario.SimpleScenarioPackage; | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * An implementation of the model object '<em><b>Actor</b></em>'. | ||
30 | * <!-- end-user-doc --> | ||
31 | * <p> | ||
32 | * The following features are implemented: | ||
33 | * </p> | ||
34 | * <ul> | ||
35 | * <li>{@link simpleScenario.impl.ActorImpl#getType <em>Type</em>}</li> | ||
36 | * <li>{@link simpleScenario.impl.ActorImpl#getXPos <em>XPos</em>}</li> | ||
37 | * <li>{@link simpleScenario.impl.ActorImpl#getYPos <em>YPos</em>}</li> | ||
38 | * <li>{@link simpleScenario.impl.ActorImpl#getLength <em>Length</em>}</li> | ||
39 | * <li>{@link simpleScenario.impl.ActorImpl#getWidth <em>Width</em>}</li> | ||
40 | * <li>{@link simpleScenario.impl.ActorImpl#getSpeed <em>Speed</em>}</li> | ||
41 | * <li>{@link simpleScenario.impl.ActorImpl#getRelations <em>Relations</em>}</li> | ||
42 | * <li>{@link simpleScenario.impl.ActorImpl#getPlacedOn <em>Placed On</em>}</li> | ||
43 | * </ul> | ||
44 | * | ||
45 | * @generated | ||
46 | */ | ||
47 | public class ActorImpl extends MinimalEObjectImpl.Container implements Actor { | ||
48 | /** | ||
49 | * The default value of the '{@link #getType() <em>Type</em>}' attribute. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getType() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected static final ActorType TYPE_EDEFAULT = ActorType.PEDESTRIAN; | ||
57 | |||
58 | /** | ||
59 | * The cached value of the '{@link #getType() <em>Type</em>}' attribute. | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @see #getType() | ||
63 | * @generated | ||
64 | * @ordered | ||
65 | */ | ||
66 | protected ActorType type = TYPE_EDEFAULT; | ||
67 | |||
68 | /** | ||
69 | * The default value of the '{@link #getXPos() <em>XPos</em>}' attribute. | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @see #getXPos() | ||
73 | * @generated | ||
74 | * @ordered | ||
75 | */ | ||
76 | protected static final double XPOS_EDEFAULT = 0.0; | ||
77 | |||
78 | /** | ||
79 | * The cached value of the '{@link #getXPos() <em>XPos</em>}' attribute. | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @see #getXPos() | ||
83 | * @generated | ||
84 | * @ordered | ||
85 | */ | ||
86 | protected double xPos = XPOS_EDEFAULT; | ||
87 | |||
88 | /** | ||
89 | * The default value of the '{@link #getYPos() <em>YPos</em>}' attribute. | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @see #getYPos() | ||
93 | * @generated | ||
94 | * @ordered | ||
95 | */ | ||
96 | protected static final double YPOS_EDEFAULT = 0.0; | ||
97 | |||
98 | /** | ||
99 | * The cached value of the '{@link #getYPos() <em>YPos</em>}' attribute. | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @see #getYPos() | ||
103 | * @generated | ||
104 | * @ordered | ||
105 | */ | ||
106 | protected double yPos = YPOS_EDEFAULT; | ||
107 | |||
108 | /** | ||
109 | * The default value of the '{@link #getLength() <em>Length</em>}' attribute. | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @see #getLength() | ||
113 | * @generated | ||
114 | * @ordered | ||
115 | */ | ||
116 | protected static final double LENGTH_EDEFAULT = 0.0; | ||
117 | |||
118 | /** | ||
119 | * The cached value of the '{@link #getLength() <em>Length</em>}' attribute. | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @see #getLength() | ||
123 | * @generated | ||
124 | * @ordered | ||
125 | */ | ||
126 | protected double length = LENGTH_EDEFAULT; | ||
127 | |||
128 | /** | ||
129 | * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @see #getWidth() | ||
133 | * @generated | ||
134 | * @ordered | ||
135 | */ | ||
136 | protected static final double WIDTH_EDEFAULT = 0.0; | ||
137 | |||
138 | /** | ||
139 | * The cached value of the '{@link #getWidth() <em>Width</em>}' attribute. | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @see #getWidth() | ||
143 | * @generated | ||
144 | * @ordered | ||
145 | */ | ||
146 | protected double width = WIDTH_EDEFAULT; | ||
147 | |||
148 | /** | ||
149 | * The default value of the '{@link #getSpeed() <em>Speed</em>}' attribute. | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @see #getSpeed() | ||
153 | * @generated | ||
154 | * @ordered | ||
155 | */ | ||
156 | protected static final double SPEED_EDEFAULT = 0.0; | ||
157 | |||
158 | /** | ||
159 | * The cached value of the '{@link #getSpeed() <em>Speed</em>}' attribute. | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @see #getSpeed() | ||
163 | * @generated | ||
164 | * @ordered | ||
165 | */ | ||
166 | protected double speed = SPEED_EDEFAULT; | ||
167 | |||
168 | /** | ||
169 | * The cached value of the '{@link #getRelations() <em>Relations</em>}' containment reference list. | ||
170 | * <!-- begin-user-doc --> | ||
171 | * <!-- end-user-doc --> | ||
172 | * @see #getRelations() | ||
173 | * @generated | ||
174 | * @ordered | ||
175 | */ | ||
176 | protected EList<Relation> relations; | ||
177 | |||
178 | /** | ||
179 | * The cached value of the '{@link #getPlacedOn() <em>Placed On</em>}' reference. | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @see #getPlacedOn() | ||
183 | * @generated | ||
184 | * @ordered | ||
185 | */ | ||
186 | protected Lane placedOn; | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | protected ActorImpl() { | ||
194 | super(); | ||
195 | } | ||
196 | |||
197 | /** | ||
198 | * <!-- begin-user-doc --> | ||
199 | * <!-- end-user-doc --> | ||
200 | * @generated | ||
201 | */ | ||
202 | @Override | ||
203 | protected EClass eStaticClass() { | ||
204 | return SimpleScenarioPackage.Literals.ACTOR; | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public ActorType getType() { | ||
214 | return type; | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | @Override | ||
223 | public void setType(ActorType newType) { | ||
224 | ActorType oldType = type; | ||
225 | type = newType == null ? TYPE_EDEFAULT : newType; | ||
226 | if (eNotificationRequired()) | ||
227 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__TYPE, oldType, type)); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public double getXPos() { | ||
237 | return xPos; | ||
238 | } | ||
239 | |||
240 | /** | ||
241 | * <!-- begin-user-doc --> | ||
242 | * <!-- end-user-doc --> | ||
243 | * @generated | ||
244 | */ | ||
245 | @Override | ||
246 | public void setXPos(double newXPos) { | ||
247 | double oldXPos = xPos; | ||
248 | xPos = newXPos; | ||
249 | if (eNotificationRequired()) | ||
250 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__XPOS, oldXPos, xPos)); | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * <!-- begin-user-doc --> | ||
255 | * <!-- end-user-doc --> | ||
256 | * @generated | ||
257 | */ | ||
258 | @Override | ||
259 | public double getYPos() { | ||
260 | return yPos; | ||
261 | } | ||
262 | |||
263 | /** | ||
264 | * <!-- begin-user-doc --> | ||
265 | * <!-- end-user-doc --> | ||
266 | * @generated | ||
267 | */ | ||
268 | @Override | ||
269 | public void setYPos(double newYPos) { | ||
270 | double oldYPos = yPos; | ||
271 | yPos = newYPos; | ||
272 | if (eNotificationRequired()) | ||
273 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__YPOS, oldYPos, yPos)); | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * <!-- begin-user-doc --> | ||
278 | * <!-- end-user-doc --> | ||
279 | * @generated | ||
280 | */ | ||
281 | @Override | ||
282 | public double getLength() { | ||
283 | return length; | ||
284 | } | ||
285 | |||
286 | /** | ||
287 | * <!-- begin-user-doc --> | ||
288 | * <!-- end-user-doc --> | ||
289 | * @generated | ||
290 | */ | ||
291 | @Override | ||
292 | public void setLength(double newLength) { | ||
293 | double oldLength = length; | ||
294 | length = newLength; | ||
295 | if (eNotificationRequired()) | ||
296 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__LENGTH, oldLength, length)); | ||
297 | } | ||
298 | |||
299 | /** | ||
300 | * <!-- begin-user-doc --> | ||
301 | * <!-- end-user-doc --> | ||
302 | * @generated | ||
303 | */ | ||
304 | @Override | ||
305 | public double getWidth() { | ||
306 | return width; | ||
307 | } | ||
308 | |||
309 | /** | ||
310 | * <!-- begin-user-doc --> | ||
311 | * <!-- end-user-doc --> | ||
312 | * @generated | ||
313 | */ | ||
314 | @Override | ||
315 | public void setWidth(double newWidth) { | ||
316 | double oldWidth = width; | ||
317 | width = newWidth; | ||
318 | if (eNotificationRequired()) | ||
319 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__WIDTH, oldWidth, width)); | ||
320 | } | ||
321 | |||
322 | /** | ||
323 | * <!-- begin-user-doc --> | ||
324 | * <!-- end-user-doc --> | ||
325 | * @generated | ||
326 | */ | ||
327 | @Override | ||
328 | public double getSpeed() { | ||
329 | return speed; | ||
330 | } | ||
331 | |||
332 | /** | ||
333 | * <!-- begin-user-doc --> | ||
334 | * <!-- end-user-doc --> | ||
335 | * @generated | ||
336 | */ | ||
337 | @Override | ||
338 | public void setSpeed(double newSpeed) { | ||
339 | double oldSpeed = speed; | ||
340 | speed = newSpeed; | ||
341 | if (eNotificationRequired()) | ||
342 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__SPEED, oldSpeed, speed)); | ||
343 | } | ||
344 | |||
345 | /** | ||
346 | * <!-- begin-user-doc --> | ||
347 | * <!-- end-user-doc --> | ||
348 | * @generated | ||
349 | */ | ||
350 | @Override | ||
351 | public EList<Relation> getRelations() { | ||
352 | if (relations == null) { | ||
353 | relations = new EObjectContainmentEList<Relation>(Relation.class, this, SimpleScenarioPackage.ACTOR__RELATIONS); | ||
354 | } | ||
355 | return relations; | ||
356 | } | ||
357 | |||
358 | /** | ||
359 | * <!-- begin-user-doc --> | ||
360 | * <!-- end-user-doc --> | ||
361 | * @generated | ||
362 | */ | ||
363 | @Override | ||
364 | public Lane getPlacedOn() { | ||
365 | if (placedOn != null && placedOn.eIsProxy()) { | ||
366 | InternalEObject oldPlacedOn = (InternalEObject)placedOn; | ||
367 | placedOn = (Lane)eResolveProxy(oldPlacedOn); | ||
368 | if (placedOn != oldPlacedOn) { | ||
369 | if (eNotificationRequired()) | ||
370 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, placedOn)); | ||
371 | } | ||
372 | } | ||
373 | return placedOn; | ||
374 | } | ||
375 | |||
376 | /** | ||
377 | * <!-- begin-user-doc --> | ||
378 | * <!-- end-user-doc --> | ||
379 | * @generated | ||
380 | */ | ||
381 | public Lane basicGetPlacedOn() { | ||
382 | return placedOn; | ||
383 | } | ||
384 | |||
385 | /** | ||
386 | * <!-- begin-user-doc --> | ||
387 | * <!-- end-user-doc --> | ||
388 | * @generated | ||
389 | */ | ||
390 | public NotificationChain basicSetPlacedOn(Lane newPlacedOn, NotificationChain msgs) { | ||
391 | Lane oldPlacedOn = placedOn; | ||
392 | placedOn = newPlacedOn; | ||
393 | if (eNotificationRequired()) { | ||
394 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__PLACED_ON, oldPlacedOn, newPlacedOn); | ||
395 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
396 | } | ||
397 | return msgs; | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * <!-- begin-user-doc --> | ||
402 | * <!-- end-user-doc --> | ||
403 | * @generated | ||
404 | */ | ||
405 | @Override | ||
406 | public void setPlacedOn(Lane newPlacedOn) { | ||
407 | if (newPlacedOn != placedOn) { | ||
408 | NotificationChain msgs = null; | ||
409 | if (placedOn != null) | ||
410 | msgs = ((InternalEObject)placedOn).eInverseRemove(this, SimpleScenarioPackage.LANE__ACTORS, Lane.class, msgs); | ||
411 | if (newPlacedOn != null) | ||
412 | msgs = ((InternalEObject)newPlacedOn).eInverseAdd(this, SimpleScenarioPackage.LANE__ACTORS, Lane.class, msgs); | ||
413 | msgs = basicSetPlacedOn(newPlacedOn, msgs); | ||
414 | if (msgs != null) msgs.dispatch(); | ||
415 | } | ||
416 | else if (eNotificationRequired()) | ||
417 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.ACTOR__PLACED_ON, newPlacedOn, newPlacedOn)); | ||
418 | } | ||
419 | |||
420 | /** | ||
421 | * <!-- begin-user-doc --> | ||
422 | * <!-- end-user-doc --> | ||
423 | * @generated | ||
424 | */ | ||
425 | @Override | ||
426 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
427 | switch (featureID) { | ||
428 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
429 | if (placedOn != null) | ||
430 | msgs = ((InternalEObject)placedOn).eInverseRemove(this, SimpleScenarioPackage.LANE__ACTORS, Lane.class, msgs); | ||
431 | return basicSetPlacedOn((Lane)otherEnd, msgs); | ||
432 | } | ||
433 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
434 | } | ||
435 | |||
436 | /** | ||
437 | * <!-- begin-user-doc --> | ||
438 | * <!-- end-user-doc --> | ||
439 | * @generated | ||
440 | */ | ||
441 | @Override | ||
442 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
443 | switch (featureID) { | ||
444 | case SimpleScenarioPackage.ACTOR__RELATIONS: | ||
445 | return ((InternalEList<?>)getRelations()).basicRemove(otherEnd, msgs); | ||
446 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
447 | return basicSetPlacedOn(null, msgs); | ||
448 | } | ||
449 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
450 | } | ||
451 | |||
452 | /** | ||
453 | * <!-- begin-user-doc --> | ||
454 | * <!-- end-user-doc --> | ||
455 | * @generated | ||
456 | */ | ||
457 | @Override | ||
458 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
459 | switch (featureID) { | ||
460 | case SimpleScenarioPackage.ACTOR__TYPE: | ||
461 | return getType(); | ||
462 | case SimpleScenarioPackage.ACTOR__XPOS: | ||
463 | return getXPos(); | ||
464 | case SimpleScenarioPackage.ACTOR__YPOS: | ||
465 | return getYPos(); | ||
466 | case SimpleScenarioPackage.ACTOR__LENGTH: | ||
467 | return getLength(); | ||
468 | case SimpleScenarioPackage.ACTOR__WIDTH: | ||
469 | return getWidth(); | ||
470 | case SimpleScenarioPackage.ACTOR__SPEED: | ||
471 | return getSpeed(); | ||
472 | case SimpleScenarioPackage.ACTOR__RELATIONS: | ||
473 | return getRelations(); | ||
474 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
475 | if (resolve) return getPlacedOn(); | ||
476 | return basicGetPlacedOn(); | ||
477 | } | ||
478 | return super.eGet(featureID, resolve, coreType); | ||
479 | } | ||
480 | |||
481 | /** | ||
482 | * <!-- begin-user-doc --> | ||
483 | * <!-- end-user-doc --> | ||
484 | * @generated | ||
485 | */ | ||
486 | @SuppressWarnings("unchecked") | ||
487 | @Override | ||
488 | public void eSet(int featureID, Object newValue) { | ||
489 | switch (featureID) { | ||
490 | case SimpleScenarioPackage.ACTOR__TYPE: | ||
491 | setType((ActorType)newValue); | ||
492 | return; | ||
493 | case SimpleScenarioPackage.ACTOR__XPOS: | ||
494 | setXPos((Double)newValue); | ||
495 | return; | ||
496 | case SimpleScenarioPackage.ACTOR__YPOS: | ||
497 | setYPos((Double)newValue); | ||
498 | return; | ||
499 | case SimpleScenarioPackage.ACTOR__LENGTH: | ||
500 | setLength((Double)newValue); | ||
501 | return; | ||
502 | case SimpleScenarioPackage.ACTOR__WIDTH: | ||
503 | setWidth((Double)newValue); | ||
504 | return; | ||
505 | case SimpleScenarioPackage.ACTOR__SPEED: | ||
506 | setSpeed((Double)newValue); | ||
507 | return; | ||
508 | case SimpleScenarioPackage.ACTOR__RELATIONS: | ||
509 | getRelations().clear(); | ||
510 | getRelations().addAll((Collection<? extends Relation>)newValue); | ||
511 | return; | ||
512 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
513 | setPlacedOn((Lane)newValue); | ||
514 | return; | ||
515 | } | ||
516 | super.eSet(featureID, newValue); | ||
517 | } | ||
518 | |||
519 | /** | ||
520 | * <!-- begin-user-doc --> | ||
521 | * <!-- end-user-doc --> | ||
522 | * @generated | ||
523 | */ | ||
524 | @Override | ||
525 | public void eUnset(int featureID) { | ||
526 | switch (featureID) { | ||
527 | case SimpleScenarioPackage.ACTOR__TYPE: | ||
528 | setType(TYPE_EDEFAULT); | ||
529 | return; | ||
530 | case SimpleScenarioPackage.ACTOR__XPOS: | ||
531 | setXPos(XPOS_EDEFAULT); | ||
532 | return; | ||
533 | case SimpleScenarioPackage.ACTOR__YPOS: | ||
534 | setYPos(YPOS_EDEFAULT); | ||
535 | return; | ||
536 | case SimpleScenarioPackage.ACTOR__LENGTH: | ||
537 | setLength(LENGTH_EDEFAULT); | ||
538 | return; | ||
539 | case SimpleScenarioPackage.ACTOR__WIDTH: | ||
540 | setWidth(WIDTH_EDEFAULT); | ||
541 | return; | ||
542 | case SimpleScenarioPackage.ACTOR__SPEED: | ||
543 | setSpeed(SPEED_EDEFAULT); | ||
544 | return; | ||
545 | case SimpleScenarioPackage.ACTOR__RELATIONS: | ||
546 | getRelations().clear(); | ||
547 | return; | ||
548 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
549 | setPlacedOn((Lane)null); | ||
550 | return; | ||
551 | } | ||
552 | super.eUnset(featureID); | ||
553 | } | ||
554 | |||
555 | /** | ||
556 | * <!-- begin-user-doc --> | ||
557 | * <!-- end-user-doc --> | ||
558 | * @generated | ||
559 | */ | ||
560 | @Override | ||
561 | public boolean eIsSet(int featureID) { | ||
562 | switch (featureID) { | ||
563 | case SimpleScenarioPackage.ACTOR__TYPE: | ||
564 | return type != TYPE_EDEFAULT; | ||
565 | case SimpleScenarioPackage.ACTOR__XPOS: | ||
566 | return xPos != XPOS_EDEFAULT; | ||
567 | case SimpleScenarioPackage.ACTOR__YPOS: | ||
568 | return yPos != YPOS_EDEFAULT; | ||
569 | case SimpleScenarioPackage.ACTOR__LENGTH: | ||
570 | return length != LENGTH_EDEFAULT; | ||
571 | case SimpleScenarioPackage.ACTOR__WIDTH: | ||
572 | return width != WIDTH_EDEFAULT; | ||
573 | case SimpleScenarioPackage.ACTOR__SPEED: | ||
574 | return speed != SPEED_EDEFAULT; | ||
575 | case SimpleScenarioPackage.ACTOR__RELATIONS: | ||
576 | return relations != null && !relations.isEmpty(); | ||
577 | case SimpleScenarioPackage.ACTOR__PLACED_ON: | ||
578 | return placedOn != null; | ||
579 | } | ||
580 | return super.eIsSet(featureID); | ||
581 | } | ||
582 | |||
583 | /** | ||
584 | * <!-- begin-user-doc --> | ||
585 | * <!-- end-user-doc --> | ||
586 | * @generated | ||
587 | */ | ||
588 | @Override | ||
589 | public String toString() { | ||
590 | if (eIsProxy()) return super.toString(); | ||
591 | |||
592 | StringBuilder result = new StringBuilder(super.toString()); | ||
593 | result.append(" (type: "); | ||
594 | result.append(type); | ||
595 | result.append(", xPos: "); | ||
596 | result.append(xPos); | ||
597 | result.append(", yPos: "); | ||
598 | result.append(yPos); | ||
599 | result.append(", length: "); | ||
600 | result.append(length); | ||
601 | result.append(", width: "); | ||
602 | result.append(width); | ||
603 | result.append(", speed: "); | ||
604 | result.append(speed); | ||
605 | result.append(')'); | ||
606 | return result.toString(); | ||
607 | } | ||
608 | |||
609 | } //ActorImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionDoesNotExistImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionDoesNotExistImpl.java new file mode 100644 index 00000000..48eab559 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionDoesNotExistImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | |||
7 | import simpleScenario.CollisionDoesNotExist; | ||
8 | import simpleScenario.SimpleScenarioPackage; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Collision Does Not Exist</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class CollisionDoesNotExistImpl extends TemporalRelationImpl implements CollisionDoesNotExist { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected CollisionDoesNotExistImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return SimpleScenarioPackage.Literals.COLLISION_DOES_NOT_EXIST; | ||
35 | } | ||
36 | |||
37 | } //CollisionDoesNotExistImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionExistsImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionExistsImpl.java new file mode 100644 index 00000000..44a33785 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/CollisionExistsImpl.java | |||
@@ -0,0 +1,164 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import simpleScenario.CollisionExists; | ||
12 | import simpleScenario.SimpleScenarioPackage; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Collision Exists</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link simpleScenario.impl.CollisionExistsImpl#getCollisionTime <em>Collision Time</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public class CollisionExistsImpl extends TemporalRelationImpl implements CollisionExists { | ||
28 | /** | ||
29 | * The default value of the '{@link #getCollisionTime() <em>Collision Time</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getCollisionTime() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final double COLLISION_TIME_EDEFAULT = 0.0; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #getCollisionTime() <em>Collision Time</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getCollisionTime() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected double collisionTime = COLLISION_TIME_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | protected CollisionExistsImpl() { | ||
54 | super(); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | @Override | ||
63 | protected EClass eStaticClass() { | ||
64 | return SimpleScenarioPackage.Literals.COLLISION_EXISTS; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | public double getCollisionTime() { | ||
74 | return collisionTime; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public void setCollisionTime(double newCollisionTime) { | ||
84 | double oldCollisionTime = collisionTime; | ||
85 | collisionTime = newCollisionTime; | ||
86 | if (eNotificationRequired()) | ||
87 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.COLLISION_EXISTS__COLLISION_TIME, oldCollisionTime, collisionTime)); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
97 | switch (featureID) { | ||
98 | case SimpleScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: | ||
99 | return getCollisionTime(); | ||
100 | } | ||
101 | return super.eGet(featureID, resolve, coreType); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | public void eSet(int featureID, Object newValue) { | ||
111 | switch (featureID) { | ||
112 | case SimpleScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: | ||
113 | setCollisionTime((Double)newValue); | ||
114 | return; | ||
115 | } | ||
116 | super.eSet(featureID, newValue); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public void eUnset(int featureID) { | ||
126 | switch (featureID) { | ||
127 | case SimpleScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: | ||
128 | setCollisionTime(COLLISION_TIME_EDEFAULT); | ||
129 | return; | ||
130 | } | ||
131 | super.eUnset(featureID); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public boolean eIsSet(int featureID) { | ||
141 | switch (featureID) { | ||
142 | case SimpleScenarioPackage.COLLISION_EXISTS__COLLISION_TIME: | ||
143 | return collisionTime != COLLISION_TIME_EDEFAULT; | ||
144 | } | ||
145 | return super.eIsSet(featureID); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public String toString() { | ||
155 | if (eIsProxy()) return super.toString(); | ||
156 | |||
157 | StringBuilder result = new StringBuilder(super.toString()); | ||
158 | result.append(" (collisionTime: "); | ||
159 | result.append(collisionTime); | ||
160 | result.append(')'); | ||
161 | return result.toString(); | ||
162 | } | ||
163 | |||
164 | } //CollisionExistsImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/LaneImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/LaneImpl.java new file mode 100644 index 00000000..f0b4b811 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/LaneImpl.java | |||
@@ -0,0 +1,446 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
10 | import org.eclipse.emf.common.util.EList; | ||
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 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
19 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
20 | import org.eclipse.emf.ecore.util.InternalEList; | ||
21 | |||
22 | import simpleScenario.Actor; | ||
23 | import simpleScenario.Lane; | ||
24 | import simpleScenario.Orientation; | ||
25 | import simpleScenario.SimpleScenarioPackage; | ||
26 | import simpleScenario.Size; | ||
27 | |||
28 | /** | ||
29 | * <!-- begin-user-doc --> | ||
30 | * An implementation of the model object '<em><b>Lane</b></em>'. | ||
31 | * <!-- end-user-doc --> | ||
32 | * <p> | ||
33 | * The following features are implemented: | ||
34 | * </p> | ||
35 | * <ul> | ||
36 | * <li>{@link simpleScenario.impl.LaneImpl#getOrientation <em>Orientation</em>}</li> | ||
37 | * <li>{@link simpleScenario.impl.LaneImpl#getWidth <em>Width</em>}</li> | ||
38 | * <li>{@link simpleScenario.impl.LaneImpl#getReferenceCoord <em>Reference Coord</em>}</li> | ||
39 | * <li>{@link simpleScenario.impl.LaneImpl#getAdjacent <em>Adjacent</em>}</li> | ||
40 | * <li>{@link simpleScenario.impl.LaneImpl#getActors <em>Actors</em>}</li> | ||
41 | * <li>{@link simpleScenario.impl.LaneImpl#getWidthNum <em>Width Num</em>}</li> | ||
42 | * </ul> | ||
43 | * | ||
44 | * @generated | ||
45 | */ | ||
46 | public class LaneImpl extends MinimalEObjectImpl.Container implements Lane { | ||
47 | /** | ||
48 | * The default value of the '{@link #getOrientation() <em>Orientation</em>}' attribute. | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @see #getOrientation() | ||
52 | * @generated | ||
53 | * @ordered | ||
54 | */ | ||
55 | protected static final Orientation ORIENTATION_EDEFAULT = Orientation.VERTICAL; | ||
56 | |||
57 | /** | ||
58 | * The cached value of the '{@link #getOrientation() <em>Orientation</em>}' attribute. | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @see #getOrientation() | ||
62 | * @generated | ||
63 | * @ordered | ||
64 | */ | ||
65 | protected Orientation orientation = ORIENTATION_EDEFAULT; | ||
66 | |||
67 | /** | ||
68 | * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @see #getWidth() | ||
72 | * @generated | ||
73 | * @ordered | ||
74 | */ | ||
75 | protected static final Size WIDTH_EDEFAULT = Size.SMALL; | ||
76 | |||
77 | /** | ||
78 | * The cached value of the '{@link #getWidth() <em>Width</em>}' attribute. | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @see #getWidth() | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | protected Size width = WIDTH_EDEFAULT; | ||
86 | |||
87 | /** | ||
88 | * The default value of the '{@link #getReferenceCoord() <em>Reference Coord</em>}' attribute. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @see #getReferenceCoord() | ||
92 | * @generated | ||
93 | * @ordered | ||
94 | */ | ||
95 | protected static final double REFERENCE_COORD_EDEFAULT = 0.0; | ||
96 | |||
97 | /** | ||
98 | * The cached value of the '{@link #getReferenceCoord() <em>Reference Coord</em>}' attribute. | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @see #getReferenceCoord() | ||
102 | * @generated | ||
103 | * @ordered | ||
104 | */ | ||
105 | protected double referenceCoord = REFERENCE_COORD_EDEFAULT; | ||
106 | |||
107 | /** | ||
108 | * The cached value of the '{@link #getAdjacent() <em>Adjacent</em>}' reference list. | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @see #getAdjacent() | ||
112 | * @generated | ||
113 | * @ordered | ||
114 | */ | ||
115 | protected EList<Lane> adjacent; | ||
116 | |||
117 | /** | ||
118 | * The cached value of the '{@link #getActors() <em>Actors</em>}' reference list. | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @see #getActors() | ||
122 | * @generated | ||
123 | * @ordered | ||
124 | */ | ||
125 | protected EList<Actor> actors; | ||
126 | |||
127 | /** | ||
128 | * The default value of the '{@link #getWidthNum() <em>Width Num</em>}' attribute. | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @see #getWidthNum() | ||
132 | * @generated | ||
133 | * @ordered | ||
134 | */ | ||
135 | protected static final double WIDTH_NUM_EDEFAULT = 0.0; | ||
136 | |||
137 | /** | ||
138 | * The cached value of the '{@link #getWidthNum() <em>Width Num</em>}' attribute. | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @see #getWidthNum() | ||
142 | * @generated | ||
143 | * @ordered | ||
144 | */ | ||
145 | protected double widthNum = WIDTH_NUM_EDEFAULT; | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | protected LaneImpl() { | ||
153 | super(); | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * <!-- begin-user-doc --> | ||
158 | * <!-- end-user-doc --> | ||
159 | * @generated | ||
160 | */ | ||
161 | @Override | ||
162 | protected EClass eStaticClass() { | ||
163 | return SimpleScenarioPackage.Literals.LANE; | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * <!-- begin-user-doc --> | ||
168 | * <!-- end-user-doc --> | ||
169 | * @generated | ||
170 | */ | ||
171 | @Override | ||
172 | public Orientation getOrientation() { | ||
173 | return orientation; | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public void setOrientation(Orientation newOrientation) { | ||
183 | Orientation oldOrientation = orientation; | ||
184 | orientation = newOrientation == null ? ORIENTATION_EDEFAULT : newOrientation; | ||
185 | if (eNotificationRequired()) | ||
186 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.LANE__ORIENTATION, oldOrientation, orientation)); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | */ | ||
194 | @Override | ||
195 | public Size getWidth() { | ||
196 | return width; | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | */ | ||
204 | @Override | ||
205 | public void setWidth(Size newWidth) { | ||
206 | Size oldWidth = width; | ||
207 | width = newWidth == null ? WIDTH_EDEFAULT : newWidth; | ||
208 | if (eNotificationRequired()) | ||
209 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.LANE__WIDTH, oldWidth, width)); | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * <!-- begin-user-doc --> | ||
214 | * <!-- end-user-doc --> | ||
215 | * @generated | ||
216 | */ | ||
217 | @Override | ||
218 | public double getReferenceCoord() { | ||
219 | return referenceCoord; | ||
220 | } | ||
221 | |||
222 | /** | ||
223 | * <!-- begin-user-doc --> | ||
224 | * <!-- end-user-doc --> | ||
225 | * @generated | ||
226 | */ | ||
227 | @Override | ||
228 | public void setReferenceCoord(double newReferenceCoord) { | ||
229 | double oldReferenceCoord = referenceCoord; | ||
230 | referenceCoord = newReferenceCoord; | ||
231 | if (eNotificationRequired()) | ||
232 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.LANE__REFERENCE_COORD, oldReferenceCoord, referenceCoord)); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @Override | ||
241 | public EList<Lane> getAdjacent() { | ||
242 | if (adjacent == null) { | ||
243 | adjacent = new EObjectResolvingEList<Lane>(Lane.class, this, SimpleScenarioPackage.LANE__ADJACENT); | ||
244 | } | ||
245 | return adjacent; | ||
246 | } | ||
247 | |||
248 | /** | ||
249 | * <!-- begin-user-doc --> | ||
250 | * <!-- end-user-doc --> | ||
251 | * @generated | ||
252 | */ | ||
253 | @Override | ||
254 | public EList<Actor> getActors() { | ||
255 | if (actors == null) { | ||
256 | actors = new EObjectWithInverseResolvingEList<Actor>(Actor.class, this, SimpleScenarioPackage.LANE__ACTORS, SimpleScenarioPackage.ACTOR__PLACED_ON); | ||
257 | } | ||
258 | return actors; | ||
259 | } | ||
260 | |||
261 | /** | ||
262 | * <!-- begin-user-doc --> | ||
263 | * <!-- end-user-doc --> | ||
264 | * @generated | ||
265 | */ | ||
266 | @Override | ||
267 | public double getWidthNum() { | ||
268 | return widthNum; | ||
269 | } | ||
270 | |||
271 | /** | ||
272 | * <!-- begin-user-doc --> | ||
273 | * <!-- end-user-doc --> | ||
274 | * @generated | ||
275 | */ | ||
276 | @Override | ||
277 | public void setWidthNum(double newWidthNum) { | ||
278 | double oldWidthNum = widthNum; | ||
279 | widthNum = newWidthNum; | ||
280 | if (eNotificationRequired()) | ||
281 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.LANE__WIDTH_NUM, oldWidthNum, widthNum)); | ||
282 | } | ||
283 | |||
284 | /** | ||
285 | * <!-- begin-user-doc --> | ||
286 | * <!-- end-user-doc --> | ||
287 | * @generated | ||
288 | */ | ||
289 | @SuppressWarnings("unchecked") | ||
290 | @Override | ||
291 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
292 | switch (featureID) { | ||
293 | case SimpleScenarioPackage.LANE__ACTORS: | ||
294 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getActors()).basicAdd(otherEnd, msgs); | ||
295 | } | ||
296 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
297 | } | ||
298 | |||
299 | /** | ||
300 | * <!-- begin-user-doc --> | ||
301 | * <!-- end-user-doc --> | ||
302 | * @generated | ||
303 | */ | ||
304 | @Override | ||
305 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
306 | switch (featureID) { | ||
307 | case SimpleScenarioPackage.LANE__ACTORS: | ||
308 | return ((InternalEList<?>)getActors()).basicRemove(otherEnd, msgs); | ||
309 | } | ||
310 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
311 | } | ||
312 | |||
313 | /** | ||
314 | * <!-- begin-user-doc --> | ||
315 | * <!-- end-user-doc --> | ||
316 | * @generated | ||
317 | */ | ||
318 | @Override | ||
319 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
320 | switch (featureID) { | ||
321 | case SimpleScenarioPackage.LANE__ORIENTATION: | ||
322 | return getOrientation(); | ||
323 | case SimpleScenarioPackage.LANE__WIDTH: | ||
324 | return getWidth(); | ||
325 | case SimpleScenarioPackage.LANE__REFERENCE_COORD: | ||
326 | return getReferenceCoord(); | ||
327 | case SimpleScenarioPackage.LANE__ADJACENT: | ||
328 | return getAdjacent(); | ||
329 | case SimpleScenarioPackage.LANE__ACTORS: | ||
330 | return getActors(); | ||
331 | case SimpleScenarioPackage.LANE__WIDTH_NUM: | ||
332 | return getWidthNum(); | ||
333 | } | ||
334 | return super.eGet(featureID, resolve, coreType); | ||
335 | } | ||
336 | |||
337 | /** | ||
338 | * <!-- begin-user-doc --> | ||
339 | * <!-- end-user-doc --> | ||
340 | * @generated | ||
341 | */ | ||
342 | @SuppressWarnings("unchecked") | ||
343 | @Override | ||
344 | public void eSet(int featureID, Object newValue) { | ||
345 | switch (featureID) { | ||
346 | case SimpleScenarioPackage.LANE__ORIENTATION: | ||
347 | setOrientation((Orientation)newValue); | ||
348 | return; | ||
349 | case SimpleScenarioPackage.LANE__WIDTH: | ||
350 | setWidth((Size)newValue); | ||
351 | return; | ||
352 | case SimpleScenarioPackage.LANE__REFERENCE_COORD: | ||
353 | setReferenceCoord((Double)newValue); | ||
354 | return; | ||
355 | case SimpleScenarioPackage.LANE__ADJACENT: | ||
356 | getAdjacent().clear(); | ||
357 | getAdjacent().addAll((Collection<? extends Lane>)newValue); | ||
358 | return; | ||
359 | case SimpleScenarioPackage.LANE__ACTORS: | ||
360 | getActors().clear(); | ||
361 | getActors().addAll((Collection<? extends Actor>)newValue); | ||
362 | return; | ||
363 | case SimpleScenarioPackage.LANE__WIDTH_NUM: | ||
364 | setWidthNum((Double)newValue); | ||
365 | return; | ||
366 | } | ||
367 | super.eSet(featureID, newValue); | ||
368 | } | ||
369 | |||
370 | /** | ||
371 | * <!-- begin-user-doc --> | ||
372 | * <!-- end-user-doc --> | ||
373 | * @generated | ||
374 | */ | ||
375 | @Override | ||
376 | public void eUnset(int featureID) { | ||
377 | switch (featureID) { | ||
378 | case SimpleScenarioPackage.LANE__ORIENTATION: | ||
379 | setOrientation(ORIENTATION_EDEFAULT); | ||
380 | return; | ||
381 | case SimpleScenarioPackage.LANE__WIDTH: | ||
382 | setWidth(WIDTH_EDEFAULT); | ||
383 | return; | ||
384 | case SimpleScenarioPackage.LANE__REFERENCE_COORD: | ||
385 | setReferenceCoord(REFERENCE_COORD_EDEFAULT); | ||
386 | return; | ||
387 | case SimpleScenarioPackage.LANE__ADJACENT: | ||
388 | getAdjacent().clear(); | ||
389 | return; | ||
390 | case SimpleScenarioPackage.LANE__ACTORS: | ||
391 | getActors().clear(); | ||
392 | return; | ||
393 | case SimpleScenarioPackage.LANE__WIDTH_NUM: | ||
394 | setWidthNum(WIDTH_NUM_EDEFAULT); | ||
395 | return; | ||
396 | } | ||
397 | super.eUnset(featureID); | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * <!-- begin-user-doc --> | ||
402 | * <!-- end-user-doc --> | ||
403 | * @generated | ||
404 | */ | ||
405 | @Override | ||
406 | public boolean eIsSet(int featureID) { | ||
407 | switch (featureID) { | ||
408 | case SimpleScenarioPackage.LANE__ORIENTATION: | ||
409 | return orientation != ORIENTATION_EDEFAULT; | ||
410 | case SimpleScenarioPackage.LANE__WIDTH: | ||
411 | return width != WIDTH_EDEFAULT; | ||
412 | case SimpleScenarioPackage.LANE__REFERENCE_COORD: | ||
413 | return referenceCoord != REFERENCE_COORD_EDEFAULT; | ||
414 | case SimpleScenarioPackage.LANE__ADJACENT: | ||
415 | return adjacent != null && !adjacent.isEmpty(); | ||
416 | case SimpleScenarioPackage.LANE__ACTORS: | ||
417 | return actors != null && !actors.isEmpty(); | ||
418 | case SimpleScenarioPackage.LANE__WIDTH_NUM: | ||
419 | return widthNum != WIDTH_NUM_EDEFAULT; | ||
420 | } | ||
421 | return super.eIsSet(featureID); | ||
422 | } | ||
423 | |||
424 | /** | ||
425 | * <!-- begin-user-doc --> | ||
426 | * <!-- end-user-doc --> | ||
427 | * @generated | ||
428 | */ | ||
429 | @Override | ||
430 | public String toString() { | ||
431 | if (eIsProxy()) return super.toString(); | ||
432 | |||
433 | StringBuilder result = new StringBuilder(super.toString()); | ||
434 | result.append(" (orientation: "); | ||
435 | result.append(orientation); | ||
436 | result.append(", width: "); | ||
437 | result.append(width); | ||
438 | result.append(", referenceCoord: "); | ||
439 | result.append(referenceCoord); | ||
440 | result.append(", widthNum: "); | ||
441 | result.append(widthNum); | ||
442 | result.append(')'); | ||
443 | return result.toString(); | ||
444 | } | ||
445 | |||
446 | } //LaneImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/RelationImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/RelationImpl.java new file mode 100644 index 00000000..a8ddd386 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/RelationImpl.java | |||
@@ -0,0 +1,159 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.InternalEObject; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
12 | |||
13 | import simpleScenario.Actor; | ||
14 | import simpleScenario.Relation; | ||
15 | import simpleScenario.SimpleScenarioPackage; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Relation</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link simpleScenario.impl.RelationImpl#getTarget <em>Target</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public abstract class RelationImpl extends MinimalEObjectImpl.Container implements Relation { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getTarget() <em>Target</em>}' reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getTarget() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Actor target; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected RelationImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return SimpleScenarioPackage.Literals.RELATION; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | public Actor getTarget() { | ||
67 | if (target != null && target.eIsProxy()) { | ||
68 | InternalEObject oldTarget = (InternalEObject)target; | ||
69 | target = (Actor)eResolveProxy(oldTarget); | ||
70 | if (target != oldTarget) { | ||
71 | if (eNotificationRequired()) | ||
72 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleScenarioPackage.RELATION__TARGET, oldTarget, target)); | ||
73 | } | ||
74 | } | ||
75 | return target; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public Actor basicGetTarget() { | ||
84 | return target; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | @Override | ||
93 | public void setTarget(Actor newTarget) { | ||
94 | Actor oldTarget = target; | ||
95 | target = newTarget; | ||
96 | if (eNotificationRequired()) | ||
97 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.RELATION__TARGET, oldTarget, target)); | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | @Override | ||
106 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
107 | switch (featureID) { | ||
108 | case SimpleScenarioPackage.RELATION__TARGET: | ||
109 | if (resolve) return getTarget(); | ||
110 | return basicGetTarget(); | ||
111 | } | ||
112 | return super.eGet(featureID, resolve, coreType); | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | @Override | ||
121 | public void eSet(int featureID, Object newValue) { | ||
122 | switch (featureID) { | ||
123 | case SimpleScenarioPackage.RELATION__TARGET: | ||
124 | setTarget((Actor)newValue); | ||
125 | return; | ||
126 | } | ||
127 | super.eSet(featureID, newValue); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public void eUnset(int featureID) { | ||
137 | switch (featureID) { | ||
138 | case SimpleScenarioPackage.RELATION__TARGET: | ||
139 | setTarget((Actor)null); | ||
140 | return; | ||
141 | } | ||
142 | super.eUnset(featureID); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public boolean eIsSet(int featureID) { | ||
152 | switch (featureID) { | ||
153 | case SimpleScenarioPackage.RELATION__TARGET: | ||
154 | return target != null; | ||
155 | } | ||
156 | return super.eIsSet(featureID); | ||
157 | } | ||
158 | |||
159 | } //RelationImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SeperationDistanceImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SeperationDistanceImpl.java new file mode 100644 index 00000000..12a4d73c --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SeperationDistanceImpl.java | |||
@@ -0,0 +1,165 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import simpleScenario.SeperationDistance; | ||
12 | import simpleScenario.SimpleScenarioPackage; | ||
13 | import simpleScenario.Size; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model object '<em><b>Seperation Distance</b></em>'. | ||
18 | * <!-- end-user-doc --> | ||
19 | * <p> | ||
20 | * The following features are implemented: | ||
21 | * </p> | ||
22 | * <ul> | ||
23 | * <li>{@link simpleScenario.impl.SeperationDistanceImpl#getDistance <em>Distance</em>}</li> | ||
24 | * </ul> | ||
25 | * | ||
26 | * @generated | ||
27 | */ | ||
28 | public class SeperationDistanceImpl extends SpatialRelationImpl implements SeperationDistance { | ||
29 | /** | ||
30 | * The default value of the '{@link #getDistance() <em>Distance</em>}' attribute. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @see #getDistance() | ||
34 | * @generated | ||
35 | * @ordered | ||
36 | */ | ||
37 | protected static final Size DISTANCE_EDEFAULT = Size.SMALL; | ||
38 | |||
39 | /** | ||
40 | * The cached value of the '{@link #getDistance() <em>Distance</em>}' attribute. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getDistance() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected Size distance = DISTANCE_EDEFAULT; | ||
48 | |||
49 | /** | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @generated | ||
53 | */ | ||
54 | protected SeperationDistanceImpl() { | ||
55 | super(); | ||
56 | } | ||
57 | |||
58 | /** | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @generated | ||
62 | */ | ||
63 | @Override | ||
64 | protected EClass eStaticClass() { | ||
65 | return SimpleScenarioPackage.Literals.SEPERATION_DISTANCE; | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | @Override | ||
74 | public Size getDistance() { | ||
75 | return distance; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | public void setDistance(Size newDistance) { | ||
85 | Size oldDistance = distance; | ||
86 | distance = newDistance == null ? DISTANCE_EDEFAULT : newDistance; | ||
87 | if (eNotificationRequired()) | ||
88 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.SEPERATION_DISTANCE__DISTANCE, oldDistance, distance)); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
98 | switch (featureID) { | ||
99 | case SimpleScenarioPackage.SEPERATION_DISTANCE__DISTANCE: | ||
100 | return getDistance(); | ||
101 | } | ||
102 | return super.eGet(featureID, resolve, coreType); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public void eSet(int featureID, Object newValue) { | ||
112 | switch (featureID) { | ||
113 | case SimpleScenarioPackage.SEPERATION_DISTANCE__DISTANCE: | ||
114 | setDistance((Size)newValue); | ||
115 | return; | ||
116 | } | ||
117 | super.eSet(featureID, newValue); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | @Override | ||
126 | public void eUnset(int featureID) { | ||
127 | switch (featureID) { | ||
128 | case SimpleScenarioPackage.SEPERATION_DISTANCE__DISTANCE: | ||
129 | setDistance(DISTANCE_EDEFAULT); | ||
130 | return; | ||
131 | } | ||
132 | super.eUnset(featureID); | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | @Override | ||
141 | public boolean eIsSet(int featureID) { | ||
142 | switch (featureID) { | ||
143 | case SimpleScenarioPackage.SEPERATION_DISTANCE__DISTANCE: | ||
144 | return distance != DISTANCE_EDEFAULT; | ||
145 | } | ||
146 | return super.eIsSet(featureID); | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | @Override | ||
155 | public String toString() { | ||
156 | if (eIsProxy()) return super.toString(); | ||
157 | |||
158 | StringBuilder result = new StringBuilder(super.toString()); | ||
159 | result.append(" (distance: "); | ||
160 | result.append(distance); | ||
161 | result.append(')'); | ||
162 | return result.toString(); | ||
163 | } | ||
164 | |||
165 | } //SeperationDistanceImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioFactoryImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioFactoryImpl.java new file mode 100644 index 00000000..c3237012 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioFactoryImpl.java | |||
@@ -0,0 +1,268 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | import org.eclipse.emf.ecore.EDataType; | ||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
11 | |||
12 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
13 | |||
14 | import simpleScenario.*; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model <b>Factory</b>. | ||
19 | * <!-- end-user-doc --> | ||
20 | * @generated | ||
21 | */ | ||
22 | public class SimpleScenarioFactoryImpl extends EFactoryImpl implements SimpleScenarioFactory { | ||
23 | /** | ||
24 | * Creates the default factory implementation. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @generated | ||
28 | */ | ||
29 | public static SimpleScenarioFactory init() { | ||
30 | try { | ||
31 | SimpleScenarioFactory theSimpleScenarioFactory = (SimpleScenarioFactory)EPackage.Registry.INSTANCE.getEFactory(SimpleScenarioPackage.eNS_URI); | ||
32 | if (theSimpleScenarioFactory != null) { | ||
33 | return theSimpleScenarioFactory; | ||
34 | } | ||
35 | } | ||
36 | catch (Exception exception) { | ||
37 | EcorePlugin.INSTANCE.log(exception); | ||
38 | } | ||
39 | return new SimpleScenarioFactoryImpl(); | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Creates an instance of the factory. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @generated | ||
47 | */ | ||
48 | public SimpleScenarioFactoryImpl() { | ||
49 | super(); | ||
50 | } | ||
51 | |||
52 | /** | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | @Override | ||
58 | public EObject create(EClass eClass) { | ||
59 | switch (eClass.getClassifierID()) { | ||
60 | case SimpleScenarioPackage.SIMPLE_SCENARIO: return createSimpleScenario(); | ||
61 | case SimpleScenarioPackage.LANE: return createLane(); | ||
62 | case SimpleScenarioPackage.ACTOR: return createActor(); | ||
63 | case SimpleScenarioPackage.VISION_BLOCKED: return createVisionBlocked(); | ||
64 | case SimpleScenarioPackage.SEPERATION_DISTANCE: return createSeperationDistance(); | ||
65 | case SimpleScenarioPackage.COLLISION_EXISTS: return createCollisionExists(); | ||
66 | case SimpleScenarioPackage.COLLISION_DOES_NOT_EXIST: return createCollisionDoesNotExist(); | ||
67 | default: | ||
68 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | @Override | ||
78 | public Object createFromString(EDataType eDataType, String initialValue) { | ||
79 | switch (eDataType.getClassifierID()) { | ||
80 | case SimpleScenarioPackage.ORIENTATION: | ||
81 | return createOrientationFromString(eDataType, initialValue); | ||
82 | case SimpleScenarioPackage.SIZE: | ||
83 | return createSizeFromString(eDataType, initialValue); | ||
84 | case SimpleScenarioPackage.ACTOR_TYPE: | ||
85 | return createActorTypeFromString(eDataType, initialValue); | ||
86 | default: | ||
87 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public String convertToString(EDataType eDataType, Object instanceValue) { | ||
98 | switch (eDataType.getClassifierID()) { | ||
99 | case SimpleScenarioPackage.ORIENTATION: | ||
100 | return convertOrientationToString(eDataType, instanceValue); | ||
101 | case SimpleScenarioPackage.SIZE: | ||
102 | return convertSizeToString(eDataType, instanceValue); | ||
103 | case SimpleScenarioPackage.ACTOR_TYPE: | ||
104 | return convertActorTypeToString(eDataType, instanceValue); | ||
105 | default: | ||
106 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | @Override | ||
116 | public SimpleScenario createSimpleScenario() { | ||
117 | SimpleScenarioImpl simpleScenario = new SimpleScenarioImpl(); | ||
118 | return simpleScenario; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public Lane createLane() { | ||
128 | LaneImpl lane = new LaneImpl(); | ||
129 | return lane; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public Actor createActor() { | ||
139 | ActorImpl actor = new ActorImpl(); | ||
140 | return actor; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | public VisionBlocked createVisionBlocked() { | ||
150 | VisionBlockedImpl visionBlocked = new VisionBlockedImpl(); | ||
151 | return visionBlocked; | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | @Override | ||
160 | public SeperationDistance createSeperationDistance() { | ||
161 | SeperationDistanceImpl seperationDistance = new SeperationDistanceImpl(); | ||
162 | return seperationDistance; | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | @Override | ||
171 | public CollisionExists createCollisionExists() { | ||
172 | CollisionExistsImpl collisionExists = new CollisionExistsImpl(); | ||
173 | return collisionExists; | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public CollisionDoesNotExist createCollisionDoesNotExist() { | ||
183 | CollisionDoesNotExistImpl collisionDoesNotExist = new CollisionDoesNotExistImpl(); | ||
184 | return collisionDoesNotExist; | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | public Orientation createOrientationFromString(EDataType eDataType, String initialValue) { | ||
193 | Orientation result = Orientation.get(initialValue); | ||
194 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
195 | return result; | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | public String convertOrientationToString(EDataType eDataType, Object instanceValue) { | ||
204 | return instanceValue == null ? null : instanceValue.toString(); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | public Size createSizeFromString(EDataType eDataType, String initialValue) { | ||
213 | Size result = Size.get(initialValue); | ||
214 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
215 | return result; | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | public String convertSizeToString(EDataType eDataType, Object instanceValue) { | ||
224 | return instanceValue == null ? null : instanceValue.toString(); | ||
225 | } | ||
226 | |||
227 | /** | ||
228 | * <!-- begin-user-doc --> | ||
229 | * <!-- end-user-doc --> | ||
230 | * @generated | ||
231 | */ | ||
232 | public ActorType createActorTypeFromString(EDataType eDataType, String initialValue) { | ||
233 | ActorType result = ActorType.get(initialValue); | ||
234 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
235 | return result; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | public String convertActorTypeToString(EDataType eDataType, Object instanceValue) { | ||
244 | return instanceValue == null ? null : instanceValue.toString(); | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * <!-- begin-user-doc --> | ||
249 | * <!-- end-user-doc --> | ||
250 | * @generated | ||
251 | */ | ||
252 | @Override | ||
253 | public SimpleScenarioPackage getSimpleScenarioPackage() { | ||
254 | return (SimpleScenarioPackage)getEPackage(); | ||
255 | } | ||
256 | |||
257 | /** | ||
258 | * <!-- begin-user-doc --> | ||
259 | * <!-- end-user-doc --> | ||
260 | * @deprecated | ||
261 | * @generated | ||
262 | */ | ||
263 | @Deprecated | ||
264 | public static SimpleScenarioPackage getPackage() { | ||
265 | return SimpleScenarioPackage.eINSTANCE; | ||
266 | } | ||
267 | |||
268 | } //SimpleScenarioFactoryImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioImpl.java new file mode 100644 index 00000000..9d542c65 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioImpl.java | |||
@@ -0,0 +1,319 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
10 | import org.eclipse.emf.common.util.EList; | ||
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 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | import simpleScenario.Actor; | ||
22 | import simpleScenario.Lane; | ||
23 | import simpleScenario.SimpleScenario; | ||
24 | import simpleScenario.SimpleScenarioPackage; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Simple Scenario</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link simpleScenario.impl.SimpleScenarioImpl#getXSize <em>XSize</em>}</li> | ||
35 | * <li>{@link simpleScenario.impl.SimpleScenarioImpl#getYSize <em>YSize</em>}</li> | ||
36 | * <li>{@link simpleScenario.impl.SimpleScenarioImpl#getActors <em>Actors</em>}</li> | ||
37 | * <li>{@link simpleScenario.impl.SimpleScenarioImpl#getLanes <em>Lanes</em>}</li> | ||
38 | * </ul> | ||
39 | * | ||
40 | * @generated | ||
41 | */ | ||
42 | public class SimpleScenarioImpl extends MinimalEObjectImpl.Container implements SimpleScenario { | ||
43 | /** | ||
44 | * The default value of the '{@link #getXSize() <em>XSize</em>}' attribute. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getXSize() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected static final double XSIZE_EDEFAULT = 0.0; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getXSize() <em>XSize</em>}' attribute. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getXSize() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected double xSize = XSIZE_EDEFAULT; | ||
62 | |||
63 | /** | ||
64 | * The default value of the '{@link #getYSize() <em>YSize</em>}' attribute. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #getYSize() | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | protected static final double YSIZE_EDEFAULT = 0.0; | ||
72 | |||
73 | /** | ||
74 | * The cached value of the '{@link #getYSize() <em>YSize</em>}' attribute. | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @see #getYSize() | ||
78 | * @generated | ||
79 | * @ordered | ||
80 | */ | ||
81 | protected double ySize = YSIZE_EDEFAULT; | ||
82 | |||
83 | /** | ||
84 | * The cached value of the '{@link #getActors() <em>Actors</em>}' containment reference list. | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @see #getActors() | ||
88 | * @generated | ||
89 | * @ordered | ||
90 | */ | ||
91 | protected EList<Actor> actors; | ||
92 | |||
93 | /** | ||
94 | * The cached value of the '{@link #getLanes() <em>Lanes</em>}' containment reference list. | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @see #getLanes() | ||
98 | * @generated | ||
99 | * @ordered | ||
100 | */ | ||
101 | protected EList<Lane> lanes; | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | protected SimpleScenarioImpl() { | ||
109 | super(); | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | @Override | ||
118 | protected EClass eStaticClass() { | ||
119 | return SimpleScenarioPackage.Literals.SIMPLE_SCENARIO; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public double getXSize() { | ||
129 | return xSize; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public void setXSize(double newXSize) { | ||
139 | double oldXSize = xSize; | ||
140 | xSize = newXSize; | ||
141 | if (eNotificationRequired()) | ||
142 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.SIMPLE_SCENARIO__XSIZE, oldXSize, xSize)); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public double getYSize() { | ||
152 | return ySize; | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | @Override | ||
161 | public void setYSize(double newYSize) { | ||
162 | double oldYSize = ySize; | ||
163 | ySize = newYSize; | ||
164 | if (eNotificationRequired()) | ||
165 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.SIMPLE_SCENARIO__YSIZE, oldYSize, ySize)); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public EList<Actor> getActors() { | ||
175 | if (actors == null) { | ||
176 | actors = new EObjectContainmentEList<Actor>(Actor.class, this, SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS); | ||
177 | } | ||
178 | return actors; | ||
179 | } | ||
180 | |||
181 | /** | ||
182 | * <!-- begin-user-doc --> | ||
183 | * <!-- end-user-doc --> | ||
184 | * @generated | ||
185 | */ | ||
186 | @Override | ||
187 | public EList<Lane> getLanes() { | ||
188 | if (lanes == null) { | ||
189 | lanes = new EObjectContainmentEList<Lane>(Lane.class, this, SimpleScenarioPackage.SIMPLE_SCENARIO__LANES); | ||
190 | } | ||
191 | return lanes; | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * <!-- begin-user-doc --> | ||
196 | * <!-- end-user-doc --> | ||
197 | * @generated | ||
198 | */ | ||
199 | @Override | ||
200 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
201 | switch (featureID) { | ||
202 | case SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS: | ||
203 | return ((InternalEList<?>)getActors()).basicRemove(otherEnd, msgs); | ||
204 | case SimpleScenarioPackage.SIMPLE_SCENARIO__LANES: | ||
205 | return ((InternalEList<?>)getLanes()).basicRemove(otherEnd, msgs); | ||
206 | } | ||
207 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
208 | } | ||
209 | |||
210 | /** | ||
211 | * <!-- begin-user-doc --> | ||
212 | * <!-- end-user-doc --> | ||
213 | * @generated | ||
214 | */ | ||
215 | @Override | ||
216 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
217 | switch (featureID) { | ||
218 | case SimpleScenarioPackage.SIMPLE_SCENARIO__XSIZE: | ||
219 | return getXSize(); | ||
220 | case SimpleScenarioPackage.SIMPLE_SCENARIO__YSIZE: | ||
221 | return getYSize(); | ||
222 | case SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS: | ||
223 | return getActors(); | ||
224 | case SimpleScenarioPackage.SIMPLE_SCENARIO__LANES: | ||
225 | return getLanes(); | ||
226 | } | ||
227 | return super.eGet(featureID, resolve, coreType); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @SuppressWarnings("unchecked") | ||
236 | @Override | ||
237 | public void eSet(int featureID, Object newValue) { | ||
238 | switch (featureID) { | ||
239 | case SimpleScenarioPackage.SIMPLE_SCENARIO__XSIZE: | ||
240 | setXSize((Double)newValue); | ||
241 | return; | ||
242 | case SimpleScenarioPackage.SIMPLE_SCENARIO__YSIZE: | ||
243 | setYSize((Double)newValue); | ||
244 | return; | ||
245 | case SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS: | ||
246 | getActors().clear(); | ||
247 | getActors().addAll((Collection<? extends Actor>)newValue); | ||
248 | return; | ||
249 | case SimpleScenarioPackage.SIMPLE_SCENARIO__LANES: | ||
250 | getLanes().clear(); | ||
251 | getLanes().addAll((Collection<? extends Lane>)newValue); | ||
252 | return; | ||
253 | } | ||
254 | super.eSet(featureID, newValue); | ||
255 | } | ||
256 | |||
257 | /** | ||
258 | * <!-- begin-user-doc --> | ||
259 | * <!-- end-user-doc --> | ||
260 | * @generated | ||
261 | */ | ||
262 | @Override | ||
263 | public void eUnset(int featureID) { | ||
264 | switch (featureID) { | ||
265 | case SimpleScenarioPackage.SIMPLE_SCENARIO__XSIZE: | ||
266 | setXSize(XSIZE_EDEFAULT); | ||
267 | return; | ||
268 | case SimpleScenarioPackage.SIMPLE_SCENARIO__YSIZE: | ||
269 | setYSize(YSIZE_EDEFAULT); | ||
270 | return; | ||
271 | case SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS: | ||
272 | getActors().clear(); | ||
273 | return; | ||
274 | case SimpleScenarioPackage.SIMPLE_SCENARIO__LANES: | ||
275 | getLanes().clear(); | ||
276 | return; | ||
277 | } | ||
278 | super.eUnset(featureID); | ||
279 | } | ||
280 | |||
281 | /** | ||
282 | * <!-- begin-user-doc --> | ||
283 | * <!-- end-user-doc --> | ||
284 | * @generated | ||
285 | */ | ||
286 | @Override | ||
287 | public boolean eIsSet(int featureID) { | ||
288 | switch (featureID) { | ||
289 | case SimpleScenarioPackage.SIMPLE_SCENARIO__XSIZE: | ||
290 | return xSize != XSIZE_EDEFAULT; | ||
291 | case SimpleScenarioPackage.SIMPLE_SCENARIO__YSIZE: | ||
292 | return ySize != YSIZE_EDEFAULT; | ||
293 | case SimpleScenarioPackage.SIMPLE_SCENARIO__ACTORS: | ||
294 | return actors != null && !actors.isEmpty(); | ||
295 | case SimpleScenarioPackage.SIMPLE_SCENARIO__LANES: | ||
296 | return lanes != null && !lanes.isEmpty(); | ||
297 | } | ||
298 | return super.eIsSet(featureID); | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * <!-- begin-user-doc --> | ||
303 | * <!-- end-user-doc --> | ||
304 | * @generated | ||
305 | */ | ||
306 | @Override | ||
307 | public String toString() { | ||
308 | if (eIsProxy()) return super.toString(); | ||
309 | |||
310 | StringBuilder result = new StringBuilder(super.toString()); | ||
311 | result.append(" (xSize: "); | ||
312 | result.append(xSize); | ||
313 | result.append(", ySize: "); | ||
314 | result.append(ySize); | ||
315 | result.append(')'); | ||
316 | return result.toString(); | ||
317 | } | ||
318 | |||
319 | } //SimpleScenarioImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioPackageImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioPackageImpl.java new file mode 100644 index 00000000..cff06365 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SimpleScenarioPackageImpl.java | |||
@@ -0,0 +1,711 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | ||
7 | import org.eclipse.emf.ecore.EEnum; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | import org.eclipse.emf.ecore.EReference; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
12 | |||
13 | import simpleScenario.Actor; | ||
14 | import simpleScenario.ActorType; | ||
15 | import simpleScenario.CollisionDoesNotExist; | ||
16 | import simpleScenario.CollisionExists; | ||
17 | import simpleScenario.Lane; | ||
18 | import simpleScenario.Orientation; | ||
19 | import simpleScenario.Relation; | ||
20 | import simpleScenario.SeperationDistance; | ||
21 | import simpleScenario.SimpleScenario; | ||
22 | import simpleScenario.SimpleScenarioFactory; | ||
23 | import simpleScenario.SimpleScenarioPackage; | ||
24 | import simpleScenario.Size; | ||
25 | import simpleScenario.SpatialRelation; | ||
26 | import simpleScenario.TemporalRelation; | ||
27 | import simpleScenario.VisionBlocked; | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * An implementation of the model <b>Package</b>. | ||
32 | * <!-- end-user-doc --> | ||
33 | * @generated | ||
34 | */ | ||
35 | public class SimpleScenarioPackageImpl extends EPackageImpl implements SimpleScenarioPackage { | ||
36 | /** | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | private EClass simpleScenarioEClass = null; | ||
42 | |||
43 | /** | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @generated | ||
47 | */ | ||
48 | private EClass laneEClass = null; | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | private EClass actorEClass = null; | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | private EClass relationEClass = null; | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | private EClass spatialRelationEClass = null; | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | private EClass temporalRelationEClass = null; | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | private EClass visionBlockedEClass = null; | ||
84 | |||
85 | /** | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @generated | ||
89 | */ | ||
90 | private EClass seperationDistanceEClass = null; | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | private EClass collisionExistsEClass = null; | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | private EClass collisionDoesNotExistEClass = null; | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | private EEnum orientationEEnum = null; | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | private EEnum sizeEEnum = null; | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | private EEnum actorTypeEEnum = null; | ||
126 | |||
127 | /** | ||
128 | * Creates an instance of the model <b>Package</b>, registered with | ||
129 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
130 | * package URI value. | ||
131 | * <p>Note: the correct way to create the package is via the static | ||
132 | * factory method {@link #init init()}, which also performs | ||
133 | * initialization of the package, or returns the registered package, | ||
134 | * if one already exists. | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
138 | * @see simpleScenario.SimpleScenarioPackage#eNS_URI | ||
139 | * @see #init() | ||
140 | * @generated | ||
141 | */ | ||
142 | private SimpleScenarioPackageImpl() { | ||
143 | super(eNS_URI, SimpleScenarioFactory.eINSTANCE); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | private static boolean isInited = false; | ||
152 | |||
153 | /** | ||
154 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
155 | * | ||
156 | * <p>This method is used to initialize {@link SimpleScenarioPackage#eINSTANCE} when that field is accessed. | ||
157 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
158 | * <!-- begin-user-doc --> | ||
159 | * <!-- end-user-doc --> | ||
160 | * @see #eNS_URI | ||
161 | * @see #createPackageContents() | ||
162 | * @see #initializePackageContents() | ||
163 | * @generated | ||
164 | */ | ||
165 | public static SimpleScenarioPackage init() { | ||
166 | if (isInited) return (SimpleScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleScenarioPackage.eNS_URI); | ||
167 | |||
168 | // Obtain or create and register package | ||
169 | Object registeredSimpleScenarioPackage = EPackage.Registry.INSTANCE.get(eNS_URI); | ||
170 | SimpleScenarioPackageImpl theSimpleScenarioPackage = registeredSimpleScenarioPackage instanceof SimpleScenarioPackageImpl ? (SimpleScenarioPackageImpl)registeredSimpleScenarioPackage : new SimpleScenarioPackageImpl(); | ||
171 | |||
172 | isInited = true; | ||
173 | |||
174 | // Create package meta-data objects | ||
175 | theSimpleScenarioPackage.createPackageContents(); | ||
176 | |||
177 | // Initialize created meta-data | ||
178 | theSimpleScenarioPackage.initializePackageContents(); | ||
179 | |||
180 | // Mark meta-data to indicate it can't be changed | ||
181 | theSimpleScenarioPackage.freeze(); | ||
182 | |||
183 | // Update the registry and return the package | ||
184 | EPackage.Registry.INSTANCE.put(SimpleScenarioPackage.eNS_URI, theSimpleScenarioPackage); | ||
185 | return theSimpleScenarioPackage; | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | @Override | ||
194 | public EClass getSimpleScenario() { | ||
195 | return simpleScenarioEClass; | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | @Override | ||
204 | public EAttribute getSimpleScenario_XSize() { | ||
205 | return (EAttribute)simpleScenarioEClass.getEStructuralFeatures().get(0); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @Override | ||
214 | public EAttribute getSimpleScenario_YSize() { | ||
215 | return (EAttribute)simpleScenarioEClass.getEStructuralFeatures().get(1); | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @Override | ||
224 | public EReference getSimpleScenario_Actors() { | ||
225 | return (EReference)simpleScenarioEClass.getEStructuralFeatures().get(2); | ||
226 | } | ||
227 | |||
228 | /** | ||
229 | * <!-- begin-user-doc --> | ||
230 | * <!-- end-user-doc --> | ||
231 | * @generated | ||
232 | */ | ||
233 | @Override | ||
234 | public EReference getSimpleScenario_Lanes() { | ||
235 | return (EReference)simpleScenarioEClass.getEStructuralFeatures().get(3); | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | @Override | ||
244 | public EClass getLane() { | ||
245 | return laneEClass; | ||
246 | } | ||
247 | |||
248 | /** | ||
249 | * <!-- begin-user-doc --> | ||
250 | * <!-- end-user-doc --> | ||
251 | * @generated | ||
252 | */ | ||
253 | @Override | ||
254 | public EAttribute getLane_Orientation() { | ||
255 | return (EAttribute)laneEClass.getEStructuralFeatures().get(0); | ||
256 | } | ||
257 | |||
258 | /** | ||
259 | * <!-- begin-user-doc --> | ||
260 | * <!-- end-user-doc --> | ||
261 | * @generated | ||
262 | */ | ||
263 | @Override | ||
264 | public EAttribute getLane_Width() { | ||
265 | return (EAttribute)laneEClass.getEStructuralFeatures().get(1); | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public EAttribute getLane_ReferenceCoord() { | ||
275 | return (EAttribute)laneEClass.getEStructuralFeatures().get(2); | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * <!-- begin-user-doc --> | ||
280 | * <!-- end-user-doc --> | ||
281 | * @generated | ||
282 | */ | ||
283 | @Override | ||
284 | public EReference getLane_Adjacent() { | ||
285 | return (EReference)laneEClass.getEStructuralFeatures().get(3); | ||
286 | } | ||
287 | |||
288 | /** | ||
289 | * <!-- begin-user-doc --> | ||
290 | * <!-- end-user-doc --> | ||
291 | * @generated | ||
292 | */ | ||
293 | @Override | ||
294 | public EReference getLane_Actors() { | ||
295 | return (EReference)laneEClass.getEStructuralFeatures().get(4); | ||
296 | } | ||
297 | |||
298 | /** | ||
299 | * <!-- begin-user-doc --> | ||
300 | * <!-- end-user-doc --> | ||
301 | * @generated | ||
302 | */ | ||
303 | @Override | ||
304 | public EAttribute getLane_WidthNum() { | ||
305 | return (EAttribute)laneEClass.getEStructuralFeatures().get(5); | ||
306 | } | ||
307 | |||
308 | /** | ||
309 | * <!-- begin-user-doc --> | ||
310 | * <!-- end-user-doc --> | ||
311 | * @generated | ||
312 | */ | ||
313 | @Override | ||
314 | public EClass getActor() { | ||
315 | return actorEClass; | ||
316 | } | ||
317 | |||
318 | /** | ||
319 | * <!-- begin-user-doc --> | ||
320 | * <!-- end-user-doc --> | ||
321 | * @generated | ||
322 | */ | ||
323 | @Override | ||
324 | public EAttribute getActor_Type() { | ||
325 | return (EAttribute)actorEClass.getEStructuralFeatures().get(0); | ||
326 | } | ||
327 | |||
328 | /** | ||
329 | * <!-- begin-user-doc --> | ||
330 | * <!-- end-user-doc --> | ||
331 | * @generated | ||
332 | */ | ||
333 | @Override | ||
334 | public EAttribute getActor_XPos() { | ||
335 | return (EAttribute)actorEClass.getEStructuralFeatures().get(1); | ||
336 | } | ||
337 | |||
338 | /** | ||
339 | * <!-- begin-user-doc --> | ||
340 | * <!-- end-user-doc --> | ||
341 | * @generated | ||
342 | */ | ||
343 | @Override | ||
344 | public EAttribute getActor_YPos() { | ||
345 | return (EAttribute)actorEClass.getEStructuralFeatures().get(2); | ||
346 | } | ||
347 | |||
348 | /** | ||
349 | * <!-- begin-user-doc --> | ||
350 | * <!-- end-user-doc --> | ||
351 | * @generated | ||
352 | */ | ||
353 | @Override | ||
354 | public EAttribute getActor_Length() { | ||
355 | return (EAttribute)actorEClass.getEStructuralFeatures().get(3); | ||
356 | } | ||
357 | |||
358 | /** | ||
359 | * <!-- begin-user-doc --> | ||
360 | * <!-- end-user-doc --> | ||
361 | * @generated | ||
362 | */ | ||
363 | @Override | ||
364 | public EAttribute getActor_Width() { | ||
365 | return (EAttribute)actorEClass.getEStructuralFeatures().get(4); | ||
366 | } | ||
367 | |||
368 | /** | ||
369 | * <!-- begin-user-doc --> | ||
370 | * <!-- end-user-doc --> | ||
371 | * @generated | ||
372 | */ | ||
373 | @Override | ||
374 | public EAttribute getActor_Speed() { | ||
375 | return (EAttribute)actorEClass.getEStructuralFeatures().get(5); | ||
376 | } | ||
377 | |||
378 | /** | ||
379 | * <!-- begin-user-doc --> | ||
380 | * <!-- end-user-doc --> | ||
381 | * @generated | ||
382 | */ | ||
383 | @Override | ||
384 | public EReference getActor_Relations() { | ||
385 | return (EReference)actorEClass.getEStructuralFeatures().get(6); | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * <!-- begin-user-doc --> | ||
390 | * <!-- end-user-doc --> | ||
391 | * @generated | ||
392 | */ | ||
393 | @Override | ||
394 | public EReference getActor_PlacedOn() { | ||
395 | return (EReference)actorEClass.getEStructuralFeatures().get(7); | ||
396 | } | ||
397 | |||
398 | /** | ||
399 | * <!-- begin-user-doc --> | ||
400 | * <!-- end-user-doc --> | ||
401 | * @generated | ||
402 | */ | ||
403 | @Override | ||
404 | public EClass getRelation() { | ||
405 | return relationEClass; | ||
406 | } | ||
407 | |||
408 | /** | ||
409 | * <!-- begin-user-doc --> | ||
410 | * <!-- end-user-doc --> | ||
411 | * @generated | ||
412 | */ | ||
413 | @Override | ||
414 | public EReference getRelation_Target() { | ||
415 | return (EReference)relationEClass.getEStructuralFeatures().get(0); | ||
416 | } | ||
417 | |||
418 | /** | ||
419 | * <!-- begin-user-doc --> | ||
420 | * <!-- end-user-doc --> | ||
421 | * @generated | ||
422 | */ | ||
423 | @Override | ||
424 | public EClass getSpatialRelation() { | ||
425 | return spatialRelationEClass; | ||
426 | } | ||
427 | |||
428 | /** | ||
429 | * <!-- begin-user-doc --> | ||
430 | * <!-- end-user-doc --> | ||
431 | * @generated | ||
432 | */ | ||
433 | @Override | ||
434 | public EClass getTemporalRelation() { | ||
435 | return temporalRelationEClass; | ||
436 | } | ||
437 | |||
438 | /** | ||
439 | * <!-- begin-user-doc --> | ||
440 | * <!-- end-user-doc --> | ||
441 | * @generated | ||
442 | */ | ||
443 | @Override | ||
444 | public EClass getVisionBlocked() { | ||
445 | return visionBlockedEClass; | ||
446 | } | ||
447 | |||
448 | /** | ||
449 | * <!-- begin-user-doc --> | ||
450 | * <!-- end-user-doc --> | ||
451 | * @generated | ||
452 | */ | ||
453 | @Override | ||
454 | public EReference getVisionBlocked_BlockedBy() { | ||
455 | return (EReference)visionBlockedEClass.getEStructuralFeatures().get(0); | ||
456 | } | ||
457 | |||
458 | /** | ||
459 | * <!-- begin-user-doc --> | ||
460 | * <!-- end-user-doc --> | ||
461 | * @generated | ||
462 | */ | ||
463 | @Override | ||
464 | public EClass getSeperationDistance() { | ||
465 | return seperationDistanceEClass; | ||
466 | } | ||
467 | |||
468 | /** | ||
469 | * <!-- begin-user-doc --> | ||
470 | * <!-- end-user-doc --> | ||
471 | * @generated | ||
472 | */ | ||
473 | @Override | ||
474 | public EAttribute getSeperationDistance_Distance() { | ||
475 | return (EAttribute)seperationDistanceEClass.getEStructuralFeatures().get(0); | ||
476 | } | ||
477 | |||
478 | /** | ||
479 | * <!-- begin-user-doc --> | ||
480 | * <!-- end-user-doc --> | ||
481 | * @generated | ||
482 | */ | ||
483 | @Override | ||
484 | public EClass getCollisionExists() { | ||
485 | return collisionExistsEClass; | ||
486 | } | ||
487 | |||
488 | /** | ||
489 | * <!-- begin-user-doc --> | ||
490 | * <!-- end-user-doc --> | ||
491 | * @generated | ||
492 | */ | ||
493 | @Override | ||
494 | public EAttribute getCollisionExists_CollisionTime() { | ||
495 | return (EAttribute)collisionExistsEClass.getEStructuralFeatures().get(0); | ||
496 | } | ||
497 | |||
498 | /** | ||
499 | * <!-- begin-user-doc --> | ||
500 | * <!-- end-user-doc --> | ||
501 | * @generated | ||
502 | */ | ||
503 | @Override | ||
504 | public EClass getCollisionDoesNotExist() { | ||
505 | return collisionDoesNotExistEClass; | ||
506 | } | ||
507 | |||
508 | /** | ||
509 | * <!-- begin-user-doc --> | ||
510 | * <!-- end-user-doc --> | ||
511 | * @generated | ||
512 | */ | ||
513 | @Override | ||
514 | public EEnum getOrientation() { | ||
515 | return orientationEEnum; | ||
516 | } | ||
517 | |||
518 | /** | ||
519 | * <!-- begin-user-doc --> | ||
520 | * <!-- end-user-doc --> | ||
521 | * @generated | ||
522 | */ | ||
523 | @Override | ||
524 | public EEnum getSize() { | ||
525 | return sizeEEnum; | ||
526 | } | ||
527 | |||
528 | /** | ||
529 | * <!-- begin-user-doc --> | ||
530 | * <!-- end-user-doc --> | ||
531 | * @generated | ||
532 | */ | ||
533 | @Override | ||
534 | public EEnum getActorType() { | ||
535 | return actorTypeEEnum; | ||
536 | } | ||
537 | |||
538 | /** | ||
539 | * <!-- begin-user-doc --> | ||
540 | * <!-- end-user-doc --> | ||
541 | * @generated | ||
542 | */ | ||
543 | @Override | ||
544 | public SimpleScenarioFactory getSimpleScenarioFactory() { | ||
545 | return (SimpleScenarioFactory)getEFactoryInstance(); | ||
546 | } | ||
547 | |||
548 | /** | ||
549 | * <!-- begin-user-doc --> | ||
550 | * <!-- end-user-doc --> | ||
551 | * @generated | ||
552 | */ | ||
553 | private boolean isCreated = false; | ||
554 | |||
555 | /** | ||
556 | * Creates the meta-model objects for the package. This method is | ||
557 | * guarded to have no affect on any invocation but its first. | ||
558 | * <!-- begin-user-doc --> | ||
559 | * <!-- end-user-doc --> | ||
560 | * @generated | ||
561 | */ | ||
562 | public void createPackageContents() { | ||
563 | if (isCreated) return; | ||
564 | isCreated = true; | ||
565 | |||
566 | // Create classes and their features | ||
567 | simpleScenarioEClass = createEClass(SIMPLE_SCENARIO); | ||
568 | createEAttribute(simpleScenarioEClass, SIMPLE_SCENARIO__XSIZE); | ||
569 | createEAttribute(simpleScenarioEClass, SIMPLE_SCENARIO__YSIZE); | ||
570 | createEReference(simpleScenarioEClass, SIMPLE_SCENARIO__ACTORS); | ||
571 | createEReference(simpleScenarioEClass, SIMPLE_SCENARIO__LANES); | ||
572 | |||
573 | laneEClass = createEClass(LANE); | ||
574 | createEAttribute(laneEClass, LANE__ORIENTATION); | ||
575 | createEAttribute(laneEClass, LANE__WIDTH); | ||
576 | createEAttribute(laneEClass, LANE__REFERENCE_COORD); | ||
577 | createEReference(laneEClass, LANE__ADJACENT); | ||
578 | createEReference(laneEClass, LANE__ACTORS); | ||
579 | createEAttribute(laneEClass, LANE__WIDTH_NUM); | ||
580 | |||
581 | actorEClass = createEClass(ACTOR); | ||
582 | createEAttribute(actorEClass, ACTOR__TYPE); | ||
583 | createEAttribute(actorEClass, ACTOR__XPOS); | ||
584 | createEAttribute(actorEClass, ACTOR__YPOS); | ||
585 | createEAttribute(actorEClass, ACTOR__LENGTH); | ||
586 | createEAttribute(actorEClass, ACTOR__WIDTH); | ||
587 | createEAttribute(actorEClass, ACTOR__SPEED); | ||
588 | createEReference(actorEClass, ACTOR__RELATIONS); | ||
589 | createEReference(actorEClass, ACTOR__PLACED_ON); | ||
590 | |||
591 | relationEClass = createEClass(RELATION); | ||
592 | createEReference(relationEClass, RELATION__TARGET); | ||
593 | |||
594 | spatialRelationEClass = createEClass(SPATIAL_RELATION); | ||
595 | |||
596 | temporalRelationEClass = createEClass(TEMPORAL_RELATION); | ||
597 | |||
598 | visionBlockedEClass = createEClass(VISION_BLOCKED); | ||
599 | createEReference(visionBlockedEClass, VISION_BLOCKED__BLOCKED_BY); | ||
600 | |||
601 | seperationDistanceEClass = createEClass(SEPERATION_DISTANCE); | ||
602 | createEAttribute(seperationDistanceEClass, SEPERATION_DISTANCE__DISTANCE); | ||
603 | |||
604 | collisionExistsEClass = createEClass(COLLISION_EXISTS); | ||
605 | createEAttribute(collisionExistsEClass, COLLISION_EXISTS__COLLISION_TIME); | ||
606 | |||
607 | collisionDoesNotExistEClass = createEClass(COLLISION_DOES_NOT_EXIST); | ||
608 | |||
609 | // Create enums | ||
610 | orientationEEnum = createEEnum(ORIENTATION); | ||
611 | sizeEEnum = createEEnum(SIZE); | ||
612 | actorTypeEEnum = createEEnum(ACTOR_TYPE); | ||
613 | } | ||
614 | |||
615 | /** | ||
616 | * <!-- begin-user-doc --> | ||
617 | * <!-- end-user-doc --> | ||
618 | * @generated | ||
619 | */ | ||
620 | private boolean isInitialized = false; | ||
621 | |||
622 | /** | ||
623 | * Complete the initialization of the package and its meta-model. This | ||
624 | * method is guarded to have no affect on any invocation but its first. | ||
625 | * <!-- begin-user-doc --> | ||
626 | * <!-- end-user-doc --> | ||
627 | * @generated | ||
628 | */ | ||
629 | public void initializePackageContents() { | ||
630 | if (isInitialized) return; | ||
631 | isInitialized = true; | ||
632 | |||
633 | // Initialize package | ||
634 | setName(eNAME); | ||
635 | setNsPrefix(eNS_PREFIX); | ||
636 | setNsURI(eNS_URI); | ||
637 | |||
638 | // Create type parameters | ||
639 | |||
640 | // Set bounds for type parameters | ||
641 | |||
642 | // Add supertypes to classes | ||
643 | spatialRelationEClass.getESuperTypes().add(this.getRelation()); | ||
644 | temporalRelationEClass.getESuperTypes().add(this.getRelation()); | ||
645 | visionBlockedEClass.getESuperTypes().add(this.getSpatialRelation()); | ||
646 | seperationDistanceEClass.getESuperTypes().add(this.getSpatialRelation()); | ||
647 | collisionExistsEClass.getESuperTypes().add(this.getTemporalRelation()); | ||
648 | collisionDoesNotExistEClass.getESuperTypes().add(this.getTemporalRelation()); | ||
649 | |||
650 | // Initialize classes, features, and operations; add parameters | ||
651 | initEClass(simpleScenarioEClass, SimpleScenario.class, "SimpleScenario", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
652 | initEAttribute(getSimpleScenario_XSize(), ecorePackage.getEDouble(), "xSize", null, 0, 1, SimpleScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
653 | initEAttribute(getSimpleScenario_YSize(), ecorePackage.getEDouble(), "ySize", null, 0, 1, SimpleScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
654 | initEReference(getSimpleScenario_Actors(), this.getActor(), null, "actors", null, 0, -1, SimpleScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
655 | initEReference(getSimpleScenario_Lanes(), this.getLane(), null, "lanes", null, 0, -1, SimpleScenario.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
656 | |||
657 | initEClass(laneEClass, Lane.class, "Lane", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
658 | initEAttribute(getLane_Orientation(), this.getOrientation(), "orientation", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
659 | initEAttribute(getLane_Width(), this.getSize(), "width", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
660 | initEAttribute(getLane_ReferenceCoord(), ecorePackage.getEDouble(), "referenceCoord", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
661 | initEReference(getLane_Adjacent(), this.getLane(), null, "adjacent", null, 0, 2, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
662 | initEReference(getLane_Actors(), this.getActor(), this.getActor_PlacedOn(), "actors", null, 0, -1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
663 | initEAttribute(getLane_WidthNum(), ecorePackage.getEDouble(), "widthNum", null, 1, 1, Lane.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
664 | |||
665 | initEClass(actorEClass, Actor.class, "Actor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
666 | initEAttribute(getActor_Type(), this.getActorType(), "type", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
667 | initEAttribute(getActor_XPos(), ecorePackage.getEDouble(), "xPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
668 | initEAttribute(getActor_YPos(), ecorePackage.getEDouble(), "yPos", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
669 | initEAttribute(getActor_Length(), ecorePackage.getEDouble(), "length", "0.0", 0, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
670 | initEAttribute(getActor_Width(), ecorePackage.getEDouble(), "width", null, 0, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
671 | initEAttribute(getActor_Speed(), ecorePackage.getEDouble(), "speed", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
672 | initEReference(getActor_Relations(), this.getRelation(), null, "relations", null, 0, -1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
673 | initEReference(getActor_PlacedOn(), this.getLane(), this.getLane_Actors(), "placedOn", null, 1, 1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
674 | |||
675 | initEClass(relationEClass, Relation.class, "Relation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
676 | initEReference(getRelation_Target(), this.getActor(), null, "target", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
677 | |||
678 | initEClass(spatialRelationEClass, SpatialRelation.class, "SpatialRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
679 | |||
680 | initEClass(temporalRelationEClass, TemporalRelation.class, "TemporalRelation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
681 | |||
682 | initEClass(visionBlockedEClass, VisionBlocked.class, "VisionBlocked", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
683 | initEReference(getVisionBlocked_BlockedBy(), this.getActor(), null, "blockedBy", null, 0, 1, VisionBlocked.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
684 | |||
685 | initEClass(seperationDistanceEClass, SeperationDistance.class, "SeperationDistance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
686 | initEAttribute(getSeperationDistance_Distance(), this.getSize(), "distance", null, 1, 1, SeperationDistance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
687 | |||
688 | initEClass(collisionExistsEClass, CollisionExists.class, "CollisionExists", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
689 | initEAttribute(getCollisionExists_CollisionTime(), ecorePackage.getEDouble(), "collisionTime", null, 1, 1, CollisionExists.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
690 | |||
691 | initEClass(collisionDoesNotExistEClass, CollisionDoesNotExist.class, "CollisionDoesNotExist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
692 | |||
693 | // Initialize enums and add enum literals | ||
694 | initEEnum(orientationEEnum, Orientation.class, "Orientation"); | ||
695 | addEEnumLiteral(orientationEEnum, Orientation.VERTICAL); | ||
696 | addEEnumLiteral(orientationEEnum, Orientation.HORIZONTAL); | ||
697 | |||
698 | initEEnum(sizeEEnum, Size.class, "Size"); | ||
699 | addEEnumLiteral(sizeEEnum, Size.SMALL); | ||
700 | addEEnumLiteral(sizeEEnum, Size.MEDIUM); | ||
701 | addEEnumLiteral(sizeEEnum, Size.LARGE); | ||
702 | |||
703 | initEEnum(actorTypeEEnum, ActorType.class, "ActorType"); | ||
704 | addEEnumLiteral(actorTypeEEnum, ActorType.PEDESTRIAN); | ||
705 | addEEnumLiteral(actorTypeEEnum, ActorType.VEHICLE); | ||
706 | |||
707 | // Create resource | ||
708 | createResource(eNS_URI); | ||
709 | } | ||
710 | |||
711 | } //SimpleScenarioPackageImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SpatialRelationImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SpatialRelationImpl.java new file mode 100644 index 00000000..b4e0f4b4 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/SpatialRelationImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | |||
7 | import simpleScenario.SimpleScenarioPackage; | ||
8 | import simpleScenario.SpatialRelation; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Spatial Relation</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class SpatialRelationImpl extends RelationImpl implements SpatialRelation { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected SpatialRelationImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return SimpleScenarioPackage.Literals.SPATIAL_RELATION; | ||
35 | } | ||
36 | |||
37 | } //SpatialRelationImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/TemporalRelationImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/TemporalRelationImpl.java new file mode 100644 index 00000000..26f2c712 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/TemporalRelationImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EClass; | ||
6 | |||
7 | import simpleScenario.SimpleScenarioPackage; | ||
8 | import simpleScenario.TemporalRelation; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Temporal Relation</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class TemporalRelationImpl extends RelationImpl implements TemporalRelation { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected TemporalRelationImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return SimpleScenarioPackage.Literals.TEMPORAL_RELATION; | ||
35 | } | ||
36 | |||
37 | } //TemporalRelationImpl | ||
diff --git a/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/VisionBlockedImpl.java b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/VisionBlockedImpl.java new file mode 100644 index 00000000..88222d67 --- /dev/null +++ b/Domains/traffic.scenarios.simplified/ecore-gen/simpleScenario/impl/VisionBlockedImpl.java | |||
@@ -0,0 +1,158 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package simpleScenario.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.InternalEObject; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | |||
12 | import simpleScenario.Actor; | ||
13 | import simpleScenario.SimpleScenarioPackage; | ||
14 | import simpleScenario.VisionBlocked; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model object '<em><b>Vision Blocked</b></em>'. | ||
19 | * <!-- end-user-doc --> | ||
20 | * <p> | ||
21 | * The following features are implemented: | ||
22 | * </p> | ||
23 | * <ul> | ||
24 | * <li>{@link simpleScenario.impl.VisionBlockedImpl#getBlockedBy <em>Blocked By</em>}</li> | ||
25 | * </ul> | ||
26 | * | ||
27 | * @generated | ||
28 | */ | ||
29 | public class VisionBlockedImpl extends SpatialRelationImpl implements VisionBlocked { | ||
30 | /** | ||
31 | * The cached value of the '{@link #getBlockedBy() <em>Blocked By</em>}' reference. | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @see #getBlockedBy() | ||
35 | * @generated | ||
36 | * @ordered | ||
37 | */ | ||
38 | protected Actor blockedBy; | ||
39 | |||
40 | /** | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @generated | ||
44 | */ | ||
45 | protected VisionBlockedImpl() { | ||
46 | super(); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected EClass eStaticClass() { | ||
56 | return SimpleScenarioPackage.Literals.VISION_BLOCKED; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @generated | ||
63 | */ | ||
64 | @Override | ||
65 | public Actor getBlockedBy() { | ||
66 | if (blockedBy != null && blockedBy.eIsProxy()) { | ||
67 | InternalEObject oldBlockedBy = (InternalEObject)blockedBy; | ||
68 | blockedBy = (Actor)eResolveProxy(oldBlockedBy); | ||
69 | if (blockedBy != oldBlockedBy) { | ||
70 | if (eNotificationRequired()) | ||
71 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); | ||
72 | } | ||
73 | } | ||
74 | return blockedBy; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public Actor basicGetBlockedBy() { | ||
83 | return blockedBy; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | @Override | ||
92 | public void setBlockedBy(Actor newBlockedBy) { | ||
93 | Actor oldBlockedBy = blockedBy; | ||
94 | blockedBy = newBlockedBy; | ||
95 | if (eNotificationRequired()) | ||
96 | eNotify(new ENotificationImpl(this, Notification.SET, SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
106 | switch (featureID) { | ||
107 | case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY: | ||
108 | if (resolve) return getBlockedBy(); | ||
109 | return basicGetBlockedBy(); | ||
110 | } | ||
111 | return super.eGet(featureID, resolve, coreType); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public void eSet(int featureID, Object newValue) { | ||
121 | switch (featureID) { | ||
122 | case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY: | ||
123 | setBlockedBy((Actor)newValue); | ||
124 | return; | ||
125 | } | ||
126 | super.eSet(featureID, newValue); | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public void eUnset(int featureID) { | ||
136 | switch (featureID) { | ||
137 | case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY: | ||
138 | setBlockedBy((Actor)null); | ||
139 | return; | ||
140 | } | ||
141 | super.eUnset(featureID); | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | @Override | ||
150 | public boolean eIsSet(int featureID) { | ||
151 | switch (featureID) { | ||
152 | case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY: | ||
153 | return blockedBy != null; | ||
154 | } | ||
155 | return super.eIsSet(featureID); | ||
156 | } | ||
157 | |||
158 | } //VisionBlockedImpl | ||