aboutsummaryrefslogtreecommitdiffstats
path: root/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-02-06 18:28:18 +0100
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-02-19 19:18:25 +0100
commit615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7 (patch)
tree1c9fe0f4ae152d84152c8ff1cfb6366ec8b277e9 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java
parent[Stochastic] Fault tree transformation langauge (diff)
downloadVIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.tar.gz
VIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.tar.zst
VIATRA-Generator-615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7.zip
Extract component fault tree model
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java')
-rw-r--r--Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.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/InputImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java
new file mode 100644
index 00000000..eda5fea0
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.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.Input;
9import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent;
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.EObjectContainmentWithInverseEList;
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>Input</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.InputImpl#getIntputEvent <em>Intput Event</em>}</li>
37 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getComponent <em>Component</em>}</li>
38 * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getIncomingConnections <em>Incoming Connections</em>}</li>
39 * </ul>
40 *
41 * @generated
42 */
43public class InputImpl extends MinimalEObjectImpl.Container implements Input {
44 /**
45 * The cached value of the '{@link #getIntputEvent() <em>Intput Event</em>}' reference.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getIntputEvent()
49 * @generated
50 * @ordered
51 */
52 protected IntputEvent intputEvent;
53
54 /**
55 * The cached value of the '{@link #getIncomingConnections() <em>Incoming Connections</em>}' containment reference list.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getIncomingConnections()
59 * @generated
60 * @ordered
61 */
62 protected EList<Connection> incomingConnections;
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 protected InputImpl() {
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.INPUT;
81 }
82
83 /**
84 * <!-- begin-user-doc -->
85 * <!-- end-user-doc -->
86 * @generated
87 */
88 @Override
89 public IntputEvent getIntputEvent() {
90 if (intputEvent != null && intputEvent.eIsProxy()) {
91 InternalEObject oldIntputEvent = (InternalEObject)intputEvent;
92 intputEvent = (IntputEvent)eResolveProxy(oldIntputEvent);
93 if (intputEvent != oldIntputEvent) {
94 if (eNotificationRequired())
95 eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.INPUT__INTPUT_EVENT, oldIntputEvent, intputEvent));
96 }
97 }
98 return intputEvent;
99 }
100
101 /**
102 * <!-- begin-user-doc -->
103 * <!-- end-user-doc -->
104 * @generated
105 */
106 public IntputEvent basicGetIntputEvent() {
107 return intputEvent;
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public void setIntputEvent(IntputEvent newIntputEvent) {
117 IntputEvent oldIntputEvent = intputEvent;
118 intputEvent = newIntputEvent;
119 if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INPUT__INTPUT_EVENT, oldIntputEvent, intputEvent));
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 @Override
129 public Component getComponent() {
130 if (eContainerFeatureID() != CftPackage.INPUT__COMPONENT) return null;
131 return (Component)eInternalContainer();
132 }
133
134 /**
135 * <!-- begin-user-doc -->
136 * <!-- end-user-doc -->
137 * @generated
138 */
139 public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) {
140 msgs = eBasicSetContainer((InternalEObject)newComponent, CftPackage.INPUT__COMPONENT, msgs);
141 return msgs;
142 }
143
144 /**
145 * <!-- begin-user-doc -->
146 * <!-- end-user-doc -->
147 * @generated
148 */
149 @Override
150 public void setComponent(Component newComponent) {
151 if (newComponent != eInternalContainer() || (eContainerFeatureID() != CftPackage.INPUT__COMPONENT && newComponent != null)) {
152 if (EcoreUtil.isAncestor(this, newComponent))
153 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
154 NotificationChain msgs = null;
155 if (eInternalContainer() != null)
156 msgs = eBasicRemoveFromContainer(msgs);
157 if (newComponent != null)
158 msgs = ((InternalEObject)newComponent).eInverseAdd(this, CftPackage.COMPONENT__INPUTS, Component.class, msgs);
159 msgs = basicSetComponent(newComponent, msgs);
160 if (msgs != null) msgs.dispatch();
161 }
162 else if (eNotificationRequired())
163 eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INPUT__COMPONENT, newComponent, newComponent));
164 }
165
166 /**
167 * <!-- begin-user-doc -->
168 * <!-- end-user-doc -->
169 * @generated
170 */
171 @Override
172 public EList<Connection> getIncomingConnections() {
173 if (incomingConnections == null) {
174 incomingConnections = new EObjectContainmentWithInverseEList<Connection>(Connection.class, this, CftPackage.INPUT__INCOMING_CONNECTIONS, CftPackage.CONNECTION__INPUT);
175 }
176 return incomingConnections;
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.INPUT__COMPONENT:
189 if (eInternalContainer() != null)
190 msgs = eBasicRemoveFromContainer(msgs);
191 return basicSetComponent((Component)otherEnd, msgs);
192 case CftPackage.INPUT__INCOMING_CONNECTIONS:
193 return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncomingConnections()).basicAdd(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.INPUT__COMPONENT:
207 return basicSetComponent(null, msgs);
208 case CftPackage.INPUT__INCOMING_CONNECTIONS:
209 return ((InternalEList<?>)getIncomingConnections()).basicRemove(otherEnd, 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.INPUT__COMPONENT:
223 return eInternalContainer().eInverseRemove(this, CftPackage.COMPONENT__INPUTS, 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.INPUT__INTPUT_EVENT:
237 if (resolve) return getIntputEvent();
238 return basicGetIntputEvent();
239 case CftPackage.INPUT__COMPONENT:
240 return getComponent();
241 case CftPackage.INPUT__INCOMING_CONNECTIONS:
242 return getIncomingConnections();
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.INPUT__INTPUT_EVENT:
257 setIntputEvent((IntputEvent)newValue);
258 return;
259 case CftPackage.INPUT__COMPONENT:
260 setComponent((Component)newValue);
261 return;
262 case CftPackage.INPUT__INCOMING_CONNECTIONS:
263 getIncomingConnections().clear();
264 getIncomingConnections().addAll((Collection<? extends Connection>)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.INPUT__INTPUT_EVENT:
279 setIntputEvent((IntputEvent)null);
280 return;
281 case CftPackage.INPUT__COMPONENT:
282 setComponent((Component)null);
283 return;
284 case CftPackage.INPUT__INCOMING_CONNECTIONS:
285 getIncomingConnections().clear();
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.INPUT__INTPUT_EVENT:
300 return intputEvent != null;
301 case CftPackage.INPUT__COMPONENT:
302 return getComponent() != null;
303 case CftPackage.INPUT__INCOMING_CONNECTIONS:
304 return incomingConnections != null && !incomingConnections.isEmpty();
305 }
306 return super.eIsSet(featureID);
307 }
308
309} //InputImpl