From 67bd5449706f722a0c98c510b3c47e2af41ba487 Mon Sep 17 00:00:00 2001 From: Oszkar Semerath Date: Fri, 17 Apr 2020 00:17:19 +0200 Subject: variable mapping trace is created after mapping --- .../impl/VariableMappingImpl.java | 230 +++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/ecore-gen/hu/bme/mit/inf/dslreasoner/viatra2logic/viatra2logicannotations/impl/VariableMappingImpl.java') 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 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.impl; + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; + +import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.VariableMapping; +import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.Viatra2LogicAnnotationsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Variable Mapping'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class VariableMappingImpl extends MinimalEObjectImpl.Container implements VariableMapping { + /** + * The default value of the '{@link #getSourcePVariable() Source PVariable}' attribute. + * + * + * @see #getSourcePVariable() + * @generated + * @ordered + */ + protected static final Object SOURCE_PVARIABLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSourcePVariable() Source PVariable}' attribute. + * + * + * @see #getSourcePVariable() + * @generated + * @ordered + */ + protected Object sourcePVariable = SOURCE_PVARIABLE_EDEFAULT; + + /** + * The cached value of the '{@link #getTargetLogicVariable() Target Logic Variable}' reference. + * + * + * @see #getTargetLogicVariable() + * @generated + * @ordered + */ + protected Variable targetLogicVariable; + + /** + * + * + * @generated + */ + protected VariableMappingImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Viatra2LogicAnnotationsPackage.Literals.VARIABLE_MAPPING; + } + + /** + * + * + * @generated + */ + @Override + public Object getSourcePVariable() { + return sourcePVariable; + } + + /** + * + * + * @generated + */ + @Override + public void setSourcePVariable(Object newSourcePVariable) { + Object oldSourcePVariable = sourcePVariable; + sourcePVariable = newSourcePVariable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE, oldSourcePVariable, sourcePVariable)); + } + + /** + * + * + * @generated + */ + @Override + public Variable getTargetLogicVariable() { + if (targetLogicVariable != null && targetLogicVariable.eIsProxy()) { + InternalEObject oldTargetLogicVariable = (InternalEObject)targetLogicVariable; + targetLogicVariable = (Variable)eResolveProxy(oldTargetLogicVariable); + if (targetLogicVariable != oldTargetLogicVariable) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE, oldTargetLogicVariable, targetLogicVariable)); + } + } + return targetLogicVariable; + } + + /** + * + * + * @generated + */ + public Variable basicGetTargetLogicVariable() { + return targetLogicVariable; + } + + /** + * + * + * @generated + */ + @Override + public void setTargetLogicVariable(Variable newTargetLogicVariable) { + Variable oldTargetLogicVariable = targetLogicVariable; + targetLogicVariable = newTargetLogicVariable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE, oldTargetLogicVariable, targetLogicVariable)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: + return getSourcePVariable(); + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: + if (resolve) return getTargetLogicVariable(); + return basicGetTargetLogicVariable(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: + setSourcePVariable(newValue); + return; + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: + setTargetLogicVariable((Variable)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: + setSourcePVariable(SOURCE_PVARIABLE_EDEFAULT); + return; + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: + setTargetLogicVariable((Variable)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__SOURCE_PVARIABLE: + return SOURCE_PVARIABLE_EDEFAULT == null ? sourcePVariable != null : !SOURCE_PVARIABLE_EDEFAULT.equals(sourcePVariable); + case Viatra2LogicAnnotationsPackage.VARIABLE_MAPPING__TARGET_LOGIC_VARIABLE: + return targetLogicVariable != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (sourcePVariable: "); + result.append(sourcePVariable); + result.append(')'); + return result.toString(); + } + +} //VariableMappingImpl -- cgit v1.2.3-54-g00ecf