aboutsummaryrefslogtreecommitdiffstats
path: root/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OutputImpl.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/OutputImpl.java')
-rw-r--r--Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OutputImpl.java309
1 files changed, 309 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/OutputImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OutputImpl.java
new file mode 100644
index 00000000..31a81afe
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OutputImpl.java
@@ -0,0 +1,309 @@
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.Component;
7import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection;
8import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration;
9import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
10
11import java.util.Collection;
12
13import org.eclipse.emf.common.notify.Notification;
14import org.eclipse.emf.common.notify.NotificationChain;
15
16import org.eclipse.emf.common.util.EList;
17
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.emf.ecore.InternalEObject;
20
21import org.eclipse.emf.ecore.impl.ENotificationImpl;
22import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
23
24import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
25import org.eclipse.emf.ecore.util.EcoreUtil;
26import org.eclipse.emf.ecore.util.InternalEList;
27
28/**
29 * <!-- begin-user-doc -->
30 * An implementation of the model object '<em><b>Output</b></em>'.
31 * <!-- end-user-doc -->
32 * <p>
33 * The following features are implemented:
34 * </p>
35 * <ul>
36 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.OutputImpl#getEventDeclaration <em>Event Declaration</em>}</li>
37 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.OutputImpl#getOutgoingConnections <em>Outgoing Connections</em>}</li>
38 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.OutputImpl#getComponent <em>Component</em>}</li>
39 * </ul>
40 *
41 * @generated
42 */
43public class OutputImpl extends MinimalEObjectImpl.Container implements Output {
44 /**
45 * The cached value of the '{@link #getEventDeclaration() <em>Event Declaration</em>}' reference.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getEventDeclaration()
49 * @generated
50 * @ordered
51 */
52 protected EventDeclaration eventDeclaration;
53
54 /**
55 * The cached value of the '{@link #getOutgoingConnections() <em>Outgoing Connections</em>}' reference list.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getOutgoingConnections()
59 * @generated
60 * @ordered
61 */
62 protected EList<Connection> outgoingConnections;
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 protected OutputImpl() {
70 super();
71 }
72
73 /**
74 * <!-- begin-user-doc -->
75 * <!-- end-user-doc -->
76 * @generated
77 */
78 @Override
79 protected EClass eStaticClass() {
80 return CftPackage.Literals.OUTPUT;
81 }
82
83 /**
84 * <!-- begin-user-doc -->
85 * <!-- end-user-doc -->
86 * @generated
87 */
88 @Override
89 public EventDeclaration getEventDeclaration() {
90 if (eventDeclaration != null && eventDeclaration.eIsProxy()) {
91 InternalEObject oldEventDeclaration = (InternalEObject)eventDeclaration;
92 eventDeclaration = (EventDeclaration)eResolveProxy(oldEventDeclaration);
93 if (eventDeclaration != oldEventDeclaration) {
94 if (eNotificationRequired())
95 eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.OUTPUT__EVENT_DECLARATION, oldEventDeclaration, eventDeclaration));
96 }
97 }
98 return eventDeclaration;
99 }
100
101 /**
102 * <!-- begin-user-doc -->
103 * <!-- end-user-doc -->
104 * @generated
105 */
106 public EventDeclaration basicGetEventDeclaration() {
107 return eventDeclaration;
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public void setEventDeclaration(EventDeclaration newEventDeclaration) {
117 EventDeclaration oldEventDeclaration = eventDeclaration;
118 eventDeclaration = newEventDeclaration;
119 if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.OUTPUT__EVENT_DECLARATION, oldEventDeclaration, eventDeclaration));
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 @Override
129 public EList<Connection> getOutgoingConnections() {
130 if (outgoingConnections == null) {
131 outgoingConnections = new EObjectWithInverseResolvingEList<Connection>(Connection.class, this, CftPackage.OUTPUT__OUTGOING_CONNECTIONS, CftPackage.CONNECTION__OUTPUT);
132 }
133 return outgoingConnections;
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public Component getComponent() {
143 if (eContainerFeatureID() != CftPackage.OUTPUT__COMPONENT) return null;
144 return (Component)eInternalContainer();
145 }
146
147 /**
148 * <!-- begin-user-doc -->
149 * <!-- end-user-doc -->
150 * @generated
151 */
152 public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) {
153 msgs = eBasicSetContainer((InternalEObject)newComponent, CftPackage.OUTPUT__COMPONENT, msgs);
154 return msgs;
155 }
156
157 /**
158 * <!-- begin-user-doc -->
159 * <!-- end-user-doc -->
160 * @generated
161 */
162 @Override
163 public void setComponent(Component newComponent) {
164 if (newComponent != eInternalContainer() || (eContainerFeatureID() != CftPackage.OUTPUT__COMPONENT && newComponent != null)) {
165 if (EcoreUtil.isAncestor(this, newComponent))
166 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
167 NotificationChain msgs = null;
168 if (eInternalContainer() != null)
169 msgs = eBasicRemoveFromContainer(msgs);
170 if (newComponent != null)
171 msgs = ((InternalEObject)newComponent).eInverseAdd(this, CftPackage.COMPONENT__OUTPUTS, Component.class, msgs);
172 msgs = basicSetComponent(newComponent, msgs);
173 if (msgs != null) msgs.dispatch();
174 }
175 else if (eNotificationRequired())
176 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.OUTPUT__COMPONENT, newComponent, newComponent));
177 }
178
179 /**
180 * <!-- begin-user-doc -->
181 * <!-- end-user-doc -->
182 * @generated
183 */
184 @SuppressWarnings("unchecked")
185 @Override
186 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
187 switch (featureID) {
188 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
189 return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutgoingConnections()).basicAdd(otherEnd, msgs);
190 case CftPackage.OUTPUT__COMPONENT:
191 if (eInternalContainer() != null)
192 msgs = eBasicRemoveFromContainer(msgs);
193 return basicSetComponent((Component)otherEnd, msgs);
194 }
195 return super.eInverseAdd(otherEnd, featureID, msgs);
196 }
197
198 /**
199 * <!-- begin-user-doc -->
200 * <!-- end-user-doc -->
201 * @generated
202 */
203 @Override
204 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
205 switch (featureID) {
206 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
207 return ((InternalEList<?>)getOutgoingConnections()).basicRemove(otherEnd, msgs);
208 case CftPackage.OUTPUT__COMPONENT:
209 return basicSetComponent(null, msgs);
210 }
211 return super.eInverseRemove(otherEnd, featureID, msgs);
212 }
213
214 /**
215 * <!-- begin-user-doc -->
216 * <!-- end-user-doc -->
217 * @generated
218 */
219 @Override
220 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
221 switch (eContainerFeatureID()) {
222 case CftPackage.OUTPUT__COMPONENT:
223 return eInternalContainer().eInverseRemove(this, CftPackage.COMPONENT__OUTPUTS, Component.class, msgs);
224 }
225 return super.eBasicRemoveFromContainerFeature(msgs);
226 }
227
228 /**
229 * <!-- begin-user-doc -->
230 * <!-- end-user-doc -->
231 * @generated
232 */
233 @Override
234 public Object eGet(int featureID, boolean resolve, boolean coreType) {
235 switch (featureID) {
236 case CftPackage.OUTPUT__EVENT_DECLARATION:
237 if (resolve) return getEventDeclaration();
238 return basicGetEventDeclaration();
239 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
240 return getOutgoingConnections();
241 case CftPackage.OUTPUT__COMPONENT:
242 return getComponent();
243 }
244 return super.eGet(featureID, resolve, coreType);
245 }
246
247 /**
248 * <!-- begin-user-doc -->
249 * <!-- end-user-doc -->
250 * @generated
251 */
252 @SuppressWarnings("unchecked")
253 @Override
254 public void eSet(int featureID, Object newValue) {
255 switch (featureID) {
256 case CftPackage.OUTPUT__EVENT_DECLARATION:
257 setEventDeclaration((EventDeclaration)newValue);
258 return;
259 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
260 getOutgoingConnections().clear();
261 getOutgoingConnections().addAll((Collection<? extends Connection>)newValue);
262 return;
263 case CftPackage.OUTPUT__COMPONENT:
264 setComponent((Component)newValue);
265 return;
266 }
267 super.eSet(featureID, newValue);
268 }
269
270 /**
271 * <!-- begin-user-doc -->
272 * <!-- end-user-doc -->
273 * @generated
274 */
275 @Override
276 public void eUnset(int featureID) {
277 switch (featureID) {
278 case CftPackage.OUTPUT__EVENT_DECLARATION:
279 setEventDeclaration((EventDeclaration)null);
280 return;
281 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
282 getOutgoingConnections().clear();
283 return;
284 case CftPackage.OUTPUT__COMPONENT:
285 setComponent((Component)null);
286 return;
287 }
288 super.eUnset(featureID);
289 }
290
291 /**
292 * <!-- begin-user-doc -->
293 * <!-- end-user-doc -->
294 * @generated
295 */
296 @Override
297 public boolean eIsSet(int featureID) {
298 switch (featureID) {
299 case CftPackage.OUTPUT__EVENT_DECLARATION:
300 return eventDeclaration != null;
301 case CftPackage.OUTPUT__OUTGOING_CONNECTIONS:
302 return outgoingConnections != null && !outgoingConnections.isEmpty();
303 case CftPackage.OUTPUT__COMPONENT:
304 return getComponent() != null;
305 }
306 return super.eIsSet(featureID);
307 }
308
309} //OutputImpl