aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java')
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java255
1 files changed, 255 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
new file mode 100644
index 00000000..2135af2c
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
@@ -0,0 +1,255 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.satellite.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft;
8
9import hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind;
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.InternalEObject;
15
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17
18/**
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>Spacecraft</b></em>'.
21 * <!-- end-user-doc -->
22 * <p>
23 * The following features are implemented:
24 * </p>
25 * <ul>
26 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SpacecraftImpl#getPayload <em>Payload</em>}</li>
27 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SpacecraftImpl#getKind <em>Kind</em>}</li>
28 * </ul>
29 *
30 * @generated
31 */
32public abstract class SpacecraftImpl extends CommunicatingElementImpl implements Spacecraft {
33 /**
34 * The cached value of the '{@link #getPayload() <em>Payload</em>}' containment reference.
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @see #getPayload()
38 * @generated
39 * @ordered
40 */
41 protected Payload payload;
42
43 /**
44 * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
45 * <!-- begin-user-doc -->
46 * <!-- end-user-doc -->
47 * @see #getKind()
48 * @generated
49 * @ordered
50 */
51 protected static final SpacecraftKind KIND_EDEFAULT = SpacecraftKind.CUBE_SAT3_U;
52 /**
53 * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @see #getKind()
57 * @generated
58 * @ordered
59 */
60 protected SpacecraftKind kind = KIND_EDEFAULT;
61
62 /**
63 * <!-- begin-user-doc -->
64 * <!-- end-user-doc -->
65 * @generated
66 */
67 protected SpacecraftImpl() {
68 super();
69 }
70
71 /**
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 */
76 @Override
77 protected EClass eStaticClass() {
78 return SatellitePackage.Literals.SPACECRAFT;
79 }
80
81 /**
82 * <!-- begin-user-doc -->
83 * <!-- end-user-doc -->
84 * @generated
85 */
86 @Override
87 public Payload getPayload() {
88 return payload;
89 }
90
91 /**
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @generated
95 */
96 public NotificationChain basicSetPayload(Payload newPayload, NotificationChain msgs) {
97 Payload oldPayload = payload;
98 payload = newPayload;
99 if (eNotificationRequired()) {
100 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
101 SatellitePackage.SPACECRAFT__PAYLOAD, oldPayload, newPayload);
102 if (msgs == null)
103 msgs = notification;
104 else
105 msgs.add(notification);
106 }
107 return msgs;
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public void setPayload(Payload newPayload) {
117 if (newPayload != payload) {
118 NotificationChain msgs = null;
119 if (payload != null)
120 msgs = ((InternalEObject) payload).eInverseRemove(this,
121 EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs);
122 if (newPayload != null)
123 msgs = ((InternalEObject) newPayload).eInverseAdd(this,
124 EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs);
125 msgs = basicSetPayload(newPayload, msgs);
126 if (msgs != null)
127 msgs.dispatch();
128 } else if (eNotificationRequired())
129 eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, newPayload,
130 newPayload));
131 }
132
133 /**
134 * <!-- begin-user-doc -->
135 * <!-- end-user-doc -->
136 * @generated
137 */
138 @Override
139 public SpacecraftKind getKind() {
140 return kind;
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 @Override
149 public void setKind(SpacecraftKind newKind) {
150 SpacecraftKind oldKind = kind;
151 kind = newKind == null ? KIND_EDEFAULT : newKind;
152 if (eNotificationRequired())
153 eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__KIND, oldKind, kind));
154 }
155
156 /**
157 * <!-- begin-user-doc -->
158 * <!-- end-user-doc -->
159 * @generated
160 */
161 @Override
162 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
163 switch (featureID) {
164 case SatellitePackage.SPACECRAFT__PAYLOAD:
165 return basicSetPayload(null, msgs);
166 }
167 return super.eInverseRemove(otherEnd, featureID, msgs);
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @Override
176 public Object eGet(int featureID, boolean resolve, boolean coreType) {
177 switch (featureID) {
178 case SatellitePackage.SPACECRAFT__PAYLOAD:
179 return getPayload();
180 case SatellitePackage.SPACECRAFT__KIND:
181 return getKind();
182 }
183 return super.eGet(featureID, resolve, coreType);
184 }
185
186 /**
187 * <!-- begin-user-doc -->
188 * <!-- end-user-doc -->
189 * @generated
190 */
191 @Override
192 public void eSet(int featureID, Object newValue) {
193 switch (featureID) {
194 case SatellitePackage.SPACECRAFT__PAYLOAD:
195 setPayload((Payload) newValue);
196 return;
197 case SatellitePackage.SPACECRAFT__KIND:
198 setKind((SpacecraftKind) newValue);
199 return;
200 }
201 super.eSet(featureID, newValue);
202 }
203
204 /**
205 * <!-- begin-user-doc -->
206 * <!-- end-user-doc -->
207 * @generated
208 */
209 @Override
210 public void eUnset(int featureID) {
211 switch (featureID) {
212 case SatellitePackage.SPACECRAFT__PAYLOAD:
213 setPayload((Payload) null);
214 return;
215 case SatellitePackage.SPACECRAFT__KIND:
216 setKind(KIND_EDEFAULT);
217 return;
218 }
219 super.eUnset(featureID);
220 }
221
222 /**
223 * <!-- begin-user-doc -->
224 * <!-- end-user-doc -->
225 * @generated
226 */
227 @Override
228 public boolean eIsSet(int featureID) {
229 switch (featureID) {
230 case SatellitePackage.SPACECRAFT__PAYLOAD:
231 return payload != null;
232 case SatellitePackage.SPACECRAFT__KIND:
233 return kind != KIND_EDEFAULT;
234 }
235 return super.eIsSet(featureID);
236 }
237
238 /**
239 * <!-- begin-user-doc -->
240 * <!-- end-user-doc -->
241 * @generated
242 */
243 @Override
244 public String toString() {
245 if (eIsProxy())
246 return super.toString();
247
248 StringBuilder result = new StringBuilder(super.toString());
249 result.append(" (kind: ");
250 result.append(kind);
251 result.append(')');
252 return result.toString();
253 }
254
255} //SpacecraftImpl