diff options
author | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-01-05 23:44:50 +0100 |
---|---|---|
committer | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-01-05 23:44:50 +0100 |
commit | d53ae070b68fc3bc429c1467f62779ba08d35755 (patch) | |
tree | 88e2de252727011a2ba2033aa0267eb211eec208 /Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java | |
parent | Prefer the global scope insted of nsURI in application configuration (diff) | |
parent | add readme and diversity measurements (diff) | |
download | VIATRA-Generator-d53ae070b68fc3bc429c1467f62779ba08d35755.tar.gz VIATRA-Generator-d53ae070b68fc3bc429c1467f62779ba08d35755.tar.zst VIATRA-Generator-d53ae070b68fc3bc429c1467f62779ba08d35755.zip |
merge models20 measurements
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java new file mode 100644 index 00000000..c7dff706 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/SpacecraftImpl.java | |||
@@ -0,0 +1,177 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package satellite.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | |||
13 | import satellite.Payload; | ||
14 | import satellite.SatellitePackage; | ||
15 | import satellite.Spacecraft; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Spacecraft</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link satellite.impl.SpacecraftImpl#getPayload <em>Payload</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public abstract class SpacecraftImpl extends CommunicatingElementImpl implements Spacecraft { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getPayload() <em>Payload</em>}' containment reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getPayload() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Payload payload; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected SpacecraftImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return SatellitePackage.Literals.SPACECRAFT; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | public Payload getPayload() { | ||
67 | return payload; | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | public NotificationChain basicSetPayload(Payload newPayload, NotificationChain msgs) { | ||
76 | Payload oldPayload = payload; | ||
77 | payload = newPayload; | ||
78 | if (eNotificationRequired()) { | ||
79 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, oldPayload, newPayload); | ||
80 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
81 | } | ||
82 | return msgs; | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @generated | ||
89 | */ | ||
90 | @Override | ||
91 | public void setPayload(Payload newPayload) { | ||
92 | if (newPayload != payload) { | ||
93 | NotificationChain msgs = null; | ||
94 | if (payload != null) | ||
95 | msgs = ((InternalEObject)payload).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); | ||
96 | if (newPayload != null) | ||
97 | msgs = ((InternalEObject)newPayload).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); | ||
98 | msgs = basicSetPayload(newPayload, msgs); | ||
99 | if (msgs != null) msgs.dispatch(); | ||
100 | } | ||
101 | else if (eNotificationRequired()) | ||
102 | eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, newPayload, newPayload)); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
112 | switch (featureID) { | ||
113 | case SatellitePackage.SPACECRAFT__PAYLOAD: | ||
114 | return basicSetPayload(null, msgs); | ||
115 | } | ||
116 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
126 | switch (featureID) { | ||
127 | case SatellitePackage.SPACECRAFT__PAYLOAD: | ||
128 | return getPayload(); | ||
129 | } | ||
130 | return super.eGet(featureID, resolve, coreType); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public void eSet(int featureID, Object newValue) { | ||
140 | switch (featureID) { | ||
141 | case SatellitePackage.SPACECRAFT__PAYLOAD: | ||
142 | setPayload((Payload)newValue); | ||
143 | return; | ||
144 | } | ||
145 | super.eSet(featureID, newValue); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public void eUnset(int featureID) { | ||
155 | switch (featureID) { | ||
156 | case SatellitePackage.SPACECRAFT__PAYLOAD: | ||
157 | setPayload((Payload)null); | ||
158 | return; | ||
159 | } | ||
160 | super.eUnset(featureID); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public boolean eIsSet(int featureID) { | ||
170 | switch (featureID) { | ||
171 | case SatellitePackage.SPACECRAFT__PAYLOAD: | ||
172 | return payload != null; | ||
173 | } | ||
174 | return super.eIsSet(featureID); | ||
175 | } | ||
176 | |||
177 | } //SpacecraftImpl | ||