diff options
author | OszkarSemerath <oszka@152.66.252.189> | 2017-06-10 19:05:05 +0200 |
---|---|---|
committer | OszkarSemerath <oszka@152.66.252.189> | 2017-06-10 19:05:05 +0200 |
commit | 60f01f46ba232ed6416054f0a6115cb2a9b70b4e (patch) | |
tree | 5edf8aeb07abc51f3fec63bbd15c926e1de09552 /Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AssertionImpl.java | |
parent | Initial commit, migrating from SVN (diff) | |
download | VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.tar.gz VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.tar.zst VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.zip |
Migrating Additional projects
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AssertionImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AssertionImpl.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/AssertionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AssertionImpl.java new file mode 100644 index 00000000..254f5240 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AssertionImpl.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.Assertion; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.AssertionAnnotation; | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; | ||
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 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
23 | import org.eclipse.emf.ecore.util.InternalEList; | ||
24 | |||
25 | /** | ||
26 | * <!-- begin-user-doc --> | ||
27 | * An implementation of the model object '<em><b>Assertion</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.AssertionImpl#getValue <em>Value</em>}</li> | ||
34 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AssertionImpl#getName <em>Name</em>}</li> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AssertionImpl#getAnnotations <em>Annotations</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class AssertionImpl extends MinimalEObjectImpl.Container implements Assertion { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getValue() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected Term value; | ||
50 | |||
51 | /** | ||
52 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getName() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected static final String NAME_EDEFAULT = null; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getName() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected String name = NAME_EDEFAULT; | ||
70 | |||
71 | /** | ||
72 | * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list. | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @see #getAnnotations() | ||
76 | * @generated | ||
77 | * @ordered | ||
78 | */ | ||
79 | protected EList<AssertionAnnotation> annotations; | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | protected AssertionImpl() { | ||
87 | super(); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | protected EClass eStaticClass() { | ||
97 | return LogiclanguagePackage.Literals.ASSERTION; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public Term getValue() { | ||
106 | return value; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | public NotificationChain basicSetValue(Term newValue, NotificationChain msgs) { | ||
115 | Term oldValue = value; | ||
116 | value = newValue; | ||
117 | if (eNotificationRequired()) { | ||
118 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.ASSERTION__VALUE, oldValue, newValue); | ||
119 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
120 | } | ||
121 | return msgs; | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | public void setValue(Term newValue) { | ||
130 | if (newValue != value) { | ||
131 | NotificationChain msgs = null; | ||
132 | if (value != null) | ||
133 | msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.ASSERTION__VALUE, null, msgs); | ||
134 | if (newValue != null) | ||
135 | msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.ASSERTION__VALUE, null, msgs); | ||
136 | msgs = basicSetValue(newValue, msgs); | ||
137 | if (msgs != null) msgs.dispatch(); | ||
138 | } | ||
139 | else if (eNotificationRequired()) | ||
140 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.ASSERTION__VALUE, newValue, newValue)); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | public String getName() { | ||
149 | return name; | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | public void setName(String newName) { | ||
158 | String oldName = name; | ||
159 | name = newName; | ||
160 | if (eNotificationRequired()) | ||
161 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.ASSERTION__NAME, oldName, name)); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | public EList<AssertionAnnotation> getAnnotations() { | ||
170 | if (annotations == null) { | ||
171 | annotations = new EObjectWithInverseResolvingEList<AssertionAnnotation>(AssertionAnnotation.class, this, LogiclanguagePackage.ASSERTION__ANNOTATIONS, LogicproblemPackage.ASSERTION_ANNOTATION__TARGET); | ||
172 | } | ||
173 | return annotations; | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @SuppressWarnings("unchecked") | ||
182 | @Override | ||
183 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
184 | switch (featureID) { | ||
185 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
186 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getAnnotations()).basicAdd(otherEnd, msgs); | ||
187 | } | ||
188 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * <!-- begin-user-doc --> | ||
193 | * <!-- end-user-doc --> | ||
194 | * @generated | ||
195 | */ | ||
196 | @Override | ||
197 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
198 | switch (featureID) { | ||
199 | case LogiclanguagePackage.ASSERTION__VALUE: | ||
200 | return basicSetValue(null, msgs); | ||
201 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
202 | return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs); | ||
203 | } | ||
204 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
214 | switch (featureID) { | ||
215 | case LogiclanguagePackage.ASSERTION__VALUE: | ||
216 | return getValue(); | ||
217 | case LogiclanguagePackage.ASSERTION__NAME: | ||
218 | return getName(); | ||
219 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
220 | return getAnnotations(); | ||
221 | } | ||
222 | return super.eGet(featureID, resolve, coreType); | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | */ | ||
230 | @SuppressWarnings("unchecked") | ||
231 | @Override | ||
232 | public void eSet(int featureID, Object newValue) { | ||
233 | switch (featureID) { | ||
234 | case LogiclanguagePackage.ASSERTION__VALUE: | ||
235 | setValue((Term)newValue); | ||
236 | return; | ||
237 | case LogiclanguagePackage.ASSERTION__NAME: | ||
238 | setName((String)newValue); | ||
239 | return; | ||
240 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
241 | getAnnotations().clear(); | ||
242 | getAnnotations().addAll((Collection<? extends AssertionAnnotation>)newValue); | ||
243 | return; | ||
244 | } | ||
245 | super.eSet(featureID, newValue); | ||
246 | } | ||
247 | |||
248 | /** | ||
249 | * <!-- begin-user-doc --> | ||
250 | * <!-- end-user-doc --> | ||
251 | * @generated | ||
252 | */ | ||
253 | @Override | ||
254 | public void eUnset(int featureID) { | ||
255 | switch (featureID) { | ||
256 | case LogiclanguagePackage.ASSERTION__VALUE: | ||
257 | setValue((Term)null); | ||
258 | return; | ||
259 | case LogiclanguagePackage.ASSERTION__NAME: | ||
260 | setName(NAME_EDEFAULT); | ||
261 | return; | ||
262 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
263 | getAnnotations().clear(); | ||
264 | return; | ||
265 | } | ||
266 | super.eUnset(featureID); | ||
267 | } | ||
268 | |||
269 | /** | ||
270 | * <!-- begin-user-doc --> | ||
271 | * <!-- end-user-doc --> | ||
272 | * @generated | ||
273 | */ | ||
274 | @Override | ||
275 | public boolean eIsSet(int featureID) { | ||
276 | switch (featureID) { | ||
277 | case LogiclanguagePackage.ASSERTION__VALUE: | ||
278 | return value != null; | ||
279 | case LogiclanguagePackage.ASSERTION__NAME: | ||
280 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
281 | case LogiclanguagePackage.ASSERTION__ANNOTATIONS: | ||
282 | return annotations != null && !annotations.isEmpty(); | ||
283 | } | ||
284 | return super.eIsSet(featureID); | ||
285 | } | ||
286 | |||
287 | /** | ||
288 | * <!-- begin-user-doc --> | ||
289 | * <!-- end-user-doc --> | ||
290 | * @generated | ||
291 | */ | ||
292 | @Override | ||
293 | public String toString() { | ||
294 | if (eIsProxy()) return super.toString(); | ||
295 | |||
296 | StringBuffer result = new StringBuffer(super.toString()); | ||
297 | result.append(" (name: "); | ||
298 | result.append(name); | ||
299 | result.append(')'); | ||
300 | return result.toString(); | ||
301 | } | ||
302 | |||
303 | } //AssertionImpl | ||