diff options
author | 2019-02-06 18:28:18 +0100 | |
---|---|---|
committer | 2019-02-19 19:18:25 +0100 | |
commit | 615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7 (patch) | |
tree | 1c9fe0f4ae152d84152c8ff1cfb6366ec8b277e9 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java | |
parent | [Stochastic] Fault tree transformation langauge (diff) | |
download | VIATRA-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/ComponentImpl.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java | 273 |
1 files changed, 273 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/ComponentImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java new file mode 100644 index 00000000..6d23dc78 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java | |||
@@ -0,0 +1,273 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
10 | |||
11 | import java.util.Collection; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
14 | import org.eclipse.emf.common.notify.NotificationChain; | ||
15 | |||
16 | import org.eclipse.emf.common.util.EList; | ||
17 | |||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.emf.ecore.InternalEObject; | ||
20 | |||
21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
22 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
23 | |||
24 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
25 | import org.eclipse.emf.ecore.util.InternalEList; | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * An implementation of the model object '<em><b>Component</b></em>'. | ||
30 | * <!-- end-user-doc --> | ||
31 | * <p> | ||
32 | * The following features are implemented: | ||
33 | * </p> | ||
34 | * <ul> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getInputs <em>Inputs</em>}</li> | ||
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getOutputs <em>Outputs</em>}</li> | ||
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getComponentDefinition <em>Component Definition</em>}</li> | ||
38 | * </ul> | ||
39 | * | ||
40 | * @generated | ||
41 | */ | ||
42 | public class ComponentImpl extends MinimalEObjectImpl.Container implements Component { | ||
43 | /** | ||
44 | * The cached value of the '{@link #getInputs() <em>Inputs</em>}' containment reference list. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getInputs() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected EList<Input> inputs; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getOutputs() <em>Outputs</em>}' containment reference list. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getOutputs() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected EList<Output> outputs; | ||
62 | |||
63 | /** | ||
64 | * The cached value of the '{@link #getComponentDefinition() <em>Component Definition</em>}' reference. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #getComponentDefinition() | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | protected ComponentDefinition componentDefinition; | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | protected ComponentImpl() { | ||
79 | super(); | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | @Override | ||
88 | protected EClass eStaticClass() { | ||
89 | return CftPackage.Literals.COMPONENT; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | public EList<Input> getInputs() { | ||
99 | if (inputs == null) { | ||
100 | inputs = new EObjectContainmentWithInverseEList<Input>(Input.class, this, CftPackage.COMPONENT__INPUTS, CftPackage.INPUT__COMPONENT); | ||
101 | } | ||
102 | return inputs; | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public EList<Output> getOutputs() { | ||
112 | if (outputs == null) { | ||
113 | outputs = new EObjectContainmentWithInverseEList<Output>(Output.class, this, CftPackage.COMPONENT__OUTPUTS, CftPackage.OUTPUT__COMPONENT); | ||
114 | } | ||
115 | return outputs; | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public ComponentDefinition getComponentDefinition() { | ||
125 | if (componentDefinition != null && componentDefinition.eIsProxy()) { | ||
126 | InternalEObject oldComponentDefinition = (InternalEObject)componentDefinition; | ||
127 | componentDefinition = (ComponentDefinition)eResolveProxy(oldComponentDefinition); | ||
128 | if (componentDefinition != oldComponentDefinition) { | ||
129 | if (eNotificationRequired()) | ||
130 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.COMPONENT__COMPONENT_DEFINITION, oldComponentDefinition, componentDefinition)); | ||
131 | } | ||
132 | } | ||
133 | return componentDefinition; | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | public ComponentDefinition basicGetComponentDefinition() { | ||
142 | return componentDefinition; | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public void setComponentDefinition(ComponentDefinition newComponentDefinition) { | ||
152 | ComponentDefinition oldComponentDefinition = componentDefinition; | ||
153 | componentDefinition = newComponentDefinition; | ||
154 | if (eNotificationRequired()) | ||
155 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__COMPONENT_DEFINITION, oldComponentDefinition, componentDefinition)); | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | @SuppressWarnings("unchecked") | ||
164 | @Override | ||
165 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
166 | switch (featureID) { | ||
167 | case CftPackage.COMPONENT__INPUTS: | ||
168 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getInputs()).basicAdd(otherEnd, msgs); | ||
169 | case CftPackage.COMPONENT__OUTPUTS: | ||
170 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutputs()).basicAdd(otherEnd, msgs); | ||
171 | } | ||
172 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
173 | } | ||
174 | |||
175 | /** | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @generated | ||
179 | */ | ||
180 | @Override | ||
181 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
182 | switch (featureID) { | ||
183 | case CftPackage.COMPONENT__INPUTS: | ||
184 | return ((InternalEList<?>)getInputs()).basicRemove(otherEnd, msgs); | ||
185 | case CftPackage.COMPONENT__OUTPUTS: | ||
186 | return ((InternalEList<?>)getOutputs()).basicRemove(otherEnd, msgs); | ||
187 | } | ||
188 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * <!-- begin-user-doc --> | ||
193 | * <!-- end-user-doc --> | ||
194 | * @generated | ||
195 | */ | ||
196 | @Override | ||
197 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
198 | switch (featureID) { | ||
199 | case CftPackage.COMPONENT__INPUTS: | ||
200 | return getInputs(); | ||
201 | case CftPackage.COMPONENT__OUTPUTS: | ||
202 | return getOutputs(); | ||
203 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | ||
204 | if (resolve) return getComponentDefinition(); | ||
205 | return basicGetComponentDefinition(); | ||
206 | } | ||
207 | return super.eGet(featureID, resolve, coreType); | ||
208 | } | ||
209 | |||
210 | /** | ||
211 | * <!-- begin-user-doc --> | ||
212 | * <!-- end-user-doc --> | ||
213 | * @generated | ||
214 | */ | ||
215 | @SuppressWarnings("unchecked") | ||
216 | @Override | ||
217 | public void eSet(int featureID, Object newValue) { | ||
218 | switch (featureID) { | ||
219 | case CftPackage.COMPONENT__INPUTS: | ||
220 | getInputs().clear(); | ||
221 | getInputs().addAll((Collection<? extends Input>)newValue); | ||
222 | return; | ||
223 | case CftPackage.COMPONENT__OUTPUTS: | ||
224 | getOutputs().clear(); | ||
225 | getOutputs().addAll((Collection<? extends Output>)newValue); | ||
226 | return; | ||
227 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | ||
228 | setComponentDefinition((ComponentDefinition)newValue); | ||
229 | return; | ||
230 | } | ||
231 | super.eSet(featureID, newValue); | ||
232 | } | ||
233 | |||
234 | /** | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | */ | ||
239 | @Override | ||
240 | public void eUnset(int featureID) { | ||
241 | switch (featureID) { | ||
242 | case CftPackage.COMPONENT__INPUTS: | ||
243 | getInputs().clear(); | ||
244 | return; | ||
245 | case CftPackage.COMPONENT__OUTPUTS: | ||
246 | getOutputs().clear(); | ||
247 | return; | ||
248 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | ||
249 | setComponentDefinition((ComponentDefinition)null); | ||
250 | return; | ||
251 | } | ||
252 | super.eUnset(featureID); | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public boolean eIsSet(int featureID) { | ||
262 | switch (featureID) { | ||
263 | case CftPackage.COMPONENT__INPUTS: | ||
264 | return inputs != null && !inputs.isEmpty(); | ||
265 | case CftPackage.COMPONENT__OUTPUTS: | ||
266 | return outputs != null && !outputs.isEmpty(); | ||
267 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | ||
268 | return componentDefinition != null; | ||
269 | } | ||
270 | return super.eIsSet(featureID); | ||
271 | } | ||
272 | |||
273 | } //ComponentImpl | ||