aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java224
1 files changed, 224 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java
new file mode 100644
index 00000000..3b70f35f
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/satellite/impl/ConstellationMissionImpl.java
@@ -0,0 +1,224 @@
1/**
2 */
3package satellite.impl;
4
5import java.util.Collection;
6
7import org.eclipse.emf.common.notify.Notification;
8import org.eclipse.emf.common.notify.NotificationChain;
9
10import org.eclipse.emf.common.util.EList;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EObjectContainmentEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21import satellite.ConstellationMission;
22import satellite.GroundStationNetwork;
23import satellite.SatellitePackage;
24import satellite.Spacecraft;
25
26/**
27 * <!-- begin-user-doc -->
28 * An implementation of the model object '<em><b>Constellation Mission</b></em>'.
29 * <!-- end-user-doc -->
30 * <p>
31 * The following features are implemented:
32 * </p>
33 * <ul>
34 * <li>{@link satellite.impl.ConstellationMissionImpl#getGroundStationNetwork <em>Ground Station Network</em>}</li>
35 * <li>{@link satellite.impl.ConstellationMissionImpl#getSpacecraft <em>Spacecraft</em>}</li>
36 * </ul>
37 *
38 * @generated
39 */
40public abstract class ConstellationMissionImpl extends MinimalEObjectImpl.Container implements ConstellationMission {
41 /**
42 * The cached value of the '{@link #getGroundStationNetwork() <em>Ground Station Network</em>}' containment reference.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getGroundStationNetwork()
46 * @generated
47 * @ordered
48 */
49 protected GroundStationNetwork groundStationNetwork;
50
51 /**
52 * The cached value of the '{@link #getSpacecraft() <em>Spacecraft</em>}' containment reference list.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @see #getSpacecraft()
56 * @generated
57 * @ordered
58 */
59 protected EList<Spacecraft> spacecraft;
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 protected ConstellationMissionImpl() {
67 super();
68 }
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 @Override
76 protected EClass eStaticClass() {
77 return SatellitePackage.Literals.CONSTELLATION_MISSION;
78 }
79
80 /**
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 */
85 @Override
86 public GroundStationNetwork getGroundStationNetwork() {
87 return groundStationNetwork;
88 }
89
90 /**
91 * <!-- begin-user-doc -->
92 * <!-- end-user-doc -->
93 * @generated
94 */
95 public NotificationChain basicSetGroundStationNetwork(GroundStationNetwork newGroundStationNetwork, NotificationChain msgs) {
96 GroundStationNetwork oldGroundStationNetwork = groundStationNetwork;
97 groundStationNetwork = newGroundStationNetwork;
98 if (eNotificationRequired()) {
99 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, oldGroundStationNetwork, newGroundStationNetwork);
100 if (msgs == null) msgs = notification; else msgs.add(notification);
101 }
102 return msgs;
103 }
104
105 /**
106 * <!-- begin-user-doc -->
107 * <!-- end-user-doc -->
108 * @generated
109 */
110 @Override
111 public void setGroundStationNetwork(GroundStationNetwork newGroundStationNetwork) {
112 if (newGroundStationNetwork != groundStationNetwork) {
113 NotificationChain msgs = null;
114 if (groundStationNetwork != null)
115 msgs = ((InternalEObject)groundStationNetwork).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, null, msgs);
116 if (newGroundStationNetwork != null)
117 msgs = ((InternalEObject)newGroundStationNetwork).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, null, msgs);
118 msgs = basicSetGroundStationNetwork(newGroundStationNetwork, msgs);
119 if (msgs != null) msgs.dispatch();
120 }
121 else if (eNotificationRequired())
122 eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, newGroundStationNetwork, newGroundStationNetwork));
123 }
124
125 /**
126 * <!-- begin-user-doc -->
127 * <!-- end-user-doc -->
128 * @generated
129 */
130 @Override
131 public EList<Spacecraft> getSpacecraft() {
132 if (spacecraft == null) {
133 spacecraft = new EObjectContainmentEList<Spacecraft>(Spacecraft.class, this, SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT);
134 }
135 return spacecraft;
136 }
137
138 /**
139 * <!-- begin-user-doc -->
140 * <!-- end-user-doc -->
141 * @generated
142 */
143 @Override
144 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
145 switch (featureID) {
146 case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK:
147 return basicSetGroundStationNetwork(null, msgs);
148 case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT:
149 return ((InternalEList<?>)getSpacecraft()).basicRemove(otherEnd, msgs);
150 }
151 return super.eInverseRemove(otherEnd, featureID, msgs);
152 }
153
154 /**
155 * <!-- begin-user-doc -->
156 * <!-- end-user-doc -->
157 * @generated
158 */
159 @Override
160 public Object eGet(int featureID, boolean resolve, boolean coreType) {
161 switch (featureID) {
162 case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK:
163 return getGroundStationNetwork();
164 case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT:
165 return getSpacecraft();
166 }
167 return super.eGet(featureID, resolve, coreType);
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @SuppressWarnings("unchecked")
176 @Override
177 public void eSet(int featureID, Object newValue) {
178 switch (featureID) {
179 case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK:
180 setGroundStationNetwork((GroundStationNetwork)newValue);
181 return;
182 case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT:
183 getSpacecraft().clear();
184 getSpacecraft().addAll((Collection<? extends Spacecraft>)newValue);
185 return;
186 }
187 super.eSet(featureID, newValue);
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 @Override
196 public void eUnset(int featureID) {
197 switch (featureID) {
198 case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK:
199 setGroundStationNetwork((GroundStationNetwork)null);
200 return;
201 case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT:
202 getSpacecraft().clear();
203 return;
204 }
205 super.eUnset(featureID);
206 }
207
208 /**
209 * <!-- begin-user-doc -->
210 * <!-- end-user-doc -->
211 * @generated
212 */
213 @Override
214 public boolean eIsSet(int featureID) {
215 switch (featureID) {
216 case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK:
217 return groundStationNetwork != null;
218 case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT:
219 return spacecraft != null && !spacecraft.isEmpty();
220 }
221 return super.eIsSet(featureID);
222 }
223
224} //ConstellationMissionImpl