diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java new file mode 100644 index 00000000..020c71c7 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java | |||
@@ -0,0 +1,230 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.VariableMapping; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.Viatra2LogicAnnotationsPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
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 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Variable Mapping</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.impl.VariableMappingImpl#getSourcePVariable <em>Source PVariable</em>}</li> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.impl.VariableMappingImpl#getTargetLogicVariable <em>Target Logic Variable</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class VariableMappingImpl extends MinimalEObjectImpl.Container implements VariableMapping { | ||
33 | /** | ||
34 | * The default value of the '{@link #getSourcePVariable() <em>Source PVariable</em>}' attribute. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getSourcePVariable() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected static final Object SOURCE_PVARIABLE_EDEFAULT = null; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getSourcePVariable() <em>Source PVariable</em>}' attribute. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getSourcePVariable() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected Object sourcePVariable = SOURCE_PVARIABLE_EDEFAULT; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getTargetLogicVariable() <em>Target Logic Variable</em>}' reference. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getTargetLogicVariable() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected Variable targetLogicVariable; | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | protected VariableMappingImpl() { | ||
69 | super(); | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | @Override | ||
78 | protected EClass eStaticClass() { | ||
79 | return Viatra2LogicAnnotationsPackage.Literals.VARIABLE_MAPPING; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | @Override | ||
88 | public Object getSourcePVariable() { | ||
89 | return sourcePVariable; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | public void setSourcePVariable(Object newSourcePVariable) { | ||
99 | Object oldSourcePVariable = sourcePVariable; | ||
100 | sourcePVariable = newSourcePVariable; | ||
101 | if (eNotificationRequired()) | ||
102 | eNotify(new ENotificationImpl(this, Notification.SET, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE, oldSourcePVariable, sourcePVariable)); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public Variable getTargetLogicVariable() { | ||
112 | if (targetLogicVariable != null && targetLogicVariable.eIsProxy()) { | ||
113 | InternalEObject oldTargetLogicVariable = (InternalEObject)targetLogicVariable; | ||
114 | targetLogicVariable = (Variable)eResolveProxy(oldTargetLogicVariable); | ||
115 | if (targetLogicVariable != oldTargetLogicVariable) { | ||
116 | if (eNotificationRequired()) | ||
117 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE, oldTargetLogicVariable, targetLogicVariable)); | ||
118 | } | ||
119 | } | ||
120 | return targetLogicVariable; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | public Variable basicGetTargetLogicVariable() { | ||
129 | return targetLogicVariable; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public void setTargetLogicVariable(Variable newTargetLogicVariable) { | ||
139 | Variable oldTargetLogicVariable = targetLogicVariable; | ||
140 | targetLogicVariable = newTargetLogicVariable; | ||
141 | if (eNotificationRequired()) | ||
142 | eNotify(new ENotificationImpl(this, Notification.SET, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE, oldTargetLogicVariable, targetLogicVariable)); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
152 | switch (featureID) { | ||
153 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: | ||
154 | return getSourcePVariable(); | ||
155 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: | ||
156 | if (resolve) return getTargetLogicVariable(); | ||
157 | return basicGetTargetLogicVariable(); | ||
158 | } | ||
159 | return super.eGet(featureID, resolve, coreType); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public void eSet(int featureID, Object newValue) { | ||
169 | switch (featureID) { | ||
170 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: | ||
171 | setSourcePVariable(newValue); | ||
172 | return; | ||
173 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: | ||
174 | setTargetLogicVariable((Variable)newValue); | ||
175 | return; | ||
176 | } | ||
177 | super.eSet(featureID, newValue); | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | @Override | ||
186 | public void eUnset(int featureID) { | ||
187 | switch (featureID) { | ||
188 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: | ||
189 | setSourcePVariable(SOURCE_PVARIABLE_EDEFAULT); | ||
190 | return; | ||
191 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: | ||
192 | setTargetLogicVariable((Variable)null); | ||
193 | return; | ||
194 | } | ||
195 | super.eUnset(featureID); | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | @Override | ||
204 | public boolean eIsSet(int featureID) { | ||
205 | switch (featureID) { | ||
206 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: | ||
207 | return SOURCE_PVARIABLE_EDEFAULT == null ? sourcePVariable != null : !SOURCE_PVARIABLE_EDEFAULT.equals(sourcePVariable); | ||
208 | case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: | ||
209 | return targetLogicVariable != null; | ||
210 | } | ||
211 | return super.eIsSet(featureID); | ||
212 | } | ||
213 | |||
214 | /** | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @generated | ||
218 | */ | ||
219 | @Override | ||
220 | public String toString() { | ||
221 | if (eIsProxy()) return super.toString(); | ||
222 | |||
223 | StringBuilder result = new StringBuilder(super.toString()); | ||
224 | result.append(" (sourcePVariable: "); | ||
225 | result.append(sourcePVariable); | ||
226 | result.append(')'); | ||
227 | return result.toString(); | ||
228 | } | ||
229 | |||
230 | } //VariableMappingImpl | ||