diff options
author | OszkarSemerath <oszka@152.66.252.189> | 2017-08-16 18:53:37 +0200 |
---|---|---|
committer | OszkarSemerath <oszka@152.66.252.189> | 2017-08-16 18:53:37 +0200 |
commit | 05cc697cce50c87541cb619854be7ecbcfb586e9 (patch) | |
tree | 8fd0054e1ced9992283fddc2e8be28f2a09c9ebb /Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java | |
parent | Bugfixing typo in generated queries (diff) | |
download | VIATRA-Generator-05cc697cce50c87541cb619854be7ecbcfb586e9.tar.gz VIATRA-Generator-05cc697cce50c87541cb619854be7ecbcfb586e9.tar.zst VIATRA-Generator-05cc697cce50c87541cb619854be7ecbcfb586e9.zip |
Adding transitive closure to the logic language
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java | 303 |
1 files changed, 303 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/TransitiveClosureImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java new file mode 100644 index 00000000..9633334b --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java | |||
@@ -0,0 +1,303 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure; | ||
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 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Transitive Closure</b></em>'. | ||
22 | * <!-- end-user-doc --> | ||
23 | * <p> | ||
24 | * The following features are implemented: | ||
25 | * </p> | ||
26 | * <ul> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl#getLeftOperand <em>Left Operand</em>}</li> | ||
28 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl#getRightOperand <em>Right Operand</em>}</li> | ||
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl#getRelation <em>Relation</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class TransitiveClosureImpl extends MinimalEObjectImpl.Container implements TransitiveClosure { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getLeftOperand() <em>Left Operand</em>}' containment reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getLeftOperand() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected Term leftOperand; | ||
44 | |||
45 | /** | ||
46 | * The cached value of the '{@link #getRightOperand() <em>Right Operand</em>}' containment reference. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getRightOperand() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected Term rightOperand; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getRelation() <em>Relation</em>}' reference. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getRelation() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected Relation relation; | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | protected TransitiveClosureImpl() { | ||
71 | super(); | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @generated | ||
78 | */ | ||
79 | @Override | ||
80 | protected EClass eStaticClass() { | ||
81 | return LogiclanguagePackage.Literals.TRANSITIVE_CLOSURE; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | public Term getLeftOperand() { | ||
90 | return leftOperand; | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | public NotificationChain basicSetLeftOperand(Term newLeftOperand, NotificationChain msgs) { | ||
99 | Term oldLeftOperand = leftOperand; | ||
100 | leftOperand = newLeftOperand; | ||
101 | if (eNotificationRequired()) { | ||
102 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, oldLeftOperand, newLeftOperand); | ||
103 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
104 | } | ||
105 | return msgs; | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | public void setLeftOperand(Term newLeftOperand) { | ||
114 | if (newLeftOperand != leftOperand) { | ||
115 | NotificationChain msgs = null; | ||
116 | if (leftOperand != null) | ||
117 | msgs = ((InternalEObject)leftOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, null, msgs); | ||
118 | if (newLeftOperand != null) | ||
119 | msgs = ((InternalEObject)newLeftOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, null, msgs); | ||
120 | msgs = basicSetLeftOperand(newLeftOperand, msgs); | ||
121 | if (msgs != null) msgs.dispatch(); | ||
122 | } | ||
123 | else if (eNotificationRequired()) | ||
124 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, newLeftOperand, newLeftOperand)); | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | public Term getRightOperand() { | ||
133 | return rightOperand; | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | public NotificationChain basicSetRightOperand(Term newRightOperand, NotificationChain msgs) { | ||
142 | Term oldRightOperand = rightOperand; | ||
143 | rightOperand = newRightOperand; | ||
144 | if (eNotificationRequired()) { | ||
145 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, oldRightOperand, newRightOperand); | ||
146 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
147 | } | ||
148 | return msgs; | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | public void setRightOperand(Term newRightOperand) { | ||
157 | if (newRightOperand != rightOperand) { | ||
158 | NotificationChain msgs = null; | ||
159 | if (rightOperand != null) | ||
160 | msgs = ((InternalEObject)rightOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, null, msgs); | ||
161 | if (newRightOperand != null) | ||
162 | msgs = ((InternalEObject)newRightOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, null, msgs); | ||
163 | msgs = basicSetRightOperand(newRightOperand, msgs); | ||
164 | if (msgs != null) msgs.dispatch(); | ||
165 | } | ||
166 | else if (eNotificationRequired()) | ||
167 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, newRightOperand, newRightOperand)); | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | public Relation getRelation() { | ||
176 | if (relation != null && relation.eIsProxy()) { | ||
177 | InternalEObject oldRelation = (InternalEObject)relation; | ||
178 | relation = (Relation)eResolveProxy(oldRelation); | ||
179 | if (relation != oldRelation) { | ||
180 | if (eNotificationRequired()) | ||
181 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION, oldRelation, relation)); | ||
182 | } | ||
183 | } | ||
184 | return relation; | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | public Relation basicGetRelation() { | ||
193 | return relation; | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @generated | ||
200 | */ | ||
201 | public void setRelation(Relation newRelation) { | ||
202 | Relation oldRelation = relation; | ||
203 | relation = newRelation; | ||
204 | if (eNotificationRequired()) | ||
205 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION, oldRelation, relation)); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @Override | ||
214 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
215 | switch (featureID) { | ||
216 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: | ||
217 | return basicSetLeftOperand(null, msgs); | ||
218 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: | ||
219 | return basicSetRightOperand(null, msgs); | ||
220 | } | ||
221 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
222 | } | ||
223 | |||
224 | /** | ||
225 | * <!-- begin-user-doc --> | ||
226 | * <!-- end-user-doc --> | ||
227 | * @generated | ||
228 | */ | ||
229 | @Override | ||
230 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
231 | switch (featureID) { | ||
232 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: | ||
233 | return getLeftOperand(); | ||
234 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: | ||
235 | return getRightOperand(); | ||
236 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: | ||
237 | if (resolve) return getRelation(); | ||
238 | return basicGetRelation(); | ||
239 | } | ||
240 | return super.eGet(featureID, resolve, coreType); | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | @Override | ||
249 | public void eSet(int featureID, Object newValue) { | ||
250 | switch (featureID) { | ||
251 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: | ||
252 | setLeftOperand((Term)newValue); | ||
253 | return; | ||
254 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: | ||
255 | setRightOperand((Term)newValue); | ||
256 | return; | ||
257 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: | ||
258 | setRelation((Relation)newValue); | ||
259 | return; | ||
260 | } | ||
261 | super.eSet(featureID, newValue); | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * <!-- begin-user-doc --> | ||
266 | * <!-- end-user-doc --> | ||
267 | * @generated | ||
268 | */ | ||
269 | @Override | ||
270 | public void eUnset(int featureID) { | ||
271 | switch (featureID) { | ||
272 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: | ||
273 | setLeftOperand((Term)null); | ||
274 | return; | ||
275 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: | ||
276 | setRightOperand((Term)null); | ||
277 | return; | ||
278 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: | ||
279 | setRelation((Relation)null); | ||
280 | return; | ||
281 | } | ||
282 | super.eUnset(featureID); | ||
283 | } | ||
284 | |||
285 | /** | ||
286 | * <!-- begin-user-doc --> | ||
287 | * <!-- end-user-doc --> | ||
288 | * @generated | ||
289 | */ | ||
290 | @Override | ||
291 | public boolean eIsSet(int featureID) { | ||
292 | switch (featureID) { | ||
293 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: | ||
294 | return leftOperand != null; | ||
295 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: | ||
296 | return rightOperand != null; | ||
297 | case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: | ||
298 | return relation != null; | ||
299 | } | ||
300 | return super.eIsSet(featureID); | ||
301 | } | ||
302 | |||
303 | } //TransitiveClosureImpl | ||