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 | |
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')
16 files changed, 3630 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/AndGateDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/AndGateDefinitionImpl.java new file mode 100644 index 00000000..fd716fc9 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/AndGateDefinitionImpl.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.AndGateDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>And Gate Definition</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class AndGateDefinitionImpl extends GateDefinitionImpl implements AndGateDefinition { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected AndGateDefinitionImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return CftPackage.Literals.AND_GATE_DEFINITION; | ||
35 | } | ||
36 | |||
37 | } //AndGateDefinitionImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/BasicEventDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/BasicEventDefinitionImpl.java new file mode 100644 index 00000000..87fc5d70 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/BasicEventDefinitionImpl.java | |||
@@ -0,0 +1,178 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | ||
7 | |||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Basic Event Definition</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.BasicEventDefinitionImpl#getDistribution <em>Distribution</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class BasicEventDefinitionImpl extends EventDefinitionImpl implements BasicEventDefinition { | ||
32 | /** | ||
33 | * The cached value of the '{@link #getDistribution() <em>Distribution</em>}' containment reference. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #getDistribution() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected Distribution distribution; | ||
41 | |||
42 | /** | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | protected BasicEventDefinitionImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | protected EClass eStaticClass() { | ||
58 | return CftPackage.Literals.BASIC_EVENT_DEFINITION; | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | public Distribution getDistribution() { | ||
68 | return distribution; | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | public NotificationChain basicSetDistribution(Distribution newDistribution, NotificationChain msgs) { | ||
77 | Distribution oldDistribution = distribution; | ||
78 | distribution = newDistribution; | ||
79 | if (eNotificationRequired()) { | ||
80 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION, oldDistribution, newDistribution); | ||
81 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
82 | } | ||
83 | return msgs; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | @Override | ||
92 | public void setDistribution(Distribution newDistribution) { | ||
93 | if (newDistribution != distribution) { | ||
94 | NotificationChain msgs = null; | ||
95 | if (distribution != null) | ||
96 | msgs = ((InternalEObject)distribution).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION, null, msgs); | ||
97 | if (newDistribution != null) | ||
98 | msgs = ((InternalEObject)newDistribution).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION, null, msgs); | ||
99 | msgs = basicSetDistribution(newDistribution, msgs); | ||
100 | if (msgs != null) msgs.dispatch(); | ||
101 | } | ||
102 | else if (eNotificationRequired()) | ||
103 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION, newDistribution, newDistribution)); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @Override | ||
112 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
113 | switch (featureID) { | ||
114 | case CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION: | ||
115 | return basicSetDistribution(null, msgs); | ||
116 | } | ||
117 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | @Override | ||
126 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
127 | switch (featureID) { | ||
128 | case CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION: | ||
129 | return getDistribution(); | ||
130 | } | ||
131 | return super.eGet(featureID, resolve, coreType); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public void eSet(int featureID, Object newValue) { | ||
141 | switch (featureID) { | ||
142 | case CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION: | ||
143 | setDistribution((Distribution)newValue); | ||
144 | return; | ||
145 | } | ||
146 | super.eSet(featureID, newValue); | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | @Override | ||
155 | public void eUnset(int featureID) { | ||
156 | switch (featureID) { | ||
157 | case CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION: | ||
158 | setDistribution((Distribution)null); | ||
159 | return; | ||
160 | } | ||
161 | super.eUnset(featureID); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public boolean eIsSet(int featureID) { | ||
171 | switch (featureID) { | ||
172 | case CftPackage.BASIC_EVENT_DEFINITION__DISTRIBUTION: | ||
173 | return distribution != null; | ||
174 | } | ||
175 | return super.eIsSet(featureID); | ||
176 | } | ||
177 | |||
178 | } //BasicEventDefinitionImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java new file mode 100644 index 00000000..33778461 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java | |||
@@ -0,0 +1,217 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Factory</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | ||
22 | /** | ||
23 | * Creates the default factory implementation. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @generated | ||
27 | */ | ||
28 | public static CftFactory init() { | ||
29 | try { | ||
30 | CftFactory theCftFactory = (CftFactory)EPackage.Registry.INSTANCE.getEFactory(CftPackage.eNS_URI); | ||
31 | if (theCftFactory != null) { | ||
32 | return theCftFactory; | ||
33 | } | ||
34 | } | ||
35 | catch (Exception exception) { | ||
36 | EcorePlugin.INSTANCE.log(exception); | ||
37 | } | ||
38 | return new CftFactoryImpl(); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Creates an instance of the factory. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | public CftFactoryImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | public EObject create(EClass eClass) { | ||
58 | switch (eClass.getClassifierID()) { | ||
59 | case CftPackage.COMPONENT_DEFINITION: return createComponentDefinition(); | ||
60 | case CftPackage.BASIC_EVENT_DEFINITION: return createBasicEventDefinition(); | ||
61 | case CftPackage.INTPUT_EVENT: return createIntputEvent(); | ||
62 | case CftPackage.AND_GATE_DEFINITION: return createAndGateDefinition(); | ||
63 | case CftPackage.OR_GATE_DEFINITION: return createOrGateDefinition(); | ||
64 | case CftPackage.KOF_MGATE_DEFINITION: return createKOfMGateDefinition(); | ||
65 | case CftPackage.COMPONENT_FAULT_TREE: return createComponentFaultTree(); | ||
66 | case CftPackage.COMPONENT: return createComponent(); | ||
67 | case CftPackage.INPUT: return createInput(); | ||
68 | case CftPackage.OUTPUT: return createOutput(); | ||
69 | case CftPackage.CONNECTION: return createConnection(); | ||
70 | default: | ||
71 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @generated | ||
79 | */ | ||
80 | @Override | ||
81 | public ComponentDefinition createComponentDefinition() { | ||
82 | ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); | ||
83 | return componentDefinition; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | @Override | ||
92 | public BasicEventDefinition createBasicEventDefinition() { | ||
93 | BasicEventDefinitionImpl basicEventDefinition = new BasicEventDefinitionImpl(); | ||
94 | return basicEventDefinition; | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | @Override | ||
103 | public IntputEvent createIntputEvent() { | ||
104 | IntputEventImpl intputEvent = new IntputEventImpl(); | ||
105 | return intputEvent; | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | @Override | ||
114 | public AndGateDefinition createAndGateDefinition() { | ||
115 | AndGateDefinitionImpl andGateDefinition = new AndGateDefinitionImpl(); | ||
116 | return andGateDefinition; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public OrGateDefinition createOrGateDefinition() { | ||
126 | OrGateDefinitionImpl orGateDefinition = new OrGateDefinitionImpl(); | ||
127 | return orGateDefinition; | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public KOfMGateDefinition createKOfMGateDefinition() { | ||
137 | KOfMGateDefinitionImpl kOfMGateDefinition = new KOfMGateDefinitionImpl(); | ||
138 | return kOfMGateDefinition; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | @Override | ||
147 | public ComponentFaultTree createComponentFaultTree() { | ||
148 | ComponentFaultTreeImpl componentFaultTree = new ComponentFaultTreeImpl(); | ||
149 | return componentFaultTree; | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | @Override | ||
158 | public Component createComponent() { | ||
159 | ComponentImpl component = new ComponentImpl(); | ||
160 | return component; | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public Input createInput() { | ||
170 | InputImpl input = new InputImpl(); | ||
171 | return input; | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <!-- end-user-doc --> | ||
177 | * @generated | ||
178 | */ | ||
179 | @Override | ||
180 | public Output createOutput() { | ||
181 | OutputImpl output = new OutputImpl(); | ||
182 | return output; | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | @Override | ||
191 | public Connection createConnection() { | ||
192 | ConnectionImpl connection = new ConnectionImpl(); | ||
193 | return connection; | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @generated | ||
200 | */ | ||
201 | @Override | ||
202 | public CftPackage getCftPackage() { | ||
203 | return (CftPackage)getEPackage(); | ||
204 | } | ||
205 | |||
206 | /** | ||
207 | * <!-- begin-user-doc --> | ||
208 | * <!-- end-user-doc --> | ||
209 | * @deprecated | ||
210 | * @generated | ||
211 | */ | ||
212 | @Deprecated | ||
213 | public static CftPackage getPackage() { | ||
214 | return CftPackage.eINSTANCE; | ||
215 | } | ||
216 | |||
217 | } //CftFactoryImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java new file mode 100644 index 00000000..f03fa0ba --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java | |||
@@ -0,0 +1,746 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.AndGateDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | ||
12 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; | ||
13 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | ||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; | ||
15 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition; | ||
16 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | ||
17 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | ||
18 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; | ||
19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; | ||
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
21 | |||
22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage; | ||
23 | |||
24 | import org.eclipse.emf.ecore.EAttribute; | ||
25 | import org.eclipse.emf.ecore.EClass; | ||
26 | import org.eclipse.emf.ecore.EPackage; | ||
27 | import org.eclipse.emf.ecore.EReference; | ||
28 | |||
29 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
30 | |||
31 | /** | ||
32 | * <!-- begin-user-doc --> | ||
33 | * An implementation of the model <b>Package</b>. | ||
34 | * <!-- end-user-doc --> | ||
35 | * @generated | ||
36 | */ | ||
37 | public class CftPackageImpl extends EPackageImpl implements CftPackage { | ||
38 | /** | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @generated | ||
42 | */ | ||
43 | private EClass componentDefinitionEClass = null; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | private EClass eventDefinitionEClass = null; | ||
51 | |||
52 | /** | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | private EClass gateDefinitionEClass = null; | ||
58 | |||
59 | /** | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @generated | ||
63 | */ | ||
64 | private EClass basicEventDefinitionEClass = null; | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | private EClass intputEventEClass = null; | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | private EClass eventDeclarationEClass = null; | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | private EClass andGateDefinitionEClass = null; | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | private EClass orGateDefinitionEClass = null; | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | private EClass kOfMGateDefinitionEClass = null; | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | private EClass componentFaultTreeEClass = null; | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | private EClass componentEClass = null; | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | private EClass inputEClass = null; | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | private EClass outputEClass = null; | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | private EClass connectionEClass = null; | ||
135 | |||
136 | /** | ||
137 | * Creates an instance of the model <b>Package</b>, registered with | ||
138 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
139 | * package URI value. | ||
140 | * <p>Note: the correct way to create the package is via the static | ||
141 | * factory method {@link #init init()}, which also performs | ||
142 | * initialization of the package, or returns the registered package, | ||
143 | * if one already exists. | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
147 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#eNS_URI | ||
148 | * @see #init() | ||
149 | * @generated | ||
150 | */ | ||
151 | private CftPackageImpl() { | ||
152 | super(eNS_URI, CftFactory.eINSTANCE); | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | private static boolean isInited = false; | ||
161 | |||
162 | /** | ||
163 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
164 | * | ||
165 | * <p>This method is used to initialize {@link CftPackage#eINSTANCE} when that field is accessed. | ||
166 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
167 | * <!-- begin-user-doc --> | ||
168 | * <!-- end-user-doc --> | ||
169 | * @see #eNS_URI | ||
170 | * @see #createPackageContents() | ||
171 | * @see #initializePackageContents() | ||
172 | * @generated | ||
173 | */ | ||
174 | public static CftPackage init() { | ||
175 | if (isInited) return (CftPackage)EPackage.Registry.INSTANCE.getEPackage(CftPackage.eNS_URI); | ||
176 | |||
177 | // Obtain or create and register package | ||
178 | Object registeredCftPackage = EPackage.Registry.INSTANCE.get(eNS_URI); | ||
179 | CftPackageImpl theCftPackage = registeredCftPackage instanceof CftPackageImpl ? (CftPackageImpl)registeredCftPackage : new CftPackageImpl(); | ||
180 | |||
181 | isInited = true; | ||
182 | |||
183 | // Initialize simple dependencies | ||
184 | FtPackage.eINSTANCE.eClass(); | ||
185 | |||
186 | // Create package meta-data objects | ||
187 | theCftPackage.createPackageContents(); | ||
188 | |||
189 | // Initialize created meta-data | ||
190 | theCftPackage.initializePackageContents(); | ||
191 | |||
192 | // Mark meta-data to indicate it can't be changed | ||
193 | theCftPackage.freeze(); | ||
194 | |||
195 | // Update the registry and return the package | ||
196 | EPackage.Registry.INSTANCE.put(CftPackage.eNS_URI, theCftPackage); | ||
197 | return theCftPackage; | ||
198 | } | ||
199 | |||
200 | /** | ||
201 | * <!-- begin-user-doc --> | ||
202 | * <!-- end-user-doc --> | ||
203 | * @generated | ||
204 | */ | ||
205 | @Override | ||
206 | public EClass getComponentDefinition() { | ||
207 | return componentDefinitionEClass; | ||
208 | } | ||
209 | |||
210 | /** | ||
211 | * <!-- begin-user-doc --> | ||
212 | * <!-- end-user-doc --> | ||
213 | * @generated | ||
214 | */ | ||
215 | @Override | ||
216 | public EReference getComponentDefinition_InputEvents() { | ||
217 | return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(0); | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * <!-- begin-user-doc --> | ||
222 | * <!-- end-user-doc --> | ||
223 | * @generated | ||
224 | */ | ||
225 | @Override | ||
226 | public EReference getComponentDefinition_EventDefinitions() { | ||
227 | return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(1); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public EReference getComponentDefinition_OutputEvents() { | ||
237 | return (EReference)componentDefinitionEClass.getEStructuralFeatures().get(2); | ||
238 | } | ||
239 | |||
240 | /** | ||
241 | * <!-- begin-user-doc --> | ||
242 | * <!-- end-user-doc --> | ||
243 | * @generated | ||
244 | */ | ||
245 | @Override | ||
246 | public EAttribute getComponentDefinition_Name() { | ||
247 | return (EAttribute)componentDefinitionEClass.getEStructuralFeatures().get(3); | ||
248 | } | ||
249 | |||
250 | /** | ||
251 | * <!-- begin-user-doc --> | ||
252 | * <!-- end-user-doc --> | ||
253 | * @generated | ||
254 | */ | ||
255 | @Override | ||
256 | public EClass getEventDefinition() { | ||
257 | return eventDefinitionEClass; | ||
258 | } | ||
259 | |||
260 | /** | ||
261 | * <!-- begin-user-doc --> | ||
262 | * <!-- end-user-doc --> | ||
263 | * @generated | ||
264 | */ | ||
265 | @Override | ||
266 | public EClass getGateDefinition() { | ||
267 | return gateDefinitionEClass; | ||
268 | } | ||
269 | |||
270 | /** | ||
271 | * <!-- begin-user-doc --> | ||
272 | * <!-- end-user-doc --> | ||
273 | * @generated | ||
274 | */ | ||
275 | @Override | ||
276 | public EReference getGateDefinition_InputEvents() { | ||
277 | return (EReference)gateDefinitionEClass.getEStructuralFeatures().get(0); | ||
278 | } | ||
279 | |||
280 | /** | ||
281 | * <!-- begin-user-doc --> | ||
282 | * <!-- end-user-doc --> | ||
283 | * @generated | ||
284 | */ | ||
285 | @Override | ||
286 | public EClass getBasicEventDefinition() { | ||
287 | return basicEventDefinitionEClass; | ||
288 | } | ||
289 | |||
290 | /** | ||
291 | * <!-- begin-user-doc --> | ||
292 | * <!-- end-user-doc --> | ||
293 | * @generated | ||
294 | */ | ||
295 | @Override | ||
296 | public EReference getBasicEventDefinition_Distribution() { | ||
297 | return (EReference)basicEventDefinitionEClass.getEStructuralFeatures().get(0); | ||
298 | } | ||
299 | |||
300 | /** | ||
301 | * <!-- begin-user-doc --> | ||
302 | * <!-- end-user-doc --> | ||
303 | * @generated | ||
304 | */ | ||
305 | @Override | ||
306 | public EClass getIntputEvent() { | ||
307 | return intputEventEClass; | ||
308 | } | ||
309 | |||
310 | /** | ||
311 | * <!-- begin-user-doc --> | ||
312 | * <!-- end-user-doc --> | ||
313 | * @generated | ||
314 | */ | ||
315 | @Override | ||
316 | public EAttribute getIntputEvent_Multiple() { | ||
317 | return (EAttribute)intputEventEClass.getEStructuralFeatures().get(0); | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * <!-- begin-user-doc --> | ||
322 | * <!-- end-user-doc --> | ||
323 | * @generated | ||
324 | */ | ||
325 | @Override | ||
326 | public EClass getEventDeclaration() { | ||
327 | return eventDeclarationEClass; | ||
328 | } | ||
329 | |||
330 | /** | ||
331 | * <!-- begin-user-doc --> | ||
332 | * <!-- end-user-doc --> | ||
333 | * @generated | ||
334 | */ | ||
335 | @Override | ||
336 | public EAttribute getEventDeclaration_Name() { | ||
337 | return (EAttribute)eventDeclarationEClass.getEStructuralFeatures().get(0); | ||
338 | } | ||
339 | |||
340 | /** | ||
341 | * <!-- begin-user-doc --> | ||
342 | * <!-- end-user-doc --> | ||
343 | * @generated | ||
344 | */ | ||
345 | @Override | ||
346 | public EClass getAndGateDefinition() { | ||
347 | return andGateDefinitionEClass; | ||
348 | } | ||
349 | |||
350 | /** | ||
351 | * <!-- begin-user-doc --> | ||
352 | * <!-- end-user-doc --> | ||
353 | * @generated | ||
354 | */ | ||
355 | @Override | ||
356 | public EClass getOrGateDefinition() { | ||
357 | return orGateDefinitionEClass; | ||
358 | } | ||
359 | |||
360 | /** | ||
361 | * <!-- begin-user-doc --> | ||
362 | * <!-- end-user-doc --> | ||
363 | * @generated | ||
364 | */ | ||
365 | @Override | ||
366 | public EClass getKOfMGateDefinition() { | ||
367 | return kOfMGateDefinitionEClass; | ||
368 | } | ||
369 | |||
370 | /** | ||
371 | * <!-- begin-user-doc --> | ||
372 | * <!-- end-user-doc --> | ||
373 | * @generated | ||
374 | */ | ||
375 | @Override | ||
376 | public EAttribute getKOfMGateDefinition_K() { | ||
377 | return (EAttribute)kOfMGateDefinitionEClass.getEStructuralFeatures().get(0); | ||
378 | } | ||
379 | |||
380 | /** | ||
381 | * <!-- begin-user-doc --> | ||
382 | * <!-- end-user-doc --> | ||
383 | * @generated | ||
384 | */ | ||
385 | @Override | ||
386 | public EAttribute getKOfMGateDefinition_M() { | ||
387 | return (EAttribute)kOfMGateDefinitionEClass.getEStructuralFeatures().get(1); | ||
388 | } | ||
389 | |||
390 | /** | ||
391 | * <!-- begin-user-doc --> | ||
392 | * <!-- end-user-doc --> | ||
393 | * @generated | ||
394 | */ | ||
395 | @Override | ||
396 | public EClass getComponentFaultTree() { | ||
397 | return componentFaultTreeEClass; | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * <!-- begin-user-doc --> | ||
402 | * <!-- end-user-doc --> | ||
403 | * @generated | ||
404 | */ | ||
405 | @Override | ||
406 | public EReference getComponentFaultTree_Components() { | ||
407 | return (EReference)componentFaultTreeEClass.getEStructuralFeatures().get(0); | ||
408 | } | ||
409 | |||
410 | /** | ||
411 | * <!-- begin-user-doc --> | ||
412 | * <!-- end-user-doc --> | ||
413 | * @generated | ||
414 | */ | ||
415 | @Override | ||
416 | public EReference getComponentFaultTree_TopEvent() { | ||
417 | return (EReference)componentFaultTreeEClass.getEStructuralFeatures().get(1); | ||
418 | } | ||
419 | |||
420 | /** | ||
421 | * <!-- begin-user-doc --> | ||
422 | * <!-- end-user-doc --> | ||
423 | * @generated | ||
424 | */ | ||
425 | @Override | ||
426 | public EClass getComponent() { | ||
427 | return componentEClass; | ||
428 | } | ||
429 | |||
430 | /** | ||
431 | * <!-- begin-user-doc --> | ||
432 | * <!-- end-user-doc --> | ||
433 | * @generated | ||
434 | */ | ||
435 | @Override | ||
436 | public EReference getComponent_Inputs() { | ||
437 | return (EReference)componentEClass.getEStructuralFeatures().get(0); | ||
438 | } | ||
439 | |||
440 | /** | ||
441 | * <!-- begin-user-doc --> | ||
442 | * <!-- end-user-doc --> | ||
443 | * @generated | ||
444 | */ | ||
445 | @Override | ||
446 | public EReference getComponent_Outputs() { | ||
447 | return (EReference)componentEClass.getEStructuralFeatures().get(1); | ||
448 | } | ||
449 | |||
450 | /** | ||
451 | * <!-- begin-user-doc --> | ||
452 | * <!-- end-user-doc --> | ||
453 | * @generated | ||
454 | */ | ||
455 | @Override | ||
456 | public EReference getComponent_ComponentDefinition() { | ||
457 | return (EReference)componentEClass.getEStructuralFeatures().get(2); | ||
458 | } | ||
459 | |||
460 | /** | ||
461 | * <!-- begin-user-doc --> | ||
462 | * <!-- end-user-doc --> | ||
463 | * @generated | ||
464 | */ | ||
465 | @Override | ||
466 | public EClass getInput() { | ||
467 | return inputEClass; | ||
468 | } | ||
469 | |||
470 | /** | ||
471 | * <!-- begin-user-doc --> | ||
472 | * <!-- end-user-doc --> | ||
473 | * @generated | ||
474 | */ | ||
475 | @Override | ||
476 | public EReference getInput_IntputEvent() { | ||
477 | return (EReference)inputEClass.getEStructuralFeatures().get(0); | ||
478 | } | ||
479 | |||
480 | /** | ||
481 | * <!-- begin-user-doc --> | ||
482 | * <!-- end-user-doc --> | ||
483 | * @generated | ||
484 | */ | ||
485 | @Override | ||
486 | public EReference getInput_Component() { | ||
487 | return (EReference)inputEClass.getEStructuralFeatures().get(1); | ||
488 | } | ||
489 | |||
490 | /** | ||
491 | * <!-- begin-user-doc --> | ||
492 | * <!-- end-user-doc --> | ||
493 | * @generated | ||
494 | */ | ||
495 | @Override | ||
496 | public EReference getInput_IncomingConnections() { | ||
497 | return (EReference)inputEClass.getEStructuralFeatures().get(2); | ||
498 | } | ||
499 | |||
500 | /** | ||
501 | * <!-- begin-user-doc --> | ||
502 | * <!-- end-user-doc --> | ||
503 | * @generated | ||
504 | */ | ||
505 | @Override | ||
506 | public EClass getOutput() { | ||
507 | return outputEClass; | ||
508 | } | ||
509 | |||
510 | /** | ||
511 | * <!-- begin-user-doc --> | ||
512 | * <!-- end-user-doc --> | ||
513 | * @generated | ||
514 | */ | ||
515 | @Override | ||
516 | public EReference getOutput_EventDeclaration() { | ||
517 | return (EReference)outputEClass.getEStructuralFeatures().get(0); | ||
518 | } | ||
519 | |||
520 | /** | ||
521 | * <!-- begin-user-doc --> | ||
522 | * <!-- end-user-doc --> | ||
523 | * @generated | ||
524 | */ | ||
525 | @Override | ||
526 | public EReference getOutput_OutgoingConnections() { | ||
527 | return (EReference)outputEClass.getEStructuralFeatures().get(1); | ||
528 | } | ||
529 | |||
530 | /** | ||
531 | * <!-- begin-user-doc --> | ||
532 | * <!-- end-user-doc --> | ||
533 | * @generated | ||
534 | */ | ||
535 | @Override | ||
536 | public EReference getOutput_Component() { | ||
537 | return (EReference)outputEClass.getEStructuralFeatures().get(2); | ||
538 | } | ||
539 | |||
540 | /** | ||
541 | * <!-- begin-user-doc --> | ||
542 | * <!-- end-user-doc --> | ||
543 | * @generated | ||
544 | */ | ||
545 | @Override | ||
546 | public EClass getConnection() { | ||
547 | return connectionEClass; | ||
548 | } | ||
549 | |||
550 | /** | ||
551 | * <!-- begin-user-doc --> | ||
552 | * <!-- end-user-doc --> | ||
553 | * @generated | ||
554 | */ | ||
555 | @Override | ||
556 | public EReference getConnection_Input() { | ||
557 | return (EReference)connectionEClass.getEStructuralFeatures().get(0); | ||
558 | } | ||
559 | |||
560 | /** | ||
561 | * <!-- begin-user-doc --> | ||
562 | * <!-- end-user-doc --> | ||
563 | * @generated | ||
564 | */ | ||
565 | @Override | ||
566 | public EReference getConnection_Output() { | ||
567 | return (EReference)connectionEClass.getEStructuralFeatures().get(1); | ||
568 | } | ||
569 | |||
570 | /** | ||
571 | * <!-- begin-user-doc --> | ||
572 | * <!-- end-user-doc --> | ||
573 | * @generated | ||
574 | */ | ||
575 | @Override | ||
576 | public CftFactory getCftFactory() { | ||
577 | return (CftFactory)getEFactoryInstance(); | ||
578 | } | ||
579 | |||
580 | /** | ||
581 | * <!-- begin-user-doc --> | ||
582 | * <!-- end-user-doc --> | ||
583 | * @generated | ||
584 | */ | ||
585 | private boolean isCreated = false; | ||
586 | |||
587 | /** | ||
588 | * Creates the meta-model objects for the package. This method is | ||
589 | * guarded to have no affect on any invocation but its first. | ||
590 | * <!-- begin-user-doc --> | ||
591 | * <!-- end-user-doc --> | ||
592 | * @generated | ||
593 | */ | ||
594 | public void createPackageContents() { | ||
595 | if (isCreated) return; | ||
596 | isCreated = true; | ||
597 | |||
598 | // Create classes and their features | ||
599 | componentDefinitionEClass = createEClass(COMPONENT_DEFINITION); | ||
600 | createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__INPUT_EVENTS); | ||
601 | createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__EVENT_DEFINITIONS); | ||
602 | createEReference(componentDefinitionEClass, COMPONENT_DEFINITION__OUTPUT_EVENTS); | ||
603 | createEAttribute(componentDefinitionEClass, COMPONENT_DEFINITION__NAME); | ||
604 | |||
605 | eventDefinitionEClass = createEClass(EVENT_DEFINITION); | ||
606 | |||
607 | gateDefinitionEClass = createEClass(GATE_DEFINITION); | ||
608 | createEReference(gateDefinitionEClass, GATE_DEFINITION__INPUT_EVENTS); | ||
609 | |||
610 | basicEventDefinitionEClass = createEClass(BASIC_EVENT_DEFINITION); | ||
611 | createEReference(basicEventDefinitionEClass, BASIC_EVENT_DEFINITION__DISTRIBUTION); | ||
612 | |||
613 | intputEventEClass = createEClass(INTPUT_EVENT); | ||
614 | createEAttribute(intputEventEClass, INTPUT_EVENT__MULTIPLE); | ||
615 | |||
616 | eventDeclarationEClass = createEClass(EVENT_DECLARATION); | ||
617 | createEAttribute(eventDeclarationEClass, EVENT_DECLARATION__NAME); | ||
618 | |||
619 | andGateDefinitionEClass = createEClass(AND_GATE_DEFINITION); | ||
620 | |||
621 | orGateDefinitionEClass = createEClass(OR_GATE_DEFINITION); | ||
622 | |||
623 | kOfMGateDefinitionEClass = createEClass(KOF_MGATE_DEFINITION); | ||
624 | createEAttribute(kOfMGateDefinitionEClass, KOF_MGATE_DEFINITION__K); | ||
625 | createEAttribute(kOfMGateDefinitionEClass, KOF_MGATE_DEFINITION__M); | ||
626 | |||
627 | componentFaultTreeEClass = createEClass(COMPONENT_FAULT_TREE); | ||
628 | createEReference(componentFaultTreeEClass, COMPONENT_FAULT_TREE__COMPONENTS); | ||
629 | createEReference(componentFaultTreeEClass, COMPONENT_FAULT_TREE__TOP_EVENT); | ||
630 | |||
631 | componentEClass = createEClass(COMPONENT); | ||
632 | createEReference(componentEClass, COMPONENT__INPUTS); | ||
633 | createEReference(componentEClass, COMPONENT__OUTPUTS); | ||
634 | createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION); | ||
635 | |||
636 | inputEClass = createEClass(INPUT); | ||
637 | createEReference(inputEClass, INPUT__INTPUT_EVENT); | ||
638 | createEReference(inputEClass, INPUT__COMPONENT); | ||
639 | createEReference(inputEClass, INPUT__INCOMING_CONNECTIONS); | ||
640 | |||
641 | outputEClass = createEClass(OUTPUT); | ||
642 | createEReference(outputEClass, OUTPUT__EVENT_DECLARATION); | ||
643 | createEReference(outputEClass, OUTPUT__OUTGOING_CONNECTIONS); | ||
644 | createEReference(outputEClass, OUTPUT__COMPONENT); | ||
645 | |||
646 | connectionEClass = createEClass(CONNECTION); | ||
647 | createEReference(connectionEClass, CONNECTION__INPUT); | ||
648 | createEReference(connectionEClass, CONNECTION__OUTPUT); | ||
649 | } | ||
650 | |||
651 | /** | ||
652 | * <!-- begin-user-doc --> | ||
653 | * <!-- end-user-doc --> | ||
654 | * @generated | ||
655 | */ | ||
656 | private boolean isInitialized = false; | ||
657 | |||
658 | /** | ||
659 | * Complete the initialization of the package and its meta-model. This | ||
660 | * method is guarded to have no affect on any invocation but its first. | ||
661 | * <!-- begin-user-doc --> | ||
662 | * <!-- end-user-doc --> | ||
663 | * @generated | ||
664 | */ | ||
665 | public void initializePackageContents() { | ||
666 | if (isInitialized) return; | ||
667 | isInitialized = true; | ||
668 | |||
669 | // Initialize package | ||
670 | setName(eNAME); | ||
671 | setNsPrefix(eNS_PREFIX); | ||
672 | setNsURI(eNS_URI); | ||
673 | |||
674 | // Obtain other dependent packages | ||
675 | FtPackage theFtPackage = (FtPackage)EPackage.Registry.INSTANCE.getEPackage(FtPackage.eNS_URI); | ||
676 | |||
677 | // Create type parameters | ||
678 | |||
679 | // Set bounds for type parameters | ||
680 | |||
681 | // Add supertypes to classes | ||
682 | eventDefinitionEClass.getESuperTypes().add(this.getEventDeclaration()); | ||
683 | gateDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); | ||
684 | basicEventDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); | ||
685 | intputEventEClass.getESuperTypes().add(this.getEventDeclaration()); | ||
686 | andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | ||
687 | orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | ||
688 | kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | ||
689 | |||
690 | // Initialize classes, features, and operations; add parameters | ||
691 | initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
692 | initEReference(getComponentDefinition_InputEvents(), this.getIntputEvent(), null, "inputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
693 | initEReference(getComponentDefinition_EventDefinitions(), this.getEventDefinition(), null, "eventDefinitions", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
694 | initEReference(getComponentDefinition_OutputEvents(), this.getEventDeclaration(), null, "outputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
695 | initEAttribute(getComponentDefinition_Name(), ecorePackage.getEString(), "name", null, 0, 1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
696 | |||
697 | initEClass(eventDefinitionEClass, EventDefinition.class, "EventDefinition", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
698 | |||
699 | initEClass(gateDefinitionEClass, GateDefinition.class, "GateDefinition", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
700 | initEReference(getGateDefinition_InputEvents(), this.getEventDeclaration(), null, "inputEvents", null, 0, -1, GateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
701 | |||
702 | initEClass(basicEventDefinitionEClass, BasicEventDefinition.class, "BasicEventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
703 | initEReference(getBasicEventDefinition_Distribution(), theFtPackage.getDistribution(), null, "distribution", null, 1, 1, BasicEventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
704 | |||
705 | initEClass(intputEventEClass, IntputEvent.class, "IntputEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
706 | initEAttribute(getIntputEvent_Multiple(), ecorePackage.getEBoolean(), "multiple", null, 0, 1, IntputEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
707 | |||
708 | initEClass(eventDeclarationEClass, EventDeclaration.class, "EventDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
709 | initEAttribute(getEventDeclaration_Name(), ecorePackage.getEString(), "name", null, 0, 1, EventDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
710 | |||
711 | initEClass(andGateDefinitionEClass, AndGateDefinition.class, "AndGateDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
712 | |||
713 | initEClass(orGateDefinitionEClass, OrGateDefinition.class, "OrGateDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
714 | |||
715 | initEClass(kOfMGateDefinitionEClass, KOfMGateDefinition.class, "KOfMGateDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
716 | initEAttribute(getKOfMGateDefinition_K(), ecorePackage.getEInt(), "k", null, 0, 1, KOfMGateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
717 | initEAttribute(getKOfMGateDefinition_M(), ecorePackage.getEInt(), "m", null, 0, 1, KOfMGateDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
718 | |||
719 | initEClass(componentFaultTreeEClass, ComponentFaultTree.class, "ComponentFaultTree", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
720 | initEReference(getComponentFaultTree_Components(), this.getComponent(), null, "components", null, 0, -1, ComponentFaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
721 | initEReference(getComponentFaultTree_TopEvent(), this.getOutput(), null, "topEvent", null, 1, 1, ComponentFaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
722 | |||
723 | initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
724 | initEReference(getComponent_Inputs(), this.getInput(), this.getInput_Component(), "inputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
725 | initEReference(getComponent_Outputs(), this.getOutput(), this.getOutput_Component(), "outputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
726 | initEReference(getComponent_ComponentDefinition(), this.getComponentDefinition(), null, "componentDefinition", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
727 | |||
728 | initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
729 | initEReference(getInput_IntputEvent(), this.getIntputEvent(), null, "intputEvent", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
730 | initEReference(getInput_Component(), this.getComponent(), this.getComponent_Inputs(), "component", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
731 | initEReference(getInput_IncomingConnections(), this.getConnection(), this.getConnection_Input(), "incomingConnections", null, 0, -1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
732 | |||
733 | initEClass(outputEClass, Output.class, "Output", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
734 | initEReference(getOutput_EventDeclaration(), this.getEventDeclaration(), null, "eventDeclaration", null, 1, 1, Output.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
735 | initEReference(getOutput_OutgoingConnections(), this.getConnection(), this.getConnection_Output(), "outgoingConnections", null, 0, -1, Output.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
736 | initEReference(getOutput_Component(), this.getComponent(), this.getComponent_Outputs(), "component", null, 1, 1, Output.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
737 | |||
738 | initEClass(connectionEClass, Connection.class, "Connection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
739 | initEReference(getConnection_Input(), this.getInput(), this.getInput_IncomingConnections(), "input", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
740 | initEReference(getConnection_Output(), this.getOutput(), this.getOutput_OutgoingConnections(), "output", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
741 | |||
742 | // Create resource | ||
743 | createResource(eNS_URI); | ||
744 | } | ||
745 | |||
746 | } //CftPackageImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java new file mode 100644 index 00000000..58a476f3 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java | |||
@@ -0,0 +1,300 @@ | |||
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.ComponentDefinition; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | ||
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.EObjectContainmentEList; | ||
25 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
26 | import org.eclipse.emf.ecore.util.InternalEList; | ||
27 | |||
28 | /** | ||
29 | * <!-- begin-user-doc --> | ||
30 | * An implementation of the model object '<em><b>Component Definition</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.ComponentDefinitionImpl#getInputEvents <em>Input Events</em>}</li> | ||
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentDefinitionImpl#getEventDefinitions <em>Event Definitions</em>}</li> | ||
38 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentDefinitionImpl#getOutputEvents <em>Output Events</em>}</li> | ||
39 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentDefinitionImpl#getName <em>Name</em>}</li> | ||
40 | * </ul> | ||
41 | * | ||
42 | * @generated | ||
43 | */ | ||
44 | public class ComponentDefinitionImpl extends MinimalEObjectImpl.Container implements ComponentDefinition { | ||
45 | /** | ||
46 | * The cached value of the '{@link #getInputEvents() <em>Input Events</em>}' containment reference list. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getInputEvents() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected EList<IntputEvent> inputEvents; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getEventDefinitions() <em>Event Definitions</em>}' containment reference list. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getEventDefinitions() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected EList<EventDefinition> eventDefinitions; | ||
64 | |||
65 | /** | ||
66 | * The cached value of the '{@link #getOutputEvents() <em>Output Events</em>}' reference list. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #getOutputEvents() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected EList<EventDeclaration> outputEvents; | ||
74 | |||
75 | /** | ||
76 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @see #getName() | ||
80 | * @generated | ||
81 | * @ordered | ||
82 | */ | ||
83 | protected static final String NAME_EDEFAULT = null; | ||
84 | |||
85 | /** | ||
86 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @see #getName() | ||
90 | * @generated | ||
91 | * @ordered | ||
92 | */ | ||
93 | protected String name = NAME_EDEFAULT; | ||
94 | |||
95 | /** | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @generated | ||
99 | */ | ||
100 | protected ComponentDefinitionImpl() { | ||
101 | super(); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | protected EClass eStaticClass() { | ||
111 | return CftPackage.Literals.COMPONENT_DEFINITION; | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public EList<IntputEvent> getInputEvents() { | ||
121 | if (inputEvents == null) { | ||
122 | inputEvents = new EObjectContainmentEList<IntputEvent>(IntputEvent.class, this, CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS); | ||
123 | } | ||
124 | return inputEvents; | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | @Override | ||
133 | public EList<EventDefinition> getEventDefinitions() { | ||
134 | if (eventDefinitions == null) { | ||
135 | eventDefinitions = new EObjectContainmentEList<EventDefinition>(EventDefinition.class, this, CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS); | ||
136 | } | ||
137 | return eventDefinitions; | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * <!-- begin-user-doc --> | ||
142 | * <!-- end-user-doc --> | ||
143 | * @generated | ||
144 | */ | ||
145 | @Override | ||
146 | public EList<EventDeclaration> getOutputEvents() { | ||
147 | if (outputEvents == null) { | ||
148 | outputEvents = new EObjectResolvingEList<EventDeclaration>(EventDeclaration.class, this, CftPackage.COMPONENT_DEFINITION__OUTPUT_EVENTS); | ||
149 | } | ||
150 | return outputEvents; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @Override | ||
159 | public String getName() { | ||
160 | return name; | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public void setName(String newName) { | ||
170 | String oldName = name; | ||
171 | name = newName; | ||
172 | if (eNotificationRequired()) | ||
173 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT_DEFINITION__NAME, oldName, name)); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
183 | switch (featureID) { | ||
184 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | ||
185 | return ((InternalEList<?>)getInputEvents()).basicRemove(otherEnd, msgs); | ||
186 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | ||
187 | return ((InternalEList<?>)getEventDefinitions()).basicRemove(otherEnd, msgs); | ||
188 | } | ||
189 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | @Override | ||
198 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
199 | switch (featureID) { | ||
200 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | ||
201 | return getInputEvents(); | ||
202 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | ||
203 | return getEventDefinitions(); | ||
204 | case CftPackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: | ||
205 | return getOutputEvents(); | ||
206 | case CftPackage.COMPONENT_DEFINITION__NAME: | ||
207 | return getName(); | ||
208 | } | ||
209 | return super.eGet(featureID, resolve, coreType); | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * <!-- begin-user-doc --> | ||
214 | * <!-- end-user-doc --> | ||
215 | * @generated | ||
216 | */ | ||
217 | @SuppressWarnings("unchecked") | ||
218 | @Override | ||
219 | public void eSet(int featureID, Object newValue) { | ||
220 | switch (featureID) { | ||
221 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | ||
222 | getInputEvents().clear(); | ||
223 | getInputEvents().addAll((Collection<? extends IntputEvent>)newValue); | ||
224 | return; | ||
225 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | ||
226 | getEventDefinitions().clear(); | ||
227 | getEventDefinitions().addAll((Collection<? extends EventDefinition>)newValue); | ||
228 | return; | ||
229 | case CftPackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: | ||
230 | getOutputEvents().clear(); | ||
231 | getOutputEvents().addAll((Collection<? extends EventDeclaration>)newValue); | ||
232 | return; | ||
233 | case CftPackage.COMPONENT_DEFINITION__NAME: | ||
234 | setName((String)newValue); | ||
235 | return; | ||
236 | } | ||
237 | super.eSet(featureID, newValue); | ||
238 | } | ||
239 | |||
240 | /** | ||
241 | * <!-- begin-user-doc --> | ||
242 | * <!-- end-user-doc --> | ||
243 | * @generated | ||
244 | */ | ||
245 | @Override | ||
246 | public void eUnset(int featureID) { | ||
247 | switch (featureID) { | ||
248 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | ||
249 | getInputEvents().clear(); | ||
250 | return; | ||
251 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | ||
252 | getEventDefinitions().clear(); | ||
253 | return; | ||
254 | case CftPackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: | ||
255 | getOutputEvents().clear(); | ||
256 | return; | ||
257 | case CftPackage.COMPONENT_DEFINITION__NAME: | ||
258 | setName(NAME_EDEFAULT); | ||
259 | return; | ||
260 | } | ||
261 | super.eUnset(featureID); | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * <!-- begin-user-doc --> | ||
266 | * <!-- end-user-doc --> | ||
267 | * @generated | ||
268 | */ | ||
269 | @Override | ||
270 | public boolean eIsSet(int featureID) { | ||
271 | switch (featureID) { | ||
272 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | ||
273 | return inputEvents != null && !inputEvents.isEmpty(); | ||
274 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | ||
275 | return eventDefinitions != null && !eventDefinitions.isEmpty(); | ||
276 | case CftPackage.COMPONENT_DEFINITION__OUTPUT_EVENTS: | ||
277 | return outputEvents != null && !outputEvents.isEmpty(); | ||
278 | case CftPackage.COMPONENT_DEFINITION__NAME: | ||
279 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
280 | } | ||
281 | return super.eIsSet(featureID); | ||
282 | } | ||
283 | |||
284 | /** | ||
285 | * <!-- begin-user-doc --> | ||
286 | * <!-- end-user-doc --> | ||
287 | * @generated | ||
288 | */ | ||
289 | @Override | ||
290 | public String toString() { | ||
291 | if (eIsProxy()) return super.toString(); | ||
292 | |||
293 | StringBuilder result = new StringBuilder(super.toString()); | ||
294 | result.append(" (name: "); | ||
295 | result.append(name); | ||
296 | result.append(')'); | ||
297 | return result.toString(); | ||
298 | } | ||
299 | |||
300 | } //ComponentDefinitionImpl | ||
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 | ||
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 | ||
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 | */ | ||
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.Connection; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
18 | |||
19 | import 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 | */ | ||
35 | public 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 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDeclarationImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDeclarationImpl.java new file mode 100644 index 00000000..e60a9427 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDeclarationImpl.java | |||
@@ -0,0 +1,163 @@ | |||
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.EventDeclaration; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Event Declaration</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.EventDeclarationImpl#getName <em>Name</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public abstract class EventDeclarationImpl extends MinimalEObjectImpl.Container implements EventDeclaration { | ||
28 | /** | ||
29 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getName() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final String NAME_EDEFAULT = null; | ||
37 | /** | ||
38 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getName() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected String name = NAME_EDEFAULT; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | protected EventDeclarationImpl() { | ||
53 | super(); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | @Override | ||
62 | protected EClass eStaticClass() { | ||
63 | return CftPackage.Literals.EVENT_DECLARATION; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | @Override | ||
72 | public String getName() { | ||
73 | return name; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | @Override | ||
82 | public void setName(String newName) { | ||
83 | String oldName = name; | ||
84 | name = newName; | ||
85 | if (eNotificationRequired()) | ||
86 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.EVENT_DECLARATION__NAME, oldName, name)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
96 | switch (featureID) { | ||
97 | case CftPackage.EVENT_DECLARATION__NAME: | ||
98 | return getName(); | ||
99 | } | ||
100 | return super.eGet(featureID, resolve, coreType); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | public void eSet(int featureID, Object newValue) { | ||
110 | switch (featureID) { | ||
111 | case CftPackage.EVENT_DECLARATION__NAME: | ||
112 | setName((String)newValue); | ||
113 | return; | ||
114 | } | ||
115 | super.eSet(featureID, newValue); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void eUnset(int featureID) { | ||
125 | switch (featureID) { | ||
126 | case CftPackage.EVENT_DECLARATION__NAME: | ||
127 | setName(NAME_EDEFAULT); | ||
128 | return; | ||
129 | } | ||
130 | super.eUnset(featureID); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public boolean eIsSet(int featureID) { | ||
140 | switch (featureID) { | ||
141 | case CftPackage.EVENT_DECLARATION__NAME: | ||
142 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
143 | } | ||
144 | return super.eIsSet(featureID); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public String toString() { | ||
154 | if (eIsProxy()) return super.toString(); | ||
155 | |||
156 | StringBuilder result = new StringBuilder(super.toString()); | ||
157 | result.append(" (name: "); | ||
158 | result.append(name); | ||
159 | result.append(')'); | ||
160 | return result.toString(); | ||
161 | } | ||
162 | |||
163 | } //EventDeclarationImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDefinitionImpl.java new file mode 100644 index 00000000..76b79f5b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/EventDefinitionImpl.java | |||
@@ -0,0 +1,37 @@ | |||
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.EventDefinition; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Event Definition</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public abstract class EventDefinitionImpl extends EventDeclarationImpl implements EventDefinition { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected EventDefinitionImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return CftPackage.Literals.EVENT_DEFINITION; | ||
35 | } | ||
36 | |||
37 | } //EventDefinitionImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/GateDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/GateDefinitionImpl.java new file mode 100644 index 00000000..2fb9a724 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/GateDefinitionImpl.java | |||
@@ -0,0 +1,133 @@ | |||
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.EventDeclaration; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.util.EList; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | |||
15 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Gate Definition</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.GateDefinitionImpl#getInputEvents <em>Input Events</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public abstract class GateDefinitionImpl extends EventDefinitionImpl implements GateDefinition { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getInputEvents() <em>Input Events</em>}' reference list. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getInputEvents() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected EList<EventDeclaration> inputEvents; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected GateDefinitionImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return CftPackage.Literals.GATE_DEFINITION; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | public EList<EventDeclaration> getInputEvents() { | ||
67 | if (inputEvents == null) { | ||
68 | inputEvents = new EObjectResolvingEList<EventDeclaration>(EventDeclaration.class, this, CftPackage.GATE_DEFINITION__INPUT_EVENTS); | ||
69 | } | ||
70 | return inputEvents; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | @Override | ||
79 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
80 | switch (featureID) { | ||
81 | case CftPackage.GATE_DEFINITION__INPUT_EVENTS: | ||
82 | return getInputEvents(); | ||
83 | } | ||
84 | return super.eGet(featureID, resolve, coreType); | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | @SuppressWarnings("unchecked") | ||
93 | @Override | ||
94 | public void eSet(int featureID, Object newValue) { | ||
95 | switch (featureID) { | ||
96 | case CftPackage.GATE_DEFINITION__INPUT_EVENTS: | ||
97 | getInputEvents().clear(); | ||
98 | getInputEvents().addAll((Collection<? extends EventDeclaration>)newValue); | ||
99 | return; | ||
100 | } | ||
101 | super.eSet(featureID, newValue); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | public void eUnset(int featureID) { | ||
111 | switch (featureID) { | ||
112 | case CftPackage.GATE_DEFINITION__INPUT_EVENTS: | ||
113 | getInputEvents().clear(); | ||
114 | return; | ||
115 | } | ||
116 | super.eUnset(featureID); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public boolean eIsSet(int featureID) { | ||
126 | switch (featureID) { | ||
127 | case CftPackage.GATE_DEFINITION__INPUT_EVENTS: | ||
128 | return inputEvents != null && !inputEvents.isEmpty(); | ||
129 | } | ||
130 | return super.eIsSet(featureID); | ||
131 | } | ||
132 | |||
133 | } //GateDefinitionImpl | ||
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 | */ | ||
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.Connection; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | ||
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.EcoreUtil; | ||
26 | import 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 | */ | ||
43 | public 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 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/IntputEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/IntputEventImpl.java new file mode 100644 index 00000000..ea22452f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/IntputEventImpl.java | |||
@@ -0,0 +1,164 @@ | |||
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.IntputEvent; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Intput Event</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl#isMultiple <em>Multiple</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @generated | ||
26 | */ | ||
27 | public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent { | ||
28 | /** | ||
29 | * The default value of the '{@link #isMultiple() <em>Multiple</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #isMultiple() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final boolean MULTIPLE_EDEFAULT = false; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #isMultiple() <em>Multiple</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #isMultiple() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected boolean multiple = MULTIPLE_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @generated | ||
52 | */ | ||
53 | protected IntputEventImpl() { | ||
54 | super(); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | @Override | ||
63 | protected EClass eStaticClass() { | ||
64 | return CftPackage.Literals.INTPUT_EVENT; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | public boolean isMultiple() { | ||
74 | return multiple; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public void setMultiple(boolean newMultiple) { | ||
84 | boolean oldMultiple = multiple; | ||
85 | multiple = newMultiple; | ||
86 | if (eNotificationRequired()) | ||
87 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INTPUT_EVENT__MULTIPLE, oldMultiple, multiple)); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
97 | switch (featureID) { | ||
98 | case CftPackage.INTPUT_EVENT__MULTIPLE: | ||
99 | return isMultiple(); | ||
100 | } | ||
101 | return super.eGet(featureID, resolve, coreType); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @Override | ||
110 | public void eSet(int featureID, Object newValue) { | ||
111 | switch (featureID) { | ||
112 | case CftPackage.INTPUT_EVENT__MULTIPLE: | ||
113 | setMultiple((Boolean)newValue); | ||
114 | return; | ||
115 | } | ||
116 | super.eSet(featureID, newValue); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public void eUnset(int featureID) { | ||
126 | switch (featureID) { | ||
127 | case CftPackage.INTPUT_EVENT__MULTIPLE: | ||
128 | setMultiple(MULTIPLE_EDEFAULT); | ||
129 | return; | ||
130 | } | ||
131 | super.eUnset(featureID); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public boolean eIsSet(int featureID) { | ||
141 | switch (featureID) { | ||
142 | case CftPackage.INTPUT_EVENT__MULTIPLE: | ||
143 | return multiple != MULTIPLE_EDEFAULT; | ||
144 | } | ||
145 | return super.eIsSet(featureID); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public String toString() { | ||
155 | if (eIsProxy()) return super.toString(); | ||
156 | |||
157 | StringBuilder result = new StringBuilder(super.toString()); | ||
158 | result.append(" (multiple: "); | ||
159 | result.append(multiple); | ||
160 | result.append(')'); | ||
161 | return result.toString(); | ||
162 | } | ||
163 | |||
164 | } //IntputEventImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/KOfMGateDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/KOfMGateDefinitionImpl.java new file mode 100644 index 00000000..fed17513 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/KOfMGateDefinitionImpl.java | |||
@@ -0,0 +1,220 @@ | |||
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.KOfMGateDefinition; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>KOf MGate Definition</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.KOfMGateDefinitionImpl#getK <em>K</em>}</li> | ||
23 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.KOfMGateDefinitionImpl#getM <em>M</em>}</li> | ||
24 | * </ul> | ||
25 | * | ||
26 | * @generated | ||
27 | */ | ||
28 | public class KOfMGateDefinitionImpl extends GateDefinitionImpl implements KOfMGateDefinition { | ||
29 | /** | ||
30 | * The default value of the '{@link #getK() <em>K</em>}' attribute. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @see #getK() | ||
34 | * @generated | ||
35 | * @ordered | ||
36 | */ | ||
37 | protected static final int K_EDEFAULT = 0; | ||
38 | |||
39 | /** | ||
40 | * The cached value of the '{@link #getK() <em>K</em>}' attribute. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getK() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected int k = K_EDEFAULT; | ||
48 | |||
49 | /** | ||
50 | * The default value of the '{@link #getM() <em>M</em>}' attribute. | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @see #getM() | ||
54 | * @generated | ||
55 | * @ordered | ||
56 | */ | ||
57 | protected static final int M_EDEFAULT = 0; | ||
58 | |||
59 | /** | ||
60 | * The cached value of the '{@link #getM() <em>M</em>}' attribute. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see #getM() | ||
64 | * @generated | ||
65 | * @ordered | ||
66 | */ | ||
67 | protected int m = M_EDEFAULT; | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | protected KOfMGateDefinitionImpl() { | ||
75 | super(); | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | protected EClass eStaticClass() { | ||
85 | return CftPackage.Literals.KOF_MGATE_DEFINITION; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | @Override | ||
94 | public int getK() { | ||
95 | return k; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public void setK(int newK) { | ||
105 | int oldK = k; | ||
106 | k = newK; | ||
107 | if (eNotificationRequired()) | ||
108 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.KOF_MGATE_DEFINITION__K, oldK, k)); | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | @Override | ||
117 | public int getM() { | ||
118 | return m; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public void setM(int newM) { | ||
128 | int oldM = m; | ||
129 | m = newM; | ||
130 | if (eNotificationRequired()) | ||
131 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.KOF_MGATE_DEFINITION__M, oldM, m)); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
141 | switch (featureID) { | ||
142 | case CftPackage.KOF_MGATE_DEFINITION__K: | ||
143 | return getK(); | ||
144 | case CftPackage.KOF_MGATE_DEFINITION__M: | ||
145 | return getM(); | ||
146 | } | ||
147 | return super.eGet(featureID, resolve, coreType); | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @generated | ||
154 | */ | ||
155 | @Override | ||
156 | public void eSet(int featureID, Object newValue) { | ||
157 | switch (featureID) { | ||
158 | case CftPackage.KOF_MGATE_DEFINITION__K: | ||
159 | setK((Integer)newValue); | ||
160 | return; | ||
161 | case CftPackage.KOF_MGATE_DEFINITION__M: | ||
162 | setM((Integer)newValue); | ||
163 | return; | ||
164 | } | ||
165 | super.eSet(featureID, newValue); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public void eUnset(int featureID) { | ||
175 | switch (featureID) { | ||
176 | case CftPackage.KOF_MGATE_DEFINITION__K: | ||
177 | setK(K_EDEFAULT); | ||
178 | return; | ||
179 | case CftPackage.KOF_MGATE_DEFINITION__M: | ||
180 | setM(M_EDEFAULT); | ||
181 | return; | ||
182 | } | ||
183 | super.eUnset(featureID); | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | @Override | ||
192 | public boolean eIsSet(int featureID) { | ||
193 | switch (featureID) { | ||
194 | case CftPackage.KOF_MGATE_DEFINITION__K: | ||
195 | return k != K_EDEFAULT; | ||
196 | case CftPackage.KOF_MGATE_DEFINITION__M: | ||
197 | return m != M_EDEFAULT; | ||
198 | } | ||
199 | return super.eIsSet(featureID); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public String toString() { | ||
209 | if (eIsProxy()) return super.toString(); | ||
210 | |||
211 | StringBuilder result = new StringBuilder(super.toString()); | ||
212 | result.append(" (k: "); | ||
213 | result.append(k); | ||
214 | result.append(", m: "); | ||
215 | result.append(m); | ||
216 | result.append(')'); | ||
217 | return result.toString(); | ||
218 | } | ||
219 | |||
220 | } //KOfMGateDefinitionImpl | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OrGateDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OrGateDefinitionImpl.java new file mode 100644 index 00000000..d2275f60 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/OrGateDefinitionImpl.java | |||
@@ -0,0 +1,37 @@ | |||
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.OrGateDefinition; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>Or Gate Definition</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class OrGateDefinitionImpl extends GateDefinitionImpl implements OrGateDefinition { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected OrGateDefinitionImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return CftPackage.Literals.OR_GATE_DEFINITION; | ||
35 | } | ||
36 | |||
37 | } //OrGateDefinitionImpl | ||
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 | */ | ||
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.Connection; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | ||
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.EObjectWithInverseResolvingEList; | ||
25 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
26 | import 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 | */ | ||
43 | public 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 | ||