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