aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java')
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java289
1 files changed, 289 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java
new file mode 100644
index 00000000..bf5d5db8
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java
@@ -0,0 +1,289 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalInput;
6import functionalarchitecture.FunctionalOutput;
7import functionalarchitecture.FunctionalarchitecturePackage;
8import functionalarchitecture.InformationLink;
9
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;
17import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
18
19import org.eclipse.emf.ecore.util.EcoreUtil;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Information Link</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link functionalarchitecture.impl.InformationLinkImpl#getFrom <em>From</em>}</li>
30 * <li>{@link functionalarchitecture.impl.InformationLinkImpl#getTo <em>To</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class InformationLinkImpl extends MinimalEObjectImpl.Container implements InformationLink {
36 /**
37 * The cached value of the '{@link #getTo() <em>To</em>}' reference.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getTo()
41 * @generated
42 * @ordered
43 */
44 protected FunctionalInput to;
45
46 /**
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @generated
50 */
51 protected InformationLinkImpl() {
52 super();
53 }
54
55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 @Override
61 protected EClass eStaticClass() {
62 return FunctionalarchitecturePackage.Literals.INFORMATION_LINK;
63 }
64
65 /**
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @generated
69 */
70 @Override
71 public FunctionalOutput getFrom() {
72 if (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM) return null;
73 return (FunctionalOutput)eInternalContainer();
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public NotificationChain basicSetFrom(FunctionalOutput newFrom, NotificationChain msgs) {
82 msgs = eBasicSetContainer((InternalEObject)newFrom, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, msgs);
83 return msgs;
84 }
85
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
90 */
91 @Override
92 public void setFrom(FunctionalOutput newFrom) {
93 if (newFrom != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM && newFrom != null)) {
94 if (EcoreUtil.isAncestor(this, newFrom))
95 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
96 NotificationChain msgs = null;
97 if (eInternalContainer() != null)
98 msgs = eBasicRemoveFromContainer(msgs);
99 if (newFrom != null)
100 msgs = ((InternalEObject)newFrom).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs);
101 msgs = basicSetFrom(newFrom, msgs);
102 if (msgs != null) msgs.dispatch();
103 }
104 else if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, newFrom, newFrom));
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public FunctionalInput getTo() {
115 if (to != null && to.eIsProxy()) {
116 InternalEObject oldTo = (InternalEObject)to;
117 to = (FunctionalInput)eResolveProxy(oldTo);
118 if (to != oldTo) {
119 if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, to));
121 }
122 }
123 return to;
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 public FunctionalInput basicGetTo() {
132 return to;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 public NotificationChain basicSetTo(FunctionalInput newTo, NotificationChain msgs) {
141 FunctionalInput oldTo = to;
142 to = newTo;
143 if (eNotificationRequired()) {
144 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, newTo);
145 if (msgs == null) msgs = notification; else msgs.add(notification);
146 }
147 return msgs;
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 @Override
156 public void setTo(FunctionalInput newTo) {
157 if (newTo != to) {
158 NotificationChain msgs = null;
159 if (to != null)
160 msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
161 if (newTo != null)
162 msgs = ((InternalEObject)newTo).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
163 msgs = basicSetTo(newTo, msgs);
164 if (msgs != null) msgs.dispatch();
165 }
166 else if (eNotificationRequired())
167 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, newTo, newTo));
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @Override
176 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
177 switch (featureID) {
178 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
179 if (eInternalContainer() != null)
180 msgs = eBasicRemoveFromContainer(msgs);
181 return basicSetFrom((FunctionalOutput)otherEnd, msgs);
182 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
183 if (to != null)
184 msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
185 return basicSetTo((FunctionalInput)otherEnd, msgs);
186 }
187 return super.eInverseAdd(otherEnd, featureID, msgs);
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 @Override
196 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
197 switch (featureID) {
198 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
199 return basicSetFrom(null, msgs);
200 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
201 return basicSetTo(null, msgs);
202 }
203 return super.eInverseRemove(otherEnd, featureID, msgs);
204 }
205
206 /**
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @generated
210 */
211 @Override
212 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
213 switch (eContainerFeatureID()) {
214 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
215 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs);
216 }
217 return super.eBasicRemoveFromContainerFeature(msgs);
218 }
219
220 /**
221 * <!-- begin-user-doc -->
222 * <!-- end-user-doc -->
223 * @generated
224 */
225 @Override
226 public Object eGet(int featureID, boolean resolve, boolean coreType) {
227 switch (featureID) {
228 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
229 return getFrom();
230 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
231 if (resolve) return getTo();
232 return basicGetTo();
233 }
234 return super.eGet(featureID, resolve, coreType);
235 }
236
237 /**
238 * <!-- begin-user-doc -->
239 * <!-- end-user-doc -->
240 * @generated
241 */
242 @Override
243 public void eSet(int featureID, Object newValue) {
244 switch (featureID) {
245 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
246 setFrom((FunctionalOutput)newValue);
247 return;
248 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
249 setTo((FunctionalInput)newValue);
250 return;
251 }
252 super.eSet(featureID, newValue);
253 }
254
255 /**
256 * <!-- begin-user-doc -->
257 * <!-- end-user-doc -->
258 * @generated
259 */
260 @Override
261 public void eUnset(int featureID) {
262 switch (featureID) {
263 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
264 setFrom((FunctionalOutput)null);
265 return;
266 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
267 setTo((FunctionalInput)null);
268 return;
269 }
270 super.eUnset(featureID);
271 }
272
273 /**
274 * <!-- begin-user-doc -->
275 * <!-- end-user-doc -->
276 * @generated
277 */
278 @Override
279 public boolean eIsSet(int featureID) {
280 switch (featureID) {
281 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
282 return getFrom() != null;
283 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
284 return to != null;
285 }
286 return super.eIsSet(featureID);
287 }
288
289} //InformationLinkImpl