diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java | 318 |
1 files changed, 318 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java new file mode 100644 index 00000000..2690bcbd --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java | |||
@@ -0,0 +1,318 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package functionalarchitecture.impl; | ||
4 | |||
5 | import functionalarchitecture.Function; | ||
6 | import functionalarchitecture.FunctionalArchitectureModel; | ||
7 | import functionalarchitecture.FunctionalElement; | ||
8 | import functionalarchitecture.FunctionalarchitecturePackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
18 | |||
19 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>Functional Element</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getInterface <em>Interface</em>}</li> | ||
30 | * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getModel <em>Model</em>}</li> | ||
31 | * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getParent <em>Parent</em>}</li> | ||
32 | * </ul> | ||
33 | * | ||
34 | * @generated | ||
35 | */ | ||
36 | public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement { | ||
37 | /** | ||
38 | * The cached value of the '{@link #getInterface() <em>Interface</em>}' containment reference. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getInterface() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected functionalarchitecture.FunctionalInterface interface_; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | protected FunctionalElementImpl() { | ||
53 | super(); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | @Override | ||
62 | protected EClass eStaticClass() { | ||
63 | return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | @Override | ||
72 | public functionalarchitecture.FunctionalInterface getInterface() { | ||
73 | return interface_; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) { | ||
82 | functionalarchitecture.FunctionalInterface oldInterface = interface_; | ||
83 | interface_ = newInterface; | ||
84 | if (eNotificationRequired()) { | ||
85 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface); | ||
86 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
87 | } | ||
88 | return msgs; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public void setInterface(functionalarchitecture.FunctionalInterface newInterface) { | ||
98 | if (newInterface != interface_) { | ||
99 | NotificationChain msgs = null; | ||
100 | if (interface_ != null) | ||
101 | msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs); | ||
102 | if (newInterface != null) | ||
103 | msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs); | ||
104 | msgs = basicSetInterface(newInterface, msgs); | ||
105 | if (msgs != null) msgs.dispatch(); | ||
106 | } | ||
107 | else if (eNotificationRequired()) | ||
108 | eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface)); | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | @Override | ||
117 | public FunctionalArchitectureModel getModel() { | ||
118 | FunctionalArchitectureModel model = basicGetModel(); | ||
119 | return model != null && model.eIsProxy() ? (FunctionalArchitectureModel)eResolveProxy((InternalEObject)model) : model; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public FunctionalArchitectureModel basicGetModel() { | ||
128 | // TODO: implement this method to return the 'Model' reference | ||
129 | // -> do not perform proxy resolution | ||
130 | // Ensure that you remove @generated or mark it @generated NOT | ||
131 | throw new UnsupportedOperationException(); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public void setModel(FunctionalArchitectureModel newModel) { | ||
141 | // TODO: implement this method to set the 'Model' reference | ||
142 | // Ensure that you remove @generated or mark it @generated NOT | ||
143 | throw new UnsupportedOperationException(); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public Function getParent() { | ||
153 | if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT) return null; | ||
154 | return (Function)eInternalContainer(); | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * <!-- begin-user-doc --> | ||
159 | * <!-- end-user-doc --> | ||
160 | * @generated | ||
161 | */ | ||
162 | public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) { | ||
163 | msgs = eBasicSetContainer((InternalEObject)newParent, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, msgs); | ||
164 | return msgs; | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
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((functionalarchitecture.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((functionalarchitecture.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((functionalarchitecture.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 basicGetModel() != null; | ||
312 | case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: | ||
313 | return getParent() != null; | ||
314 | } | ||
315 | return super.eIsSet(featureID); | ||
316 | } | ||
317 | |||
318 | } //FunctionalElementImpl | ||