diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentFaultTreeImpl.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentFaultTreeImpl.java | 218 |
1 files changed, 218 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/ComponentFaultTreeImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentFaultTreeImpl.java new file mode 100644 index 00000000..b84b6436 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentFaultTreeImpl.java | |||
@@ -0,0 +1,218 @@ | |||
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.ComponentFaultTree; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | |||
15 | import org.eclipse.emf.common.util.EList; | ||
16 | |||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.emf.ecore.InternalEObject; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
21 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Component Fault Tree</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentFaultTreeImpl#getComponents <em>Components</em>}</li> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentFaultTreeImpl#getTopEvent <em>Top Event</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class ComponentFaultTreeImpl extends MinimalEObjectImpl.Container implements ComponentFaultTree { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getComponents() <em>Components</em>}' containment reference list. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getComponents() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected EList<Component> components; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #getTopEvent() <em>Top Event</em>}' reference. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getTopEvent() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected Output topEvent; | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | protected ComponentFaultTreeImpl() { | ||
67 | super(); | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | @Override | ||
76 | protected EClass eStaticClass() { | ||
77 | return CftPackage.Literals.COMPONENT_FAULT_TREE; | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | @Override | ||
86 | public EList<Component> getComponents() { | ||
87 | if (components == null) { | ||
88 | components = new EObjectContainmentEList<Component>(Component.class, this, CftPackage.COMPONENT_FAULT_TREE__COMPONENTS); | ||
89 | } | ||
90 | return components; | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | @Override | ||
99 | public Output getTopEvent() { | ||
100 | if (topEvent != null && topEvent.eIsProxy()) { | ||
101 | InternalEObject oldTopEvent = (InternalEObject)topEvent; | ||
102 | topEvent = (Output)eResolveProxy(oldTopEvent); | ||
103 | if (topEvent != oldTopEvent) { | ||
104 | if (eNotificationRequired()) | ||
105 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT, oldTopEvent, topEvent)); | ||
106 | } | ||
107 | } | ||
108 | return topEvent; | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | public Output basicGetTopEvent() { | ||
117 | return topEvent; | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | @Override | ||
126 | public void setTopEvent(Output newTopEvent) { | ||
127 | Output oldTopEvent = topEvent; | ||
128 | topEvent = newTopEvent; | ||
129 | if (eNotificationRequired()) | ||
130 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT, oldTopEvent, topEvent)); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
140 | switch (featureID) { | ||
141 | case CftPackage.COMPONENT_FAULT_TREE__COMPONENTS: | ||
142 | return ((InternalEList<?>)getComponents()).basicRemove(otherEnd, msgs); | ||
143 | } | ||
144 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
154 | switch (featureID) { | ||
155 | case CftPackage.COMPONENT_FAULT_TREE__COMPONENTS: | ||
156 | return getComponents(); | ||
157 | case CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT: | ||
158 | if (resolve) return getTopEvent(); | ||
159 | return basicGetTopEvent(); | ||
160 | } | ||
161 | return super.eGet(featureID, resolve, coreType); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @SuppressWarnings("unchecked") | ||
170 | @Override | ||
171 | public void eSet(int featureID, Object newValue) { | ||
172 | switch (featureID) { | ||
173 | case CftPackage.COMPONENT_FAULT_TREE__COMPONENTS: | ||
174 | getComponents().clear(); | ||
175 | getComponents().addAll((Collection<? extends Component>)newValue); | ||
176 | return; | ||
177 | case CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT: | ||
178 | setTopEvent((Output)newValue); | ||
179 | return; | ||
180 | } | ||
181 | super.eSet(featureID, newValue); | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | @Override | ||
190 | public void eUnset(int featureID) { | ||
191 | switch (featureID) { | ||
192 | case CftPackage.COMPONENT_FAULT_TREE__COMPONENTS: | ||
193 | getComponents().clear(); | ||
194 | return; | ||
195 | case CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT: | ||
196 | setTopEvent((Output)null); | ||
197 | return; | ||
198 | } | ||
199 | super.eUnset(featureID); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public boolean eIsSet(int featureID) { | ||
209 | switch (featureID) { | ||
210 | case CftPackage.COMPONENT_FAULT_TREE__COMPONENTS: | ||
211 | return components != null && !components.isEmpty(); | ||
212 | case CftPackage.COMPONENT_FAULT_TREE__TOP_EVENT: | ||
213 | return topEvent != null; | ||
214 | } | ||
215 | return super.eIsSet(featureID); | ||
216 | } | ||
217 | |||
218 | } //ComponentFaultTreeImpl | ||