aboutsummaryrefslogtreecommitdiffstats
path: root/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java')
-rw-r--r--Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java289
1 files changed, 289 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
new file mode 100644
index 00000000..7506e4d7
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
@@ -0,0 +1,289 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl;
4
5import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage;
6import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection;
7import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input;
8import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
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>Connection</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getInput <em>Input</em>}</li>
30 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getOutput <em>Output</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class ConnectionImpl extends MinimalEObjectImpl.Container implements Connection {
36 /**
37 * The cached value of the '{@link #getOutput() <em>Output</em>}' reference.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getOutput()
41 * @generated
42 * @ordered
43 */
44 protected Output output;
45
46 /**
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @generated
50 */
51 protected ConnectionImpl() {
52 super();
53 }
54
55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 @Override
61 protected EClass eStaticClass() {
62 return CftPackage.Literals.CONNECTION;
63 }
64
65 /**
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @generated
69 */
70 @Override
71 public Input getInput() {
72 if (eContainerFeatureID() != CftPackage.CONNECTION__INPUT) return null;
73 return (Input)eInternalContainer();
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public NotificationChain basicSetInput(Input newInput, NotificationChain msgs) {
82 msgs = eBasicSetContainer((InternalEObject)newInput, CftPackage.CONNECTION__INPUT, msgs);
83 return msgs;
84 }
85
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
90 */
91 @Override
92 public void setInput(Input newInput) {
93 if (newInput != eInternalContainer() || (eContainerFeatureID() != CftPackage.CONNECTION__INPUT && newInput != null)) {
94 if (EcoreUtil.isAncestor(this, newInput))
95 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
96 NotificationChain msgs = null;
97 if (eInternalContainer() != null)
98 msgs = eBasicRemoveFromContainer(msgs);
99 if (newInput != null)
100 msgs = ((InternalEObject)newInput).eInverseAdd(this, CftPackage.INPUT__INCOMING_CONNECTIONS, Input.class, msgs);
101 msgs = basicSetInput(newInput, msgs);
102 if (msgs != null) msgs.dispatch();
103 }
104 else if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__INPUT, newInput, newInput));
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public Output getOutput() {
115 if (output != null && output.eIsProxy()) {
116 InternalEObject oldOutput = (InternalEObject)output;
117 output = (Output)eResolveProxy(oldOutput);
118 if (output != oldOutput) {
119 if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.CONNECTION__OUTPUT, oldOutput, output));
121 }
122 }
123 return output;
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 public Output basicGetOutput() {
132 return output;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 public NotificationChain basicSetOutput(Output newOutput, NotificationChain msgs) {
141 Output oldOutput = output;
142 output = newOutput;
143 if (eNotificationRequired()) {
144 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__OUTPUT, oldOutput, newOutput);
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 setOutput(Output newOutput) {
157 if (newOutput != output) {
158 NotificationChain msgs = null;
159 if (output != null)
160 msgs = ((InternalEObject)output).eInverseRemove(this, CftPackage.OUTPUT__OUTGOING_CONNECTIONS, Output.class, msgs);
161 if (newOutput != null)
162 msgs = ((InternalEObject)newOutput).eInverseAdd(this, CftPackage.OUTPUT__OUTGOING_CONNECTIONS, Output.class, msgs);
163 msgs = basicSetOutput(newOutput, msgs);
164 if (msgs != null) msgs.dispatch();
165 }
166 else if (eNotificationRequired())
167 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__OUTPUT, newOutput, newOutput));
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 CftPackage.CONNECTION__INPUT:
179 if (eInternalContainer() != null)
180 msgs = eBasicRemoveFromContainer(msgs);
181 return basicSetInput((Input)otherEnd, msgs);
182 case CftPackage.CONNECTION__OUTPUT:
183 if (output != null)
184 msgs = ((InternalEObject)output).eInverseRemove(this, CftPackage.OUTPUT__OUTGOING_CONNECTIONS, Output.class, msgs);
185 return basicSetOutput((Output)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 CftPackage.CONNECTION__INPUT:
199 return basicSetInput(null, msgs);
200 case CftPackage.CONNECTION__OUTPUT:
201 return basicSetOutput(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 CftPackage.CONNECTION__INPUT:
215 return eInternalContainer().eInverseRemove(this, CftPackage.INPUT__INCOMING_CONNECTIONS, Input.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 CftPackage.CONNECTION__INPUT:
229 return getInput();
230 case CftPackage.CONNECTION__OUTPUT:
231 if (resolve) return getOutput();
232 return basicGetOutput();
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 CftPackage.CONNECTION__INPUT:
246 setInput((Input)newValue);
247 return;
248 case CftPackage.CONNECTION__OUTPUT:
249 setOutput((Output)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 CftPackage.CONNECTION__INPUT:
264 setInput((Input)null);
265 return;
266 case CftPackage.CONNECTION__OUTPUT:
267 setOutput((Output)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 CftPackage.CONNECTION__INPUT:
282 return getInput() != null;
283 case CftPackage.CONNECTION__OUTPUT:
284 return output != null;
285 }
286 return super.eIsSet(featureID);
287 }
288
289} //ConnectionImpl