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