From 60f01f46ba232ed6416054f0a6115cb2a9b70b4e Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sat, 10 Jun 2017 19:05:05 +0200 Subject: Migrating Additional projects --- .../impl/PartialInterpretationImpl.java | 619 +++++++++++++++++++++ 1 file changed, 619 insertions(+) create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java') diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java new file mode 100644 index 00000000..09690c79 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java @@ -0,0 +1,619 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; + +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; + +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +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; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Partial Interpretation'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class PartialInterpretationImpl extends MinimalEObjectImpl.Container implements PartialInterpretation { + /** + * The cached value of the '{@link #getProblem() Problem}' reference. + * + * + * @see #getProblem() + * @generated + * @ordered + */ + protected LogicProblem problem; + + /** + * The cached value of the '{@link #getPartialconstantinterpretation() Partialconstantinterpretation}' containment reference list. + * + * + * @see #getPartialconstantinterpretation() + * @generated + * @ordered + */ + protected EList partialconstantinterpretation; + + /** + * The cached value of the '{@link #getPartialrelationinterpretation() Partialrelationinterpretation}' containment reference list. + * + * + * @see #getPartialrelationinterpretation() + * @generated + * @ordered + */ + protected EList partialrelationinterpretation; + + /** + * The cached value of the '{@link #getPartialfunctioninterpretation() Partialfunctioninterpretation}' containment reference list. + * + * + * @see #getPartialfunctioninterpretation() + * @generated + * @ordered + */ + protected EList partialfunctioninterpretation; + + /** + * The cached value of the '{@link #getNewElements() New Elements}' containment reference list. + * + * + * @see #getNewElements() + * @generated + * @ordered + */ + protected EList newElements; + + /** + * The cached value of the '{@link #getPartialtypeinterpratation() Partialtypeinterpratation}' containment reference list. + * + * + * @see #getPartialtypeinterpratation() + * @generated + * @ordered + */ + protected EList partialtypeinterpratation; + + /** + * The default value of the '{@link #getMinNewElements() Min New Elements}' attribute. + * + * + * @see #getMinNewElements() + * @generated + * @ordered + */ + protected static final int MIN_NEW_ELEMENTS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMinNewElements() Min New Elements}' attribute. + * + * + * @see #getMinNewElements() + * @generated + * @ordered + */ + protected int minNewElements = MIN_NEW_ELEMENTS_EDEFAULT; + + /** + * The default value of the '{@link #getMaxNewElements() Max New Elements}' attribute. + * + * + * @see #getMaxNewElements() + * @generated + * @ordered + */ + protected static final int MAX_NEW_ELEMENTS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMaxNewElements() Max New Elements}' attribute. + * + * + * @see #getMaxNewElements() + * @generated + * @ordered + */ + protected int maxNewElements = MAX_NEW_ELEMENTS_EDEFAULT; + + /** + * The cached value of the '{@link #getOpenWorldElementPrototype() Open World Element Prototype}' containment reference. + * + * + * @see #getOpenWorldElementPrototype() + * @generated + * @ordered + */ + protected DefinedElement openWorldElementPrototype; + + /** + * The cached value of the '{@link #getProblemConainer() Problem Conainer}' containment reference. + * + * + * @see #getProblemConainer() + * @generated + * @ordered + */ + protected LogicProblem problemConainer; + + /** + * + * + * @generated + */ + protected PartialInterpretationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PartialinterpretationPackage.Literals.PARTIAL_INTERPRETATION; + } + + /** + * + * + * @generated + */ + public LogicProblem getProblem() { + if (problem != null && problem.eIsProxy()) { + InternalEObject oldProblem = (InternalEObject)problem; + problem = (LogicProblem)eResolveProxy(oldProblem); + if (problem != oldProblem) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM, oldProblem, problem)); + } + } + return problem; + } + + /** + * + * + * @generated + */ + public LogicProblem basicGetProblem() { + return problem; + } + + /** + * + * + * @generated + */ + public void setProblem(LogicProblem newProblem) { + LogicProblem oldProblem = problem; + problem = newProblem; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM, oldProblem, problem)); + } + + /** + * + * + * @generated + */ + public EList getPartialconstantinterpretation() { + if (partialconstantinterpretation == null) { + partialconstantinterpretation = new EObjectContainmentEList(PartialConstantInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION); + } + return partialconstantinterpretation; + } + + /** + * + * + * @generated + */ + public EList getPartialrelationinterpretation() { + if (partialrelationinterpretation == null) { + partialrelationinterpretation = new EObjectContainmentEList(PartialRelationInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION); + } + return partialrelationinterpretation; + } + + /** + * + * + * @generated + */ + public EList getPartialfunctioninterpretation() { + if (partialfunctioninterpretation == null) { + partialfunctioninterpretation = new EObjectContainmentEList(PartialFunctionInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION); + } + return partialfunctioninterpretation; + } + + /** + * + * + * @generated + */ + public EList getNewElements() { + if (newElements == null) { + newElements = new EObjectContainmentEList(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS); + } + return newElements; + } + + /** + * + * + * @generated + */ + public EList getPartialtypeinterpratation() { + if (partialtypeinterpratation == null) { + partialtypeinterpratation = new EObjectContainmentEList(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION); + } + return partialtypeinterpratation; + } + + /** + * + * + * @generated + */ + public int getMinNewElements() { + return minNewElements; + } + + /** + * + * + * @generated + */ + public void setMinNewElements(int newMinNewElements) { + int oldMinNewElements = minNewElements; + minNewElements = newMinNewElements; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS, oldMinNewElements, minNewElements)); + } + + /** + * + * + * @generated + */ + public int getMaxNewElements() { + return maxNewElements; + } + + /** + * + * + * @generated + */ + public void setMaxNewElements(int newMaxNewElements) { + int oldMaxNewElements = maxNewElements; + maxNewElements = newMaxNewElements; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS, oldMaxNewElements, maxNewElements)); + } + + /** + * + * + * @generated + */ + public DefinedElement getOpenWorldElementPrototype() { + return openWorldElementPrototype; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOpenWorldElementPrototype(DefinedElement newOpenWorldElementPrototype, NotificationChain msgs) { + DefinedElement oldOpenWorldElementPrototype = openWorldElementPrototype; + openWorldElementPrototype = newOpenWorldElementPrototype; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, oldOpenWorldElementPrototype, newOpenWorldElementPrototype); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOpenWorldElementPrototype(DefinedElement newOpenWorldElementPrototype) { + if (newOpenWorldElementPrototype != openWorldElementPrototype) { + NotificationChain msgs = null; + if (openWorldElementPrototype != null) + msgs = ((InternalEObject)openWorldElementPrototype).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, null, msgs); + if (newOpenWorldElementPrototype != null) + msgs = ((InternalEObject)newOpenWorldElementPrototype).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, null, msgs); + msgs = basicSetOpenWorldElementPrototype(newOpenWorldElementPrototype, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, newOpenWorldElementPrototype, newOpenWorldElementPrototype)); + } + + /** + * + * + * @generated + */ + public LogicProblem getProblemConainer() { + return problemConainer; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProblemConainer(LogicProblem newProblemConainer, NotificationChain msgs) { + LogicProblem oldProblemConainer = problemConainer; + problemConainer = newProblemConainer; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, oldProblemConainer, newProblemConainer); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProblemConainer(LogicProblem newProblemConainer) { + if (newProblemConainer != problemConainer) { + NotificationChain msgs = null; + if (problemConainer != null) + msgs = ((InternalEObject)problemConainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, null, msgs); + if (newProblemConainer != null) + msgs = ((InternalEObject)newProblemConainer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, null, msgs); + msgs = basicSetProblemConainer(newProblemConainer, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, newProblemConainer, newProblemConainer)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: + return ((InternalEList)getPartialconstantinterpretation()).basicRemove(otherEnd, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: + return ((InternalEList)getPartialrelationinterpretation()).basicRemove(otherEnd, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: + return ((InternalEList)getPartialfunctioninterpretation()).basicRemove(otherEnd, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: + return ((InternalEList)getNewElements()).basicRemove(otherEnd, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: + return ((InternalEList)getPartialtypeinterpratation()).basicRemove(otherEnd, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: + return basicSetOpenWorldElementPrototype(null, msgs); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: + return basicSetProblemConainer(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: + if (resolve) return getProblem(); + return basicGetProblem(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: + return getPartialconstantinterpretation(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: + return getPartialrelationinterpretation(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: + return getPartialfunctioninterpretation(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: + return getNewElements(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: + return getPartialtypeinterpratation(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: + return getMinNewElements(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: + return getMaxNewElements(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: + return getOpenWorldElementPrototype(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: + return getProblemConainer(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: + setProblem((LogicProblem)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: + getPartialconstantinterpretation().clear(); + getPartialconstantinterpretation().addAll((Collection)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: + getPartialrelationinterpretation().clear(); + getPartialrelationinterpretation().addAll((Collection)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: + getPartialfunctioninterpretation().clear(); + getPartialfunctioninterpretation().addAll((Collection)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: + getNewElements().clear(); + getNewElements().addAll((Collection)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: + getPartialtypeinterpratation().clear(); + getPartialtypeinterpratation().addAll((Collection)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: + setMinNewElements((Integer)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: + setMaxNewElements((Integer)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: + setOpenWorldElementPrototype((DefinedElement)newValue); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: + setProblemConainer((LogicProblem)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: + setProblem((LogicProblem)null); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: + getPartialconstantinterpretation().clear(); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: + getPartialrelationinterpretation().clear(); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: + getPartialfunctioninterpretation().clear(); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: + getNewElements().clear(); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: + getPartialtypeinterpratation().clear(); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: + setMinNewElements(MIN_NEW_ELEMENTS_EDEFAULT); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: + setMaxNewElements(MAX_NEW_ELEMENTS_EDEFAULT); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: + setOpenWorldElementPrototype((DefinedElement)null); + return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: + setProblemConainer((LogicProblem)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: + return problem != null; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: + return partialconstantinterpretation != null && !partialconstantinterpretation.isEmpty(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: + return partialrelationinterpretation != null && !partialrelationinterpretation.isEmpty(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: + return partialfunctioninterpretation != null && !partialfunctioninterpretation.isEmpty(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: + return newElements != null && !newElements.isEmpty(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: + return partialtypeinterpratation != null && !partialtypeinterpratation.isEmpty(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: + return minNewElements != MIN_NEW_ELEMENTS_EDEFAULT; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: + return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: + return openWorldElementPrototype != null; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: + return problemConainer != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (minNewElements: "); + result.append(minNewElements); + result.append(", maxNewElements: "); + result.append(maxNewElements); + result.append(')'); + return result.toString(); + } + +} //PartialInterpretationImpl -- cgit v1.2.3-70-g09d2