diff options
author | 2017-06-10 19:05:05 +0200 | |
---|---|---|
committer | 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/RelationDefinitionImpl.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/RelationDefinitionImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/RelationDefinitionImpl.java | 280 |
1 files changed, 280 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/RelationDefinitionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/RelationDefinitionImpl.java new file mode 100644 index 00000000..017518eb --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/RelationDefinitionImpl.java | |||
@@ -0,0 +1,280 @@ | |||
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.RelationDeclaration; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition; | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; | ||
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.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>Relation Definition</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.RelationDefinitionImpl#getVariables <em>Variables</em>}</li> | ||
34 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.RelationDefinitionImpl#getValue <em>Value</em>}</li> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.RelationDefinitionImpl#getDefines <em>Defines</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class RelationDefinitionImpl extends RelationImpl implements RelationDefinition { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getVariables() <em>Variables</em>}' containment reference list. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getVariables() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected EList<Variable> variables; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getValue() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected Term value; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getDefines() <em>Defines</em>}' reference. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getDefines() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected RelationDeclaration defines; | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | protected RelationDefinitionImpl() { | ||
77 | super(); | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | @Override | ||
86 | protected EClass eStaticClass() { | ||
87 | return LogiclanguagePackage.Literals.RELATION_DEFINITION; | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | public EList<Variable> getVariables() { | ||
96 | if (variables == null) { | ||
97 | variables = new EObjectContainmentEList<Variable>(Variable.class, this, LogiclanguagePackage.RELATION_DEFINITION__VARIABLES); | ||
98 | } | ||
99 | return variables; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | public Term getValue() { | ||
108 | return value; | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | public NotificationChain basicSetValue(Term newValue, NotificationChain msgs) { | ||
117 | Term oldValue = value; | ||
118 | value = newValue; | ||
119 | if (eNotificationRequired()) { | ||
120 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.RELATION_DEFINITION__VALUE, oldValue, newValue); | ||
121 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
122 | } | ||
123 | return msgs; | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | public void setValue(Term newValue) { | ||
132 | if (newValue != value) { | ||
133 | NotificationChain msgs = null; | ||
134 | if (value != null) | ||
135 | msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.RELATION_DEFINITION__VALUE, null, msgs); | ||
136 | if (newValue != null) | ||
137 | msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.RELATION_DEFINITION__VALUE, null, msgs); | ||
138 | msgs = basicSetValue(newValue, msgs); | ||
139 | if (msgs != null) msgs.dispatch(); | ||
140 | } | ||
141 | else if (eNotificationRequired()) | ||
142 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.RELATION_DEFINITION__VALUE, newValue, newValue)); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | public RelationDeclaration getDefines() { | ||
151 | if (defines != null && defines.eIsProxy()) { | ||
152 | InternalEObject oldDefines = (InternalEObject)defines; | ||
153 | defines = (RelationDeclaration)eResolveProxy(oldDefines); | ||
154 | if (defines != oldDefines) { | ||
155 | if (eNotificationRequired()) | ||
156 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.RELATION_DEFINITION__DEFINES, oldDefines, defines)); | ||
157 | } | ||
158 | } | ||
159 | return defines; | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | public RelationDeclaration basicGetDefines() { | ||
168 | return defines; | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | */ | ||
176 | public void setDefines(RelationDeclaration newDefines) { | ||
177 | RelationDeclaration oldDefines = defines; | ||
178 | defines = newDefines; | ||
179 | if (eNotificationRequired()) | ||
180 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.RELATION_DEFINITION__DEFINES, oldDefines, defines)); | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * <!-- begin-user-doc --> | ||
185 | * <!-- end-user-doc --> | ||
186 | * @generated | ||
187 | */ | ||
188 | @Override | ||
189 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
190 | switch (featureID) { | ||
191 | case LogiclanguagePackage.RELATION_DEFINITION__VARIABLES: | ||
192 | return ((InternalEList<?>)getVariables()).basicRemove(otherEnd, msgs); | ||
193 | case LogiclanguagePackage.RELATION_DEFINITION__VALUE: | ||
194 | return basicSetValue(null, msgs); | ||
195 | } | ||
196 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | */ | ||
204 | @Override | ||
205 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
206 | switch (featureID) { | ||
207 | case LogiclanguagePackage.RELATION_DEFINITION__VARIABLES: | ||
208 | return getVariables(); | ||
209 | case LogiclanguagePackage.RELATION_DEFINITION__VALUE: | ||
210 | return getValue(); | ||
211 | case LogiclanguagePackage.RELATION_DEFINITION__DEFINES: | ||
212 | if (resolve) return getDefines(); | ||
213 | return basicGetDefines(); | ||
214 | } | ||
215 | return super.eGet(featureID, resolve, coreType); | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @SuppressWarnings("unchecked") | ||
224 | @Override | ||
225 | public void eSet(int featureID, Object newValue) { | ||
226 | switch (featureID) { | ||
227 | case LogiclanguagePackage.RELATION_DEFINITION__VARIABLES: | ||
228 | getVariables().clear(); | ||
229 | getVariables().addAll((Collection<? extends Variable>)newValue); | ||
230 | return; | ||
231 | case LogiclanguagePackage.RELATION_DEFINITION__VALUE: | ||
232 | setValue((Term)newValue); | ||
233 | return; | ||
234 | case LogiclanguagePackage.RELATION_DEFINITION__DEFINES: | ||
235 | setDefines((RelationDeclaration)newValue); | ||
236 | return; | ||
237 | } | ||
238 | super.eSet(featureID, newValue); | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * <!-- begin-user-doc --> | ||
243 | * <!-- end-user-doc --> | ||
244 | * @generated | ||
245 | */ | ||
246 | @Override | ||
247 | public void eUnset(int featureID) { | ||
248 | switch (featureID) { | ||
249 | case LogiclanguagePackage.RELATION_DEFINITION__VARIABLES: | ||
250 | getVariables().clear(); | ||
251 | return; | ||
252 | case LogiclanguagePackage.RELATION_DEFINITION__VALUE: | ||
253 | setValue((Term)null); | ||
254 | return; | ||
255 | case LogiclanguagePackage.RELATION_DEFINITION__DEFINES: | ||
256 | setDefines((RelationDeclaration)null); | ||
257 | return; | ||
258 | } | ||
259 | super.eUnset(featureID); | ||
260 | } | ||
261 | |||
262 | /** | ||
263 | * <!-- begin-user-doc --> | ||
264 | * <!-- end-user-doc --> | ||
265 | * @generated | ||
266 | */ | ||
267 | @Override | ||
268 | public boolean eIsSet(int featureID) { | ||
269 | switch (featureID) { | ||
270 | case LogiclanguagePackage.RELATION_DEFINITION__VARIABLES: | ||
271 | return variables != null && !variables.isEmpty(); | ||
272 | case LogiclanguagePackage.RELATION_DEFINITION__VALUE: | ||
273 | return value != null; | ||
274 | case LogiclanguagePackage.RELATION_DEFINITION__DEFINES: | ||
275 | return defines != null; | ||
276 | } | ||
277 | return super.eIsSet(featureID); | ||
278 | } | ||
279 | |||
280 | } //RelationDefinitionImpl | ||