From 07719e927f9d398765e661c84fd8778cefb39083 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sun, 27 Jun 2021 14:22:40 +0200 Subject: Simplify project layout --- .../model/problem/impl/NegativeLiteralImpl.java | 229 +++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java') diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java new file mode 100644 index 00000000..857a779d --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NegativeLiteralImpl.java @@ -0,0 +1,229 @@ +/** + */ +package org.eclipse.viatra.solver.language.model.problem.impl; + +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; + +import org.eclipse.viatra.solver.language.model.problem.Atom; +import org.eclipse.viatra.solver.language.model.problem.ImplicitVariable; +import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; +import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; + +/** + * + * An implementation of the model object 'Negative Literal'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class NegativeLiteralImpl extends MinimalEObjectImpl.Container implements NegativeLiteral { + /** + * The cached value of the '{@link #getImplicitVariables() Implicit Variables}' containment reference list. + * + * + * @see #getImplicitVariables() + * @generated + * @ordered + */ + protected EList implicitVariables; + + /** + * The cached value of the '{@link #getAtom() Atom}' containment reference. + * + * + * @see #getAtom() + * @generated + * @ordered + */ + protected Atom atom; + + /** + * + * + * @generated + */ + protected NegativeLiteralImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.NEGATIVE_LITERAL; + } + + /** + * + * + * @generated + */ + public EList getImplicitVariables() { + if (implicitVariables == null) { + implicitVariables = new EObjectContainmentEList(ImplicitVariable.class, this, + ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES); + } + return implicitVariables; + } + + /** + * + * + * @generated + */ + public Atom getAtom() { + return atom; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAtom(Atom newAtom, NotificationChain msgs) { + Atom oldAtom = atom; + atom = newAtom; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + ProblemPackage.NEGATIVE_LITERAL__ATOM, oldAtom, newAtom); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setAtom(Atom newAtom) { + if (newAtom != atom) { + NotificationChain msgs = null; + if (atom != null) + msgs = ((InternalEObject) atom).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.NEGATIVE_LITERAL__ATOM, null, msgs); + if (newAtom != null) + msgs = ((InternalEObject) newAtom).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - ProblemPackage.NEGATIVE_LITERAL__ATOM, null, msgs); + msgs = basicSetAtom(newAtom, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NEGATIVE_LITERAL__ATOM, newAtom, + newAtom)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return ((InternalEList) getImplicitVariables()).basicRemove(otherEnd, msgs); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return basicSetAtom(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return getImplicitVariables(); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return getAtom(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + getImplicitVariables().addAll((Collection) newValue); + return; + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + setAtom((Atom) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + getImplicitVariables().clear(); + return; + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + setAtom((Atom) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.NEGATIVE_LITERAL__IMPLICIT_VARIABLES: + return implicitVariables != null && !implicitVariables.isEmpty(); + case ProblemPackage.NEGATIVE_LITERAL__ATOM: + return atom != null; + } + return super.eIsSet(featureID); + } + +} //NegativeLiteralImpl -- cgit v1.2.3-70-g09d2