From 9152a660dbfbf3294964233c76d6cf22111298ff Mon Sep 17 00:00:00 2001
From: Oszkar Semerath
Date: Tue, 9 Jul 2019 20:49:10 +0200
Subject: aggregated partial substitution + builder
---
.../model/logiclanguage/AggregateExpression.java | 15 ++
.../AggregatedParameterSubstitution.java | 46 ++++++
.../model/logiclanguage/LogiclanguageFactory.java | 9 ++
.../model/logiclanguage/LogiclanguagePackage.java | 152 +++++++++++++++++++-
.../impl/AggregateExpressionImpl.java | 56 ++++++++
.../impl/AggregatedParameterSubstitutionImpl.java | 159 +++++++++++++++++++++
.../impl/LogiclanguageFactoryImpl.java | 12 ++
.../impl/LogiclanguagePackageImpl.java | 46 ++++++
.../util/LogiclanguageAdapterFactory.java | 18 +++
.../logiclanguage/util/LogiclanguageSwitch.java | 21 +++
10 files changed, 533 insertions(+), 1 deletion(-)
create mode 100644 Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java
create mode 100644 Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java
(limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen')
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java
index be146469..4b38becf 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java
@@ -2,6 +2,8 @@
*/
package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage;
+import org.eclipse.emf.common.util.EList;
+
/**
*
@@ -13,6 +15,7 @@ package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage;
*
*
* - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getRelation Relation}
+ * - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution Parameter Substitution}
*
*
* @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregateExpression()
@@ -46,4 +49,16 @@ public interface AggregateExpression extends Term {
*/
void setRelation(Relation value);
+ /**
+ * Returns the value of the 'Parameter Substitution' containment reference list.
+ * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution}.
+ *
+ *
+ * @return the value of the 'Parameter Substitution' containment reference list.
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregateExpression_ParameterSubstitution()
+ * @model containment="true"
+ * @generated
+ */
+ EList getParameterSubstitution();
+
} // AggregateExpression
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java
new file mode 100644
index 00000000..94b6365d
--- /dev/null
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java
@@ -0,0 +1,46 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'Aggregated Parameter Substitution'.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable Variable}
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregatedParameterSubstitution()
+ * @model
+ * @generated
+ */
+public interface AggregatedParameterSubstitution extends EObject {
+ /**
+ * Returns the value of the 'Variable' reference.
+ *
+ *
+ * @return the value of the 'Variable' reference.
+ * @see #setVariable(Variable)
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregatedParameterSubstitution_Variable()
+ * @model
+ * @generated
+ */
+ Variable getVariable();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable Variable}' reference.
+ *
+ *
+ * @param value the new value of the 'Variable' reference.
+ * @see #getVariable()
+ * @generated
+ */
+ void setVariable(Variable value);
+
+} // AggregatedParameterSubstitution
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java
index a6b0a790..33d79329 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java
@@ -453,6 +453,15 @@ public interface LogiclanguageFactory extends EFactory {
*/
Max createMax();
+ /**
+ * Returns a new object of class 'Aggregated Parameter Substitution'.
+ *
+ *
+ * @return a new object of class 'Aggregated Parameter Substitution'.
+ * @generated
+ */
+ AggregatedParameterSubstitution createAggregatedParameterSubstitution();
+
/**
* Returns the package supported by this factory.
*
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java
index ddfb75a2..f5347e31 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java
@@ -2750,6 +2750,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int AGGREGATE_EXPRESSION__RELATION = TERM_FEATURE_COUNT + 0;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = TERM_FEATURE_COUNT + 1;
+
/**
* The number of structural features of the 'Aggregate Expression' class.
*
@@ -2757,7 +2766,7 @@ public interface LogiclanguagePackage extends EPackage {
* @generated
* @ordered
*/
- int AGGREGATE_EXPRESSION_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+ int AGGREGATE_EXPRESSION_FEATURE_COUNT = TERM_FEATURE_COUNT + 2;
/**
* The number of operations of the 'Aggregate Expression' class.
@@ -2787,6 +2796,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int PROJECTED_AGGREGATE_EXPRESSION__RELATION = AGGREGATE_EXPRESSION__RELATION;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION;
+
/**
* The feature id for the 'Projection Index' attribute.
*
@@ -2833,6 +2851,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int SUM__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int SUM__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION;
+
/**
* The feature id for the 'Projection Index' attribute.
*
@@ -2879,6 +2906,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int COUNT__RELATION = AGGREGATE_EXPRESSION__RELATION;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COUNT__PARAMETER_SUBSTITUTION = AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION;
+
/**
* The number of structural features of the 'Count' class.
*
@@ -2916,6 +2952,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int MIN__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int MIN__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION;
+
/**
* The feature id for the 'Projection Index' attribute.
*
@@ -2962,6 +3007,15 @@ public interface LogiclanguagePackage extends EPackage {
*/
int MAX__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION;
+ /**
+ * The feature id for the 'Parameter Substitution' containment reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int MAX__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION;
+
/**
* The feature id for the 'Projection Index' attribute.
*
@@ -2990,6 +3044,44 @@ public interface LogiclanguagePackage extends EPackage {
int MAX_OPERATION_COUNT = PROJECTED_AGGREGATE_EXPRESSION_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl Aggregated Parameter Substitution}' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getAggregatedParameterSubstitution()
+ * @generated
+ */
+ int AGGREGATED_PARAMETER_SUBSTITUTION = 65;
+
+ /**
+ * The feature id for the 'Variable' reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE = 0;
+
+ /**
+ * The number of structural features of the 'Aggregated Parameter Substitution' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int AGGREGATED_PARAMETER_SUBSTITUTION_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the 'Aggregated Parameter Substitution' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int AGGREGATED_PARAMETER_SUBSTITUTION_OPERATION_COUNT = 0;
+
+
/**
* Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type Type}'.
*
@@ -4305,6 +4397,17 @@ public interface LogiclanguagePackage extends EPackage {
*/
EReference getAggregateExpression_Relation();
+ /**
+ * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution Parameter Substitution}'.
+ *
+ *
+ * @return the meta object for the containment reference list 'Parameter Substitution'.
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution()
+ * @see #getAggregateExpression()
+ * @generated
+ */
+ EReference getAggregateExpression_ParameterSubstitution();
+
/**
* Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Sum Sum}'.
*
@@ -4366,6 +4469,27 @@ public interface LogiclanguagePackage extends EPackage {
*/
EAttribute getProjectedAggregateExpression_ProjectionIndex();
+ /**
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution Aggregated Parameter Substitution}'.
+ *
+ *
+ * @return the meta object for class 'Aggregated Parameter Substitution'.
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution
+ * @generated
+ */
+ EClass getAggregatedParameterSubstitution();
+
+ /**
+ * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable Variable}'.
+ *
+ *
+ * @return the meta object for the reference 'Variable'.
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable()
+ * @see #getAggregatedParameterSubstitution()
+ * @generated
+ */
+ EReference getAggregatedParameterSubstitution_Variable();
+
/**
* Returns the factory that creates the instances of the model.
*
@@ -5509,6 +5633,14 @@ public interface LogiclanguagePackage extends EPackage {
*/
EReference AGGREGATE_EXPRESSION__RELATION = eINSTANCE.getAggregateExpression_Relation();
+ /**
+ * The meta object literal for the 'Parameter Substitution' containment reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = eINSTANCE.getAggregateExpression_ParameterSubstitution();
+
/**
* The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.SumImpl Sum}' class.
*
@@ -5567,6 +5699,24 @@ public interface LogiclanguagePackage extends EPackage {
*/
EAttribute PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX = eINSTANCE.getProjectedAggregateExpression_ProjectionIndex();
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl Aggregated Parameter Substitution}' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getAggregatedParameterSubstitution()
+ * @generated
+ */
+ EClass AGGREGATED_PARAMETER_SUBSTITUTION = eINSTANCE.getAggregatedParameterSubstitution();
+
+ /**
+ * The meta object literal for the 'Variable' reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE = eINSTANCE.getAggregatedParameterSubstitution_Variable();
+
}
} //LogiclanguagePackage
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java
index fc1420b0..0459af42 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java
@@ -3,15 +3,21 @@
package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression;
+import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation;
+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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
/**
*
@@ -22,6 +28,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
*
*
* - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregateExpressionImpl#getRelation Relation}
+ * - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregateExpressionImpl#getParameterSubstitution Parameter Substitution}
*
*
* @generated
@@ -37,6 +44,16 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
*/
protected Relation relation;
+ /**
+ * The cached value of the '{@link #getParameterSubstitution() Parameter Substitution}' containment reference list.
+ *
+ *
+ * @see #getParameterSubstitution()
+ * @generated
+ * @ordered
+ */
+ protected EList parameterSubstitution;
+
/**
*
*
@@ -96,6 +113,33 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION, oldRelation, relation));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getParameterSubstitution() {
+ if (parameterSubstitution == null) {
+ parameterSubstitution = new EObjectContainmentEList(AggregatedParameterSubstitution.class, this, LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION);
+ }
+ return parameterSubstitution;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION:
+ return ((InternalEList>)getParameterSubstitution()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
/**
*
*
@@ -107,6 +151,8 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION:
if (resolve) return getRelation();
return basicGetRelation();
+ case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION:
+ return getParameterSubstitution();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -116,12 +162,17 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
*
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION:
setRelation((Relation)newValue);
return;
+ case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION:
+ getParameterSubstitution().clear();
+ getParameterSubstitution().addAll((Collection extends AggregatedParameterSubstitution>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -137,6 +188,9 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION:
setRelation((Relation)null);
return;
+ case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION:
+ getParameterSubstitution().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -151,6 +205,8 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg
switch (featureID) {
case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION:
return relation != null;
+ case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION:
+ return parameterSubstitution != null && !parameterSubstitution.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java
new file mode 100644
index 00000000..15af0f21
--- /dev/null
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java
@@ -0,0 +1,159 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl;
+
+import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution;
+import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage;
+import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable;
+
+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 'Aggregated Parameter Substitution'.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl#getVariable Variable}
+ *
+ *
+ * @generated
+ */
+public class AggregatedParameterSubstitutionImpl extends MinimalEObjectImpl.Container implements AggregatedParameterSubstitution {
+ /**
+ * The cached value of the '{@link #getVariable() Variable}' reference.
+ *
+ *
+ * @see #getVariable()
+ * @generated
+ * @ordered
+ */
+ protected Variable variable;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected AggregatedParameterSubstitutionImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return LogiclanguagePackage.Literals.AGGREGATED_PARAMETER_SUBSTITUTION;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Variable getVariable() {
+ if (variable != null && variable.eIsProxy()) {
+ InternalEObject oldVariable = (InternalEObject)variable;
+ variable = (Variable)eResolveProxy(oldVariable);
+ if (variable != oldVariable) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE, oldVariable, variable));
+ }
+ }
+ return variable;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Variable basicGetVariable() {
+ return variable;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setVariable(Variable newVariable) {
+ Variable oldVariable = variable;
+ variable = newVariable;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE, oldVariable, variable));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE:
+ if (resolve) return getVariable();
+ return basicGetVariable();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE:
+ setVariable((Variable)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE:
+ setVariable((Variable)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE:
+ return variable != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //AggregatedParameterSubstitutionImpl
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java
index b890b6e0..b8d87d99 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java
@@ -104,6 +104,7 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu
case LogiclanguagePackage.COUNT: return createCount();
case LogiclanguagePackage.MIN: return createMin();
case LogiclanguagePackage.MAX: return createMax();
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION: return createAggregatedParameterSubstitution();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -637,6 +638,17 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu
return max;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public AggregatedParameterSubstitution createAggregatedParameterSubstitution() {
+ AggregatedParameterSubstitutionImpl aggregatedParameterSubstitution = new AggregatedParameterSubstitutionImpl();
+ return aggregatedParameterSubstitution;
+ }
+
/**
*
*
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java
index 6d370c0f..64ebdde1 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java
@@ -3,6 +3,7 @@
package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression;
+import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AtomicTerm;
@@ -547,6 +548,13 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
*/
private EClass projectedAggregateExpressionEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass aggregatedParameterSubstitutionEClass = null;
+
/**
* Creates an instance of the model Package, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -1868,6 +1876,16 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
return (EReference)aggregateExpressionEClass.getEStructuralFeatures().get(0);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getAggregateExpression_ParameterSubstitution() {
+ return (EReference)aggregateExpressionEClass.getEStructuralFeatures().get(1);
+ }
+
/**
*
*
@@ -1928,6 +1946,26 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
return (EAttribute)projectedAggregateExpressionEClass.getEStructuralFeatures().get(0);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getAggregatedParameterSubstitution() {
+ return aggregatedParameterSubstitutionEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getAggregatedParameterSubstitution_Variable() {
+ return (EReference)aggregatedParameterSubstitutionEClass.getEStructuralFeatures().get(0);
+ }
+
/**
*
*
@@ -2141,6 +2179,7 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
aggregateExpressionEClass = createEClass(AGGREGATE_EXPRESSION);
createEReference(aggregateExpressionEClass, AGGREGATE_EXPRESSION__RELATION);
+ createEReference(aggregateExpressionEClass, AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION);
sumEClass = createEClass(SUM);
@@ -2152,6 +2191,9 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
projectedAggregateExpressionEClass = createEClass(PROJECTED_AGGREGATE_EXPRESSION);
createEAttribute(projectedAggregateExpressionEClass, PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX);
+
+ aggregatedParameterSubstitutionEClass = createEClass(AGGREGATED_PARAMETER_SUBSTITUTION);
+ createEReference(aggregatedParameterSubstitutionEClass, AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE);
}
/**
@@ -2433,6 +2475,7 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
initEClass(aggregateExpressionEClass, AggregateExpression.class, "AggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getAggregateExpression_Relation(), this.getRelation(), null, "relation", null, 0, 1, AggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAggregateExpression_ParameterSubstitution(), this.getAggregatedParameterSubstitution(), null, "parameterSubstitution", null, 0, -1, AggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(sumEClass, Sum.class, "Sum", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -2445,6 +2488,9 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu
initEClass(projectedAggregateExpressionEClass, ProjectedAggregateExpression.class, "ProjectedAggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getProjectedAggregateExpression_ProjectionIndex(), ecorePackage.getEInt(), "projectionIndex", "-1", 1, 1, ProjectedAggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(aggregatedParameterSubstitutionEClass, AggregatedParameterSubstitution.class, "AggregatedParameterSubstitution", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAggregatedParameterSubstitution_Variable(), this.getVariable(), null, "variable", null, 0, 1, AggregatedParameterSubstitution.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java
index 25edee70..3fc7c298 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java
@@ -328,6 +328,10 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl {
return createProjectedAggregateExpressionAdapter();
}
@Override
+ public Adapter caseAggregatedParameterSubstitution(AggregatedParameterSubstitution object) {
+ return createAggregatedParameterSubstitutionAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -1257,6 +1261,20 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution Aggregated Parameter Substitution}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution
+ * @generated
+ */
+ public Adapter createAggregatedParameterSubstitutionAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for the default case.
*
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java
index fc443484..ac821567 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java
@@ -617,6 +617,12 @@ public class LogiclanguageSwitch extends Switch {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION: {
+ AggregatedParameterSubstitution aggregatedParameterSubstitution = (AggregatedParameterSubstitution)theEObject;
+ T result = caseAggregatedParameterSubstitution(aggregatedParameterSubstitution);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -1596,6 +1602,21 @@ public class LogiclanguageSwitch extends Switch {
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Aggregated Parameter Substitution'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Aggregated Parameter Substitution'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAggregatedParameterSubstitution(AggregatedParameterSubstitution object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'EObject'.
*
--
cgit v1.2.3-70-g09d2