aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java')
-rw-r--r--Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java318
1 files changed, 318 insertions, 0 deletions
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java
new file mode 100644
index 00000000..809e9ed5
--- /dev/null
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java
@@ -0,0 +1,318 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.Function;
6import functionalarchitecture.FunctionalArchitectureModel;
7import functionalarchitecture.FunctionalElement;
8import functionalarchitecture.FunctionalInterface;
9import functionalarchitecture.FunctionalarchitecturePackage;
10
11import org.eclipse.emf.common.notify.Notification;
12import org.eclipse.emf.common.notify.NotificationChain;
13
14import org.eclipse.emf.ecore.EClass;
15import org.eclipse.emf.ecore.EStructuralFeature;
16import org.eclipse.emf.ecore.InternalEObject;
17
18import org.eclipse.emf.ecore.impl.ENotificationImpl;
19import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
20
21import org.eclipse.emf.ecore.util.EcoreUtil;
22
23/**
24 * <!-- begin-user-doc -->
25 * An implementation of the model object '<em><b>Functional Element</b></em>'.
26 * <!-- end-user-doc -->
27 * <p>
28 * The following features are implemented:
29 * </p>
30 * <ul>
31 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getInterface <em>Interface</em>}</li>
32 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getModel <em>Model</em>}</li>
33 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getParent <em>Parent</em>}</li>
34 * </ul>
35 *
36 * @generated
37 */
38public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement {
39 /**
40 * The cached value of the '{@link #getInterface() <em>Interface</em>}' containment reference.
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
43 * @see #getInterface()
44 * @generated
45 * @ordered
46 */
47 protected FunctionalInterface interface_;
48
49 /**
50 * The cached setting delegate for the '{@link #getModel() <em>Model</em>}' reference.
51 * <!-- begin-user-doc -->
52 * <!-- end-user-doc -->
53 * @see #getModel()
54 * @generated
55 * @ordered
56 */
57 protected EStructuralFeature.Internal.SettingDelegate MODEL__ESETTING_DELEGATE = ((EStructuralFeature.Internal)FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT__MODEL).getSettingDelegate();
58
59 /**
60 * <!-- begin-user-doc -->
61 * <!-- end-user-doc -->
62 * @generated
63 */
64 protected FunctionalElementImpl() {
65 super();
66 }
67
68 /**
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @generated
72 */
73 @Override
74 protected EClass eStaticClass() {
75 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT;
76 }
77
78 /**
79 * <!-- begin-user-doc -->
80 * <!-- end-user-doc -->
81 * @generated
82 */
83 public FunctionalInterface getInterface() {
84 return interface_;
85 }
86
87 /**
88 * <!-- begin-user-doc -->
89 * <!-- end-user-doc -->
90 * @generated
91 */
92 public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) {
93 FunctionalInterface oldInterface = interface_;
94 interface_ = newInterface;
95 if (eNotificationRequired()) {
96 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface);
97 if (msgs == null) msgs = notification; else msgs.add(notification);
98 }
99 return msgs;
100 }
101
102 /**
103 * <!-- begin-user-doc -->
104 * <!-- end-user-doc -->
105 * @generated
106 */
107 public void setInterface(FunctionalInterface newInterface) {
108 if (newInterface != interface_) {
109 NotificationChain msgs = null;
110 if (interface_ != null)
111 msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs);
112 if (newInterface != null)
113 msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs);
114 msgs = basicSetInterface(newInterface, msgs);
115 if (msgs != null) msgs.dispatch();
116 }
117 else if (eNotificationRequired())
118 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface));
119 }
120
121 /**
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @generated
125 */
126 public FunctionalArchitectureModel getModel() {
127 return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false);
128 }
129
130 /**
131 * <!-- begin-user-doc -->
132 * <!-- end-user-doc -->
133 * @generated
134 */
135 public FunctionalArchitectureModel basicGetModel() {
136 return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, false, false);
137 }
138
139 /**
140 * <!-- begin-user-doc -->
141 * <!-- end-user-doc -->
142 * @generated
143 */
144 public void setModel(FunctionalArchitectureModel newModel) {
145 MODEL__ESETTING_DELEGATE.dynamicSet(this, null, 0, newModel);
146 }
147
148 /**
149 * <!-- begin-user-doc -->
150 * <!-- end-user-doc -->
151 * @generated
152 */
153 public Function getParent() {
154 if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT) return null;
155 return (Function)eInternalContainer();
156 }
157
158 /**
159 * <!-- begin-user-doc -->
160 * <!-- end-user-doc -->
161 * @generated
162 */
163 public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) {
164 msgs = eBasicSetContainer((InternalEObject)newParent, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, msgs);
165 return msgs;
166 }
167
168 /**
169 * <!-- begin-user-doc -->
170 * <!-- end-user-doc -->
171 * @generated
172 */
173 public void setParent(Function newParent) {
174 if (newParent != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT && newParent != null)) {
175 if (EcoreUtil.isAncestor(this, newParent))
176 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
177 NotificationChain msgs = null;
178 if (eInternalContainer() != null)
179 msgs = eBasicRemoveFromContainer(msgs);
180 if (newParent != null)
181 msgs = ((InternalEObject)newParent).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs);
182 msgs = basicSetParent(newParent, msgs);
183 if (msgs != null) msgs.dispatch();
184 }
185 else if (eNotificationRequired())
186 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, newParent, newParent));
187 }
188
189 /**
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 @Override
195 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
196 switch (featureID) {
197 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
198 if (interface_ != null)
199 msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs);
200 return basicSetInterface((FunctionalInterface)otherEnd, msgs);
201 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
202 if (eInternalContainer() != null)
203 msgs = eBasicRemoveFromContainer(msgs);
204 return basicSetParent((Function)otherEnd, msgs);
205 }
206 return super.eInverseAdd(otherEnd, featureID, msgs);
207 }
208
209 /**
210 * <!-- begin-user-doc -->
211 * <!-- end-user-doc -->
212 * @generated
213 */
214 @Override
215 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
216 switch (featureID) {
217 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
218 return basicSetInterface(null, msgs);
219 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
220 return basicSetParent(null, msgs);
221 }
222 return super.eInverseRemove(otherEnd, featureID, msgs);
223 }
224
225 /**
226 * <!-- begin-user-doc -->
227 * <!-- end-user-doc -->
228 * @generated
229 */
230 @Override
231 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
232 switch (eContainerFeatureID()) {
233 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
234 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs);
235 }
236 return super.eBasicRemoveFromContainerFeature(msgs);
237 }
238
239 /**
240 * <!-- begin-user-doc -->
241 * <!-- end-user-doc -->
242 * @generated
243 */
244 @Override
245 public Object eGet(int featureID, boolean resolve, boolean coreType) {
246 switch (featureID) {
247 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
248 return getInterface();
249 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
250 if (resolve) return getModel();
251 return basicGetModel();
252 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
253 return getParent();
254 }
255 return super.eGet(featureID, resolve, coreType);
256 }
257
258 /**
259 * <!-- begin-user-doc -->
260 * <!-- end-user-doc -->
261 * @generated
262 */
263 @Override
264 public void eSet(int featureID, Object newValue) {
265 switch (featureID) {
266 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
267 setInterface((FunctionalInterface)newValue);
268 return;
269 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
270 setModel((FunctionalArchitectureModel)newValue);
271 return;
272 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
273 setParent((Function)newValue);
274 return;
275 }
276 super.eSet(featureID, newValue);
277 }
278
279 /**
280 * <!-- begin-user-doc -->
281 * <!-- end-user-doc -->
282 * @generated
283 */
284 @Override
285 public void eUnset(int featureID) {
286 switch (featureID) {
287 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
288 setInterface((FunctionalInterface)null);
289 return;
290 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
291 setModel((FunctionalArchitectureModel)null);
292 return;
293 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
294 setParent((Function)null);
295 return;
296 }
297 super.eUnset(featureID);
298 }
299
300 /**
301 * <!-- begin-user-doc -->
302 * <!-- end-user-doc -->
303 * @generated
304 */
305 @Override
306 public boolean eIsSet(int featureID) {
307 switch (featureID) {
308 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
309 return interface_ != null;
310 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
311 return MODEL__ESETTING_DELEGATE.dynamicIsSet(this, null, 0);
312 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
313 return getParent() != null;
314 }
315 return super.eIsSet(featureID);
316 }
317
318} //FunctionalElementImpl