diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/IfThenElseImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/IfThenElseImpl.java | 307 |
1 files changed, 307 insertions, 0 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/IfThenElseImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/IfThenElseImpl.java new file mode 100644 index 00000000..27f1a358 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/IfThenElseImpl.java | |||
@@ -0,0 +1,307 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IfThenElse; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>If Then Else</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.logic.model.logiclanguage.impl.IfThenElseImpl#getCondition <em>Condition</em>}</li> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.IfThenElseImpl#getIfTrue <em>If True</em>}</li> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.IfThenElseImpl#getIfFalse <em>If False</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class IfThenElseImpl extends TermImpl implements IfThenElse { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getCondition() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected Term condition; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getIfTrue() <em>If True</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getIfTrue() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected Term ifTrue; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getIfFalse() <em>If False</em>}' containment reference. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getIfFalse() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected Term ifFalse; | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | protected IfThenElseImpl() { | ||
69 | super(); | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | @Override | ||
78 | protected EClass eStaticClass() { | ||
79 | return LogiclanguagePackage.Literals.IF_THEN_ELSE; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | public Term getCondition() { | ||
88 | return condition; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | public NotificationChain basicSetCondition(Term newCondition, NotificationChain msgs) { | ||
97 | Term oldCondition = condition; | ||
98 | condition = newCondition; | ||
99 | if (eNotificationRequired()) { | ||
100 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__CONDITION, oldCondition, newCondition); | ||
101 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
102 | } | ||
103 | return msgs; | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | public void setCondition(Term newCondition) { | ||
112 | if (newCondition != condition) { | ||
113 | NotificationChain msgs = null; | ||
114 | if (condition != null) | ||
115 | msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__CONDITION, null, msgs); | ||
116 | if (newCondition != null) | ||
117 | msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__CONDITION, null, msgs); | ||
118 | msgs = basicSetCondition(newCondition, msgs); | ||
119 | if (msgs != null) msgs.dispatch(); | ||
120 | } | ||
121 | else if (eNotificationRequired()) | ||
122 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__CONDITION, newCondition, newCondition)); | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | public Term getIfTrue() { | ||
131 | return ifTrue; | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | public NotificationChain basicSetIfTrue(Term newIfTrue, NotificationChain msgs) { | ||
140 | Term oldIfTrue = ifTrue; | ||
141 | ifTrue = newIfTrue; | ||
142 | if (eNotificationRequired()) { | ||
143 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE, oldIfTrue, newIfTrue); | ||
144 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
145 | } | ||
146 | return msgs; | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | public void setIfTrue(Term newIfTrue) { | ||
155 | if (newIfTrue != ifTrue) { | ||
156 | NotificationChain msgs = null; | ||
157 | if (ifTrue != null) | ||
158 | msgs = ((InternalEObject)ifTrue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE, null, msgs); | ||
159 | if (newIfTrue != null) | ||
160 | msgs = ((InternalEObject)newIfTrue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE, null, msgs); | ||
161 | msgs = basicSetIfTrue(newIfTrue, msgs); | ||
162 | if (msgs != null) msgs.dispatch(); | ||
163 | } | ||
164 | else if (eNotificationRequired()) | ||
165 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE, newIfTrue, newIfTrue)); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | public Term getIfFalse() { | ||
174 | return ifFalse; | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | public NotificationChain basicSetIfFalse(Term newIfFalse, NotificationChain msgs) { | ||
183 | Term oldIfFalse = ifFalse; | ||
184 | ifFalse = newIfFalse; | ||
185 | if (eNotificationRequired()) { | ||
186 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE, oldIfFalse, newIfFalse); | ||
187 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
188 | } | ||
189 | return msgs; | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | public void setIfFalse(Term newIfFalse) { | ||
198 | if (newIfFalse != ifFalse) { | ||
199 | NotificationChain msgs = null; | ||
200 | if (ifFalse != null) | ||
201 | msgs = ((InternalEObject)ifFalse).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE, null, msgs); | ||
202 | if (newIfFalse != null) | ||
203 | msgs = ((InternalEObject)newIfFalse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE, null, msgs); | ||
204 | msgs = basicSetIfFalse(newIfFalse, msgs); | ||
205 | if (msgs != null) msgs.dispatch(); | ||
206 | } | ||
207 | else if (eNotificationRequired()) | ||
208 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE, newIfFalse, newIfFalse)); | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | @Override | ||
217 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
218 | switch (featureID) { | ||
219 | case LogiclanguagePackage.IF_THEN_ELSE__CONDITION: | ||
220 | return basicSetCondition(null, msgs); | ||
221 | case LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE: | ||
222 | return basicSetIfTrue(null, msgs); | ||
223 | case LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE: | ||
224 | return basicSetIfFalse(null, msgs); | ||
225 | } | ||
226 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
227 | } | ||
228 | |||
229 | /** | ||
230 | * <!-- begin-user-doc --> | ||
231 | * <!-- end-user-doc --> | ||
232 | * @generated | ||
233 | */ | ||
234 | @Override | ||
235 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
236 | switch (featureID) { | ||
237 | case LogiclanguagePackage.IF_THEN_ELSE__CONDITION: | ||
238 | return getCondition(); | ||
239 | case LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE: | ||
240 | return getIfTrue(); | ||
241 | case LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE: | ||
242 | return getIfFalse(); | ||
243 | } | ||
244 | return super.eGet(featureID, resolve, coreType); | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * <!-- begin-user-doc --> | ||
249 | * <!-- end-user-doc --> | ||
250 | * @generated | ||
251 | */ | ||
252 | @Override | ||
253 | public void eSet(int featureID, Object newValue) { | ||
254 | switch (featureID) { | ||
255 | case LogiclanguagePackage.IF_THEN_ELSE__CONDITION: | ||
256 | setCondition((Term)newValue); | ||
257 | return; | ||
258 | case LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE: | ||
259 | setIfTrue((Term)newValue); | ||
260 | return; | ||
261 | case LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE: | ||
262 | setIfFalse((Term)newValue); | ||
263 | return; | ||
264 | } | ||
265 | super.eSet(featureID, newValue); | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public void eUnset(int featureID) { | ||
275 | switch (featureID) { | ||
276 | case LogiclanguagePackage.IF_THEN_ELSE__CONDITION: | ||
277 | setCondition((Term)null); | ||
278 | return; | ||
279 | case LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE: | ||
280 | setIfTrue((Term)null); | ||
281 | return; | ||
282 | case LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE: | ||
283 | setIfFalse((Term)null); | ||
284 | return; | ||
285 | } | ||
286 | super.eUnset(featureID); | ||
287 | } | ||
288 | |||
289 | /** | ||
290 | * <!-- begin-user-doc --> | ||
291 | * <!-- end-user-doc --> | ||
292 | * @generated | ||
293 | */ | ||
294 | @Override | ||
295 | public boolean eIsSet(int featureID) { | ||
296 | switch (featureID) { | ||
297 | case LogiclanguagePackage.IF_THEN_ELSE__CONDITION: | ||
298 | return condition != null; | ||
299 | case LogiclanguagePackage.IF_THEN_ELSE__IF_TRUE: | ||
300 | return ifTrue != null; | ||
301 | case LogiclanguagePackage.IF_THEN_ELSE__IF_FALSE: | ||
302 | return ifFalse != null; | ||
303 | } | ||
304 | return super.eIsSet(featureID); | ||
305 | } | ||
306 | |||
307 | } //IfThenElseImpl | ||