diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java | 245 |
1 files changed, 245 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java new file mode 100644 index 00000000..fe7f4e75 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java | |||
@@ -0,0 +1,245 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package functionalarchitecture.impl; | ||
4 | |||
5 | import functionalarchitecture.FunctionalData; | ||
6 | import functionalarchitecture.FunctionalElement; | ||
7 | import functionalarchitecture.FunctionalarchitecturePackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.Notification; | ||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
23 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Functional Interface</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link functionalarchitecture.impl.FunctionalInterfaceImpl#getData <em>Data</em>}</li> | ||
35 | * <li>{@link functionalarchitecture.impl.FunctionalInterfaceImpl#getElement <em>Element</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements functionalarchitecture.FunctionalInterface { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getData() <em>Data</em>}' containment reference list. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getData() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected EList<FunctionalData> data; | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | protected FunctionalInterfaceImpl() { | ||
57 | super(); | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | protected EClass eStaticClass() { | ||
67 | return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INTERFACE; | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | @Override | ||
76 | public EList<FunctionalData> getData() { | ||
77 | if (data == null) { | ||
78 | data = new EObjectContainmentWithInverseEList<FunctionalData>(FunctionalData.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE); | ||
79 | } | ||
80 | return data; | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | @Override | ||
89 | public FunctionalElement getElement() { | ||
90 | if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT) return null; | ||
91 | return (FunctionalElement)eInternalContainer(); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | public NotificationChain basicSetElement(FunctionalElement newElement, NotificationChain msgs) { | ||
100 | msgs = eBasicSetContainer((InternalEObject)newElement, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, msgs); | ||
101 | return msgs; | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | public void setElement(FunctionalElement newElement) { | ||
111 | if (newElement != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT && newElement != null)) { | ||
112 | if (EcoreUtil.isAncestor(this, newElement)) | ||
113 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
114 | NotificationChain msgs = null; | ||
115 | if (eInternalContainer() != null) | ||
116 | msgs = eBasicRemoveFromContainer(msgs); | ||
117 | if (newElement != null) | ||
118 | msgs = ((InternalEObject)newElement).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); | ||
119 | msgs = basicSetElement(newElement, msgs); | ||
120 | if (msgs != null) msgs.dispatch(); | ||
121 | } | ||
122 | else if (eNotificationRequired()) | ||
123 | eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, newElement, newElement)); | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | @SuppressWarnings("unchecked") | ||
132 | @Override | ||
133 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
134 | switch (featureID) { | ||
135 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
136 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getData()).basicAdd(otherEnd, msgs); | ||
137 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
138 | if (eInternalContainer() != null) | ||
139 | msgs = eBasicRemoveFromContainer(msgs); | ||
140 | return basicSetElement((FunctionalElement)otherEnd, msgs); | ||
141 | } | ||
142 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
152 | switch (featureID) { | ||
153 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
154 | return ((InternalEList<?>)getData()).basicRemove(otherEnd, msgs); | ||
155 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
156 | return basicSetElement(null, msgs); | ||
157 | } | ||
158 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * <!-- begin-user-doc --> | ||
163 | * <!-- end-user-doc --> | ||
164 | * @generated | ||
165 | */ | ||
166 | @Override | ||
167 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
168 | switch (eContainerFeatureID()) { | ||
169 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
170 | return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); | ||
171 | } | ||
172 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
173 | } | ||
174 | |||
175 | /** | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @generated | ||
179 | */ | ||
180 | @Override | ||
181 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
182 | switch (featureID) { | ||
183 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
184 | return getData(); | ||
185 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
186 | return getElement(); | ||
187 | } | ||
188 | return super.eGet(featureID, resolve, coreType); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * <!-- begin-user-doc --> | ||
193 | * <!-- end-user-doc --> | ||
194 | * @generated | ||
195 | */ | ||
196 | @SuppressWarnings("unchecked") | ||
197 | @Override | ||
198 | public void eSet(int featureID, Object newValue) { | ||
199 | switch (featureID) { | ||
200 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
201 | getData().clear(); | ||
202 | getData().addAll((Collection<? extends FunctionalData>)newValue); | ||
203 | return; | ||
204 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
205 | setElement((FunctionalElement)newValue); | ||
206 | return; | ||
207 | } | ||
208 | super.eSet(featureID, newValue); | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | @Override | ||
217 | public void eUnset(int featureID) { | ||
218 | switch (featureID) { | ||
219 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
220 | getData().clear(); | ||
221 | return; | ||
222 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
223 | setElement((FunctionalElement)null); | ||
224 | return; | ||
225 | } | ||
226 | super.eUnset(featureID); | ||
227 | } | ||
228 | |||
229 | /** | ||
230 | * <!-- begin-user-doc --> | ||
231 | * <!-- end-user-doc --> | ||
232 | * @generated | ||
233 | */ | ||
234 | @Override | ||
235 | public boolean eIsSet(int featureID) { | ||
236 | switch (featureID) { | ||
237 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: | ||
238 | return data != null && !data.isEmpty(); | ||
239 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: | ||
240 | return getElement() != null; | ||
241 | } | ||
242 | return super.eIsSet(featureID); | ||
243 | } | ||
244 | |||
245 | } //FunctionalInterfaceImpl | ||