diff options
Diffstat (limited to 'rba.model.core/src/rba/core/impl')
96 files changed, 17385 insertions, 0 deletions
diff --git a/rba.model.core/src/rba/core/impl/AbstractAllocatableImpl.java b/rba.model.core/src/rba/core/impl/AbstractAllocatableImpl.java new file mode 100644 index 0000000..1f12cd5 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AbstractAllocatableImpl.java @@ -0,0 +1,235 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +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.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.AbstractAllocatable; +import rba.core.AbstractContent; +import rba.core.Allocatable; +import rba.core.AllocatableSet; +import rba.core.Content; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Allocatable</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AbstractAllocatableImpl#getContents <em>Contents</em>}</li> + * <li>{@link rba.core.impl.AbstractAllocatableImpl#getAllocatableGroup <em>Allocatable Group</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AbstractAllocatableImpl extends RuleObjectImpl implements AbstractAllocatable { + /** + * The cached value of the '{@link #getContents() <em>Contents</em>}' reference list. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getContents() + * @generated + * @ordered + */ + protected EList<AbstractContent> contents; + + /** + * The cached value of the '{@link #getAllocatableGroup() <em>Allocatable Group</em>}' reference list. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @see #getAllocatableGroup() + * @generated + * @ordered + */ + protected EList<AllocatableSet> allocatableGroup; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AbstractAllocatableImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ABSTRACT_ALLOCATABLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractContent> getContents() { + if (contents == null) { + contents = new EObjectWithInverseResolvingEList.ManyInverse<AbstractContent>(AbstractContent.class, this, + RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS, RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE); + } + return contents; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AllocatableSet> getAllocatableGroup() { + if (allocatableGroup == null) { + allocatableGroup = new EObjectWithInverseResolvingEList.ManyInverse<AllocatableSet>(AllocatableSet.class, + this, RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP, + RBACorePackage.ALLOCATABLE_SET__TARGET); + } + return allocatableGroup; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Content> getContentsList() { + java.util.Set<Content> contents = new java.util.LinkedHashSet<Content>(); + getContents().forEach(content -> contents.addAll(content.collectLeafContents())); + getAllocatableGroup().forEach(allocatableSet -> contents.addAll(allocatableSet.getContentsList())); + return new org.eclipse.emf.common.util.BasicEList<Content>(contents); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Allocatable> collectLeafAllocatable() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getContents()).basicAdd(otherEnd, msgs); + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getAllocatableGroup()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + return ((InternalEList<?>) getContents()).basicRemove(otherEnd, msgs); + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + return ((InternalEList<?>) getAllocatableGroup()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + return getContents(); + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + return getAllocatableGroup(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + getContents().clear(); + getContents().addAll((Collection<? extends AbstractContent>) newValue); + return; + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + getAllocatableGroup().clear(); + getAllocatableGroup().addAll((Collection<? extends AllocatableSet>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + getContents().clear(); + return; + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + getAllocatableGroup().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS: + return contents != null && !contents.isEmpty(); + case RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP: + return allocatableGroup != null && !allocatableGroup.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ABSTRACT_ALLOCATABLE___GET_CONTENTS_LIST: + return getContentsList(); + case RBACorePackage.ABSTRACT_ALLOCATABLE___COLLECT_LEAF_ALLOCATABLE: + return collectLeafAllocatable(); + } + return super.eInvoke(operationID, arguments); + } + +} // AbstractAllocatableImpl diff --git a/rba.model.core/src/rba/core/impl/AbstractConstraintImpl.java b/rba.model.core/src/rba/core/impl/AbstractConstraintImpl.java new file mode 100644 index 0000000..3e8ab87 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AbstractConstraintImpl.java @@ -0,0 +1,170 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.AbstractConstraint; +import rba.core.Expression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Constraint</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AbstractConstraintImpl#getExpression <em>Expression</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AbstractConstraintImpl extends PackagableElementImpl implements AbstractConstraint { + /** + * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getExpression() + * @generated + * @ordered + */ + protected Expression expression; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AbstractConstraintImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ABSTRACT_CONSTRAINT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getExpression() { + return expression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) { + Expression oldExpression = expression; + expression = newExpression; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION, oldExpression, newExpression); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setExpression(Expression newExpression) { + if (newExpression != expression) { + NotificationChain msgs = null; + if (expression != null) + msgs = ((InternalEObject) expression).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION, null, msgs); + if (newExpression != null) + msgs = ((InternalEObject) newExpression).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION, null, msgs); + msgs = basicSetExpression(newExpression, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION, + newExpression, newExpression)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION: + return basicSetExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION: + return getExpression(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION: + setExpression((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION: + setExpression((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONSTRAINT__EXPRESSION: + return expression != null; + } + return super.eIsSet(featureID); + } + +} // AbstractConstraintImpl diff --git a/rba.model.core/src/rba/core/impl/AbstractContentImpl.java b/rba.model.core/src/rba/core/impl/AbstractContentImpl.java new file mode 100644 index 0000000..44c0c20 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AbstractContentImpl.java @@ -0,0 +1,230 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +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.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.AbstractAllocatable; +import rba.core.AbstractContent; +import rba.core.Allocatable; +import rba.core.Content; +import rba.core.ContentSet; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Content</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AbstractContentImpl#getContentGroup <em>Content Group</em>}</li> + * <li>{@link rba.core.impl.AbstractContentImpl#getAllocatable <em>Allocatable</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AbstractContentImpl extends RuleObjectImpl implements AbstractContent { + /** + * The cached value of the '{@link #getContentGroup() <em>Content Group</em>}' reference list. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getContentGroup() + * @generated + * @ordered + */ + protected EList<ContentSet> contentGroup; + + /** + * The cached value of the '{@link #getAllocatable() <em>Allocatable</em>}' reference list. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getAllocatable() + * @generated + * @ordered + */ + protected EList<AbstractAllocatable> allocatable; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AbstractContentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ABSTRACT_CONTENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<ContentSet> getContentGroup() { + if (contentGroup == null) { + contentGroup = new EObjectWithInverseResolvingEList.ManyInverse<ContentSet>(ContentSet.class, this, + RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP, RBACorePackage.CONTENT_SET__TARGET); + } + return contentGroup; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractAllocatable> getAllocatable() { + if (allocatable == null) { + allocatable = new EObjectWithInverseResolvingEList.ManyInverse<AbstractAllocatable>( + AbstractAllocatable.class, this, RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE, + RBACorePackage.ABSTRACT_ALLOCATABLE__CONTENTS); + } + return allocatable; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Allocatable> getAllocatableList() { + java.util.Set<Allocatable> allocatables = new java.util.LinkedHashSet<Allocatable>(); + getAllocatable().forEach(allocatable -> allocatables.addAll(allocatable.collectLeafAllocatable())); + getContentGroup().forEach(contentSet -> allocatables.addAll(contentSet.getAllocatableList())); + return new org.eclipse.emf.common.util.BasicEList<Allocatable>(allocatables); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Content> collectLeafContents() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getContentGroup()).basicAdd(otherEnd, msgs); + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getAllocatable()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + return ((InternalEList<?>) getContentGroup()).basicRemove(otherEnd, msgs); + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + return ((InternalEList<?>) getAllocatable()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + return getContentGroup(); + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + return getAllocatable(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + getContentGroup().clear(); + getContentGroup().addAll((Collection<? extends ContentSet>) newValue); + return; + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + getAllocatable().clear(); + getAllocatable().addAll((Collection<? extends AbstractAllocatable>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + getContentGroup().clear(); + return; + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + getAllocatable().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP: + return contentGroup != null && !contentGroup.isEmpty(); + case RBACorePackage.ABSTRACT_CONTENT__ALLOCATABLE: + return allocatable != null && !allocatable.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ABSTRACT_CONTENT___GET_ALLOCATABLE_LIST: + return getAllocatableList(); + case RBACorePackage.ABSTRACT_CONTENT___COLLECT_LEAF_CONTENTS: + return collectLeafContents(); + } + return super.eInvoke(operationID, arguments); + } + +} // AbstractContentImpl diff --git a/rba.model.core/src/rba/core/impl/AbstractPropertyImpl.java b/rba.model.core/src/rba/core/impl/AbstractPropertyImpl.java new file mode 100644 index 0000000..243acad --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AbstractPropertyImpl.java @@ -0,0 +1,208 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +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.EcoreUtil; +import rba.core.AbstractProperty; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.Scene; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Property</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AbstractPropertyImpl#getOwner <em>Owner</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AbstractPropertyImpl extends RuleObjectImpl implements AbstractProperty { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AbstractPropertyImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ABSTRACT_PROPERTY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Scene getOwner() { + if (eContainerFeatureID() != RBACorePackage.ABSTRACT_PROPERTY__OWNER) + return null; + return (Scene) eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOwner(Scene newOwner, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newOwner, RBACorePackage.ABSTRACT_PROPERTY__OWNER, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setOwner(Scene newOwner) { + if (newOwner != eInternalContainer() + || (eContainerFeatureID() != RBACorePackage.ABSTRACT_PROPERTY__OWNER && newOwner != null)) { + if (EcoreUtil.isAncestor(this, newOwner)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newOwner != null) + msgs = ((InternalEObject) newOwner).eInverseAdd(this, RBACorePackage.SCENE__PROPERTIES, Scene.class, + msgs); + msgs = basicSetOwner(newOwner, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.ABSTRACT_PROPERTY__OWNER, newOwner, + newOwner)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.PROPERTY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetOwner((Scene) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + return basicSetOwner(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + return eInternalContainer().eInverseRemove(this, RBACorePackage.SCENE__PROPERTIES, Scene.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + return getOwner(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + setOwner((Scene) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + setOwner((Scene) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ABSTRACT_PROPERTY__OWNER: + return getOwner() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ABSTRACT_PROPERTY___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AbstractPropertyImpl diff --git a/rba.model.core/src/rba/core/impl/AbstractSceneImpl.java b/rba.model.core/src/rba/core/impl/AbstractSceneImpl.java new file mode 100644 index 0000000..179f9f7 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AbstractSceneImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.AbstractScene; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Abstract Scene</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class AbstractSceneImpl extends RuleObjectImpl implements AbstractScene { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AbstractSceneImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ABSTRACT_SCENE; + } + +} // AbstractSceneImpl diff --git a/rba.model.core/src/rba/core/impl/ActiveContentsImpl.java b/rba.model.core/src/rba/core/impl/ActiveContentsImpl.java new file mode 100644 index 0000000..4ce9df2 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ActiveContentsImpl.java @@ -0,0 +1,85 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ActiveContents; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Active Contents</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class ActiveContentsImpl extends AllocatableOperatorImpl implements ActiveContents { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ActiveContentsImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ACTIVE_CONTENTS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".activeContents()"; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + EList<rba.core.Expression> expressions = getOperand(); + if (!expressions.isEmpty() && expressions.get(0) != null) { + rba.core.Expression first = expressions.get(0); + if (first.getType() == ExpressionType.AREA) { + return ExpressionType.SET_OF_CONTENT; + } else if (first.getType() == ExpressionType.ZONE) { + return ExpressionType.SET_OF_SOUND; + } + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ACTIVE_CONTENTS___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.ACTIVE_CONTENTS___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} //ActiveContentsImpl diff --git a/rba.model.core/src/rba/core/impl/ActiveStateImpl.java b/rba.model.core/src/rba/core/impl/ActiveStateImpl.java new file mode 100644 index 0000000..965181c --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ActiveStateImpl.java @@ -0,0 +1,69 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ActiveState; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Active State</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ActiveStateImpl extends ContentOperatorImpl implements ActiveState { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ActiveStateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ACTIVE_STATE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".activeState()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.CONTENT_STATE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ACTIVE_STATE___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.ACTIVE_STATE___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ActiveStateImpl diff --git a/rba.model.core/src/rba/core/impl/AllocatableImpl.java b/rba.model.core/src/rba/core/impl/AllocatableImpl.java new file mode 100644 index 0000000..d47a7dd --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AllocatableImpl.java @@ -0,0 +1,261 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +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 rba.core.Allocatable; +import rba.core.ArbitrationPolicy; +import rba.core.Expression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Allocatable</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AllocatableImpl#getArbitrationPolicy <em>Arbitration Policy</em>}</li> + * <li>{@link rba.core.impl.AllocatableImpl#getVisibility <em>Visibility</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AllocatableImpl extends AbstractAllocatableImpl implements Allocatable { + /** + * The default value of the '{@link #getArbitrationPolicy() <em>Arbitration Policy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArbitrationPolicy() + * @generated + * @ordered + */ + protected static final ArbitrationPolicy ARBITRATION_POLICY_EDEFAULT = ArbitrationPolicy.DEFAULT; + + /** + * The cached value of the '{@link #getArbitrationPolicy() <em>Arbitration Policy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArbitrationPolicy() + * @generated + * @ordered + */ + protected ArbitrationPolicy arbitrationPolicy = ARBITRATION_POLICY_EDEFAULT; + + /** + * The cached value of the '{@link #getVisibility() <em>Visibility</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVisibility() + * @generated + * @ordered + */ + protected Expression visibility; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AllocatableImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ALLOCATABLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ArbitrationPolicy getArbitrationPolicy() { + return arbitrationPolicy; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setArbitrationPolicy(ArbitrationPolicy newArbitrationPolicy) { + ArbitrationPolicy oldArbitrationPolicy = arbitrationPolicy; + arbitrationPolicy = newArbitrationPolicy == null ? ARBITRATION_POLICY_EDEFAULT : newArbitrationPolicy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.ALLOCATABLE__ARBITRATION_POLICY, + oldArbitrationPolicy, arbitrationPolicy)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getVisibility() { + return visibility; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetVisibility(Expression newVisibility, NotificationChain msgs) { + Expression oldVisibility = visibility; + visibility = newVisibility; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.ALLOCATABLE__VISIBILITY, oldVisibility, newVisibility); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setVisibility(Expression newVisibility) { + if (newVisibility != visibility) { + NotificationChain msgs = null; + if (visibility != null) + msgs = ((InternalEObject) visibility).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.ALLOCATABLE__VISIBILITY, null, msgs); + if (newVisibility != null) + msgs = ((InternalEObject) newVisibility).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.ALLOCATABLE__VISIBILITY, null, msgs); + msgs = basicSetVisibility(newVisibility, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.ALLOCATABLE__VISIBILITY, newVisibility, + newVisibility)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Allocatable> collectLeafAllocatable() { + java.util.Set<Allocatable> allocatables = new java.util.HashSet<Allocatable>(); + allocatables.add(this); + return new org.eclipse.emf.common.util.BasicEList<Allocatable>(allocatables); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE__VISIBILITY: + return basicSetVisibility(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE__ARBITRATION_POLICY: + return getArbitrationPolicy(); + case RBACorePackage.ALLOCATABLE__VISIBILITY: + return getVisibility(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE__ARBITRATION_POLICY: + setArbitrationPolicy((ArbitrationPolicy) newValue); + return; + case RBACorePackage.ALLOCATABLE__VISIBILITY: + setVisibility((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE__ARBITRATION_POLICY: + setArbitrationPolicy(ARBITRATION_POLICY_EDEFAULT); + return; + case RBACorePackage.ALLOCATABLE__VISIBILITY: + setVisibility((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE__ARBITRATION_POLICY: + return arbitrationPolicy != ARBITRATION_POLICY_EDEFAULT; + case RBACorePackage.ALLOCATABLE__VISIBILITY: + return visibility != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ALLOCATABLE___COLLECT_LEAF_ALLOCATABLE: + return collectLeafAllocatable(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (arbitrationPolicy: "); + result.append(arbitrationPolicy); + result.append(')'); + return result.toString(); + } + +} // AllocatableImpl diff --git a/rba.model.core/src/rba/core/impl/AllocatableOperatorImpl.java b/rba.model.core/src/rba/core/impl/AllocatableOperatorImpl.java new file mode 100644 index 0000000..9a034e7 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AllocatableOperatorImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.AllocatableOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Allocatable Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class AllocatableOperatorImpl extends OperatorImpl implements AllocatableOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AllocatableOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ALLOCATABLE_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ALLOCATABLE_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // AllocatableOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/AllocatableSetImpl.java b/rba.model.core/src/rba/core/impl/AllocatableSetImpl.java new file mode 100644 index 0000000..0cf7052 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AllocatableSetImpl.java @@ -0,0 +1,181 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +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.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.AbstractAllocatable; +import rba.core.Allocatable; +import rba.core.AllocatableSet; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Allocatable Set</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.AllocatableSetImpl#getTarget <em>Target</em>}</li> + * </ul> + * + * @generated + */ +public abstract class AllocatableSetImpl extends AbstractAllocatableImpl implements AllocatableSet { + /** + * The cached value of the '{@link #getTarget() <em>Target</em>}' reference list. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getTarget() + * @generated + * @ordered + */ + protected EList<AbstractAllocatable> target; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AllocatableSetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ALLOCATABLE_SET; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractAllocatable> getTarget() { + if (target == null) { + target = new EObjectWithInverseResolvingEList.ManyInverse<AbstractAllocatable>(AbstractAllocatable.class, + this, RBACorePackage.ALLOCATABLE_SET__TARGET, + RBACorePackage.ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP); + } + return target; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Allocatable> collectLeafAllocatable() { + java.util.Set<Allocatable> allocatables = new java.util.LinkedHashSet<Allocatable>(); + getTarget().forEach(allocatable -> allocatables.addAll(allocatable.collectLeafAllocatable())); + return new org.eclipse.emf.common.util.BasicEList<Allocatable>(allocatables); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getTarget()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + return ((InternalEList<?>) getTarget()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + return getTarget(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + getTarget().clear(); + getTarget().addAll((Collection<? extends AbstractAllocatable>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + getTarget().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ALLOCATABLE_SET__TARGET: + return target != null && !target.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ALLOCATABLE_SET___COLLECT_LEAF_ALLOCATABLE: + return collectLeafAllocatable(); + } + return super.eInvoke(operationID, arguments); + } + +} // AllocatableSetImpl diff --git a/rba.model.core/src/rba/core/impl/AllocatedContentImpl.java b/rba.model.core/src/rba/core/impl/AllocatedContentImpl.java new file mode 100644 index 0000000..9d30cfa --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AllocatedContentImpl.java @@ -0,0 +1,78 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.AllocatedContent; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Allocated Content</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class AllocatedContentImpl extends AllocatableOperatorImpl implements AllocatedContent { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AllocatedContentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ALLOCATED_CONTENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".allocatedContent()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + EList<rba.core.Expression> expressions = getOperand(); + if (!expressions.isEmpty() && expressions.get(0) != null) { + rba.core.Expression first = expressions.get(0); + if ((first.getType() == ExpressionType.AREA) || (first.getType() == ExpressionType.SET_OF_AREA)) { + return ExpressionType.CONTENT; + } else if ((first.getType() == ExpressionType.ZONE) || (first.getType() == ExpressionType.SET_OF_ZONE)) { + return ExpressionType.SOUND; + } + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ALLOCATED_CONTENT___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.ALLOCATED_CONTENT___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // AllocatedContentImpl diff --git a/rba.model.core/src/rba/core/impl/AndOperatorImpl.java b/rba.model.core/src/rba/core/impl/AndOperatorImpl.java new file mode 100644 index 0000000..8768fa1 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/AndOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.AndOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>And Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class AndOperatorImpl extends LogicalOperatorImpl implements AndOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected AndOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.AND_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "AND"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.AND_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // AndOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ArbitrationPolicyExpressionImpl.java b/rba.model.core/src/rba/core/impl/ArbitrationPolicyExpressionImpl.java new file mode 100644 index 0000000..a9d7764 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ArbitrationPolicyExpressionImpl.java @@ -0,0 +1,193 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.ArbitrationPolicy; +import rba.core.ArbitrationPolicyExpression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Arbitration Policy Expression</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ArbitrationPolicyExpressionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class ArbitrationPolicyExpressionImpl extends EnumExpressionImpl implements ArbitrationPolicyExpression { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final ArbitrationPolicy VALUE_EDEFAULT = ArbitrationPolicy.DEFAULT; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected ArbitrationPolicy value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ArbitrationPolicyExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ARBITRATION_POLICY_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ArbitrationPolicy getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setValue(ArbitrationPolicy newValue) { + ArbitrationPolicy oldValue = value; + value = newValue == null ? VALUE_EDEFAULT : newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.ARBITRATION_POLICY_EXPRESSION__VALUE, + oldValue, value)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + if (value instanceof ArbitrationPolicy) { + return value.getName(); + } else { + return "[Invalid_Expression]"; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Enumerator getExpressionValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION__VALUE: + setValue((ArbitrationPolicy) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} // ArbitrationPolicyExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/ArithmeticOperatorImpl.java b/rba.model.core/src/rba/core/impl/ArithmeticOperatorImpl.java new file mode 100644 index 0000000..35fb393 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ArithmeticOperatorImpl.java @@ -0,0 +1,83 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ArithmeticOperator; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Arithmetic Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class ArithmeticOperatorImpl extends OperatorImpl implements ArithmeticOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ArithmeticOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ARITHMETIC_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append("("); + for (int i = 0; i < expressions.size(); i++) { + rba.core.Expression expression = expressions.get(i); + expressionText.append(expression.getExpressionText()); + if (i == expressions.size() - 1) { + expressionText.append(")"); + } else { + expressionText.append(" "); + expressionText.append(getSymbol()); + expressionText.append(" "); + } + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ARITHMETIC_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.ARITHMETIC_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ArithmeticOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ComparisonAndImpl.java b/rba.model.core/src/rba/core/impl/ComparisonAndImpl.java new file mode 100644 index 0000000..1d1dfa6 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ComparisonAndImpl.java @@ -0,0 +1,118 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ComparisonAnd; +import rba.core.ComparisonOperator; +import rba.core.Expression; +import rba.core.Operator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Comparison And</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ComparisonAndImpl extends ComparisonOperatorImpl implements ComparisonAnd { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ComparisonAndImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.COMPARISON_AND; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "and"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append("("); + for (int i = 0; i < expressions.size(); i++) { + rba.core.Expression expression = expressions.get(i); + expressionText.append(expression.getExpressionText()); + if (i == expressions.size() - 1) { + expressionText.append(")"); + } else { + expressionText.append(" "); + expressionText.append(getSymbol()); + expressionText.append(" "); + } + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBACorePackage.COMPARISON_AND___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBACorePackage.COMPARISON_AND___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == ComparisonOperator.class) { + switch (baseOperationID) { + case RBACorePackage.COMPARISON_OPERATOR___GET_EXPRESSION_TEXT: + return RBACorePackage.COMPARISON_AND___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.COMPARISON_AND___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.COMPARISON_AND___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ComparisonAndImpl diff --git a/rba.model.core/src/rba/core/impl/ComparisonOperatorImpl.java b/rba.model.core/src/rba/core/impl/ComparisonOperatorImpl.java new file mode 100644 index 0000000..536b758 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ComparisonOperatorImpl.java @@ -0,0 +1,73 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ComparisonOperator; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Comparison Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class ComparisonOperatorImpl extends OperatorImpl implements ComparisonOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ComparisonOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.COMPARISON_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(getSymbol()); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.COMPARISON_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.COMPARISON_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ComparisonOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ComplexExpressionImpl.java b/rba.model.core/src/rba/core/impl/ComplexExpressionImpl.java new file mode 100644 index 0000000..7032eb5 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ComplexExpressionImpl.java @@ -0,0 +1,279 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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 rba.core.ComplexExpression; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.SugarExpression; +import rba.core.SugarExpressionBase; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Complex Expression</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ComplexExpressionImpl#getOtherExpression <em>Other Expression</em>}</li> + * </ul> + * + * @generated + */ +public class ComplexExpressionImpl extends ExpressionImpl implements ComplexExpression { + /** + * The cached value of the '{@link #getOtherExpression() <em>Other Expression</em>}' containment reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getOtherExpression() + * @generated + * @ordered + */ + protected Expression otherExpression; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ComplexExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.COMPLEX_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getOtherExpression() { + return otherExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOtherExpression(Expression newOtherExpression, NotificationChain msgs) { + Expression oldOtherExpression = otherExpression; + otherExpression = newOtherExpression; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION, oldOtherExpression, newOtherExpression); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setOtherExpression(Expression newOtherExpression) { + if (newOtherExpression != otherExpression) { + NotificationChain msgs = null; + if (otherExpression != null) + msgs = ((InternalEObject) otherExpression).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION, null, msgs); + if (newOtherExpression != null) + msgs = ((InternalEObject) newOtherExpression).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION, null, msgs); + msgs = basicSetOtherExpression(newOtherExpression, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION, + newOtherExpression, newOtherExpression)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return otherExpression != null ? otherExpression.getExpressionText() : "[Invalid_Expression]"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + if (otherExpression != null) { + return otherExpression.getType(); + } else { + return ExpressionType.VALUE; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getType() { + return getUnderlyingType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean canExpand() { + return true; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public Expression getExpanded() { + otherExpression.getLetStatements().addAll(getLetStatements()); + return otherExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION: + return basicSetOtherExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION: + return getOtherExpression(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION: + setOtherExpression((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION: + setOtherExpression((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.COMPLEX_EXPRESSION__OTHER_EXPRESSION: + return otherExpression != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBACorePackage.COMPLEX_EXPRESSION___GET_UNDERLYING_TYPE; + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBACorePackage.COMPLEX_EXPRESSION___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == SugarExpression.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND: + return RBACorePackage.COMPLEX_EXPRESSION___CAN_EXPAND; + case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED: + return RBACorePackage.COMPLEX_EXPRESSION___GET_EXPANDED; + default: + return -1; + } + } + if (baseClass == SugarExpressionBase.class) { + switch (baseOperationID) { + case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND: + return RBACorePackage.COMPLEX_EXPRESSION___CAN_EXPAND; + default: + return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.COMPLEX_EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.COMPLEX_EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.COMPLEX_EXPRESSION___GET_TYPE: + return getType(); + case RBACorePackage.COMPLEX_EXPRESSION___CAN_EXPAND: + return canExpand(); + case RBACorePackage.COMPLEX_EXPRESSION___GET_EXPANDED: + return getExpanded(); + } + return super.eInvoke(operationID, arguments); + } + +} // ComplexExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/ConstraintImpl.java b/rba.model.core/src/rba/core/impl/ConstraintImpl.java new file mode 100644 index 0000000..180c124 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ConstraintImpl.java @@ -0,0 +1,186 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.Constraint; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Constraint</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ConstraintImpl#isRuntime <em>Runtime</em>}</li> + * </ul> + * + * @generated + */ +public class ConstraintImpl extends AbstractConstraintImpl implements Constraint { + /** + * The default value of the '{@link #isRuntime() <em>Runtime</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isRuntime() + * @generated + * @ordered + */ + protected static final boolean RUNTIME_EDEFAULT = true; + + /** + * The cached value of the '{@link #isRuntime() <em>Runtime</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isRuntime() + * @generated + * @ordered + */ + protected boolean runtime = RUNTIME_EDEFAULT; + + /** + * This is true if the Runtime attribute has been set. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + * @ordered + */ + protected boolean runtimeESet; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ConstraintImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONSTRAINT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isRuntime() { + return runtime; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setRuntime(boolean newRuntime) { + boolean oldRuntime = runtime; + runtime = newRuntime; + boolean oldRuntimeESet = runtimeESet; + runtimeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.CONSTRAINT__RUNTIME, oldRuntime, + runtime, !oldRuntimeESet)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void unsetRuntime() { + boolean oldRuntime = runtime; + boolean oldRuntimeESet = runtimeESet; + runtime = RUNTIME_EDEFAULT; + runtimeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBACorePackage.CONSTRAINT__RUNTIME, oldRuntime, + RUNTIME_EDEFAULT, oldRuntimeESet)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isSetRuntime() { + return runtimeESet; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.CONSTRAINT__RUNTIME: + return isRuntime(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.CONSTRAINT__RUNTIME: + setRuntime((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.CONSTRAINT__RUNTIME: + unsetRuntime(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.CONSTRAINT__RUNTIME: + return isSetRuntime(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (runtime: "); + if (runtimeESet) + result.append(runtime); + else + result.append("<unset>"); + result.append(')'); + return result.toString(); + } + +} // ConstraintImpl diff --git a/rba.model.core/src/rba/core/impl/ContentImpl.java b/rba.model.core/src/rba/core/impl/ContentImpl.java new file mode 100644 index 0000000..7de022e --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentImpl.java @@ -0,0 +1,248 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +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.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.Content; +import rba.core.ContentState; +import rba.core.LoserType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ContentImpl#getLoserType <em>Loser Type</em>}</li> + * <li>{@link rba.core.impl.ContentImpl#getStates <em>States</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ContentImpl extends AbstractContentImpl implements Content { + /** + * The default value of the '{@link #getLoserType() <em>Loser Type</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getLoserType() + * @generated + * @ordered + */ + protected static final LoserType LOSER_TYPE_EDEFAULT = LoserType.NEVER_GIVEUP; + + /** + * The cached value of the '{@link #getLoserType() <em>Loser Type</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getLoserType() + * @generated + * @ordered + */ + protected LoserType loserType = LOSER_TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getStates() <em>States</em>}' containment reference list. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getStates() + * @generated + * @ordered + */ + protected EList<ContentState> states; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ContentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LoserType getLoserType() { + return loserType; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setLoserType(LoserType newLoserType) { + LoserType oldLoserType = loserType; + loserType = newLoserType == null ? LOSER_TYPE_EDEFAULT : newLoserType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.CONTENT__LOSER_TYPE, oldLoserType, + loserType)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<ContentState> getStates() { + if (states == null) { + states = new EObjectContainmentWithInverseEList<ContentState>(ContentState.class, this, + RBACorePackage.CONTENT__STATES, RBACorePackage.CONTENT_STATE__OWNER); + } + return states; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Content> collectLeafContents() { + java.util.Set<Content> contents = new java.util.HashSet<Content>(); + contents.add(this); + return new org.eclipse.emf.common.util.BasicEList<Content>(contents); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT__STATES: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getStates()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT__STATES: + return ((InternalEList<?>) getStates()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.CONTENT__LOSER_TYPE: + return getLoserType(); + case RBACorePackage.CONTENT__STATES: + return getStates(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.CONTENT__LOSER_TYPE: + setLoserType((LoserType) newValue); + return; + case RBACorePackage.CONTENT__STATES: + getStates().clear(); + getStates().addAll((Collection<? extends ContentState>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT__LOSER_TYPE: + setLoserType(LOSER_TYPE_EDEFAULT); + return; + case RBACorePackage.CONTENT__STATES: + getStates().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT__LOSER_TYPE: + return loserType != LOSER_TYPE_EDEFAULT; + case RBACorePackage.CONTENT__STATES: + return states != null && !states.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.CONTENT___COLLECT_LEAF_CONTENTS: + return collectLeafContents(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (loserType: "); + result.append(loserType); + result.append(')'); + return result.toString(); + } + +} // ContentImpl diff --git a/rba.model.core/src/rba/core/impl/ContentOperatorImpl.java b/rba.model.core/src/rba/core/impl/ContentOperatorImpl.java new file mode 100644 index 0000000..54d3eee --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentOperatorImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ContentOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class ContentOperatorImpl extends OperatorImpl implements ContentOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ContentOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.CONTENT_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ContentOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ContentSetImpl.java b/rba.model.core/src/rba/core/impl/ContentSetImpl.java new file mode 100644 index 0000000..48b49dc --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentSetImpl.java @@ -0,0 +1,177 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; + +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.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.AbstractContent; +import rba.core.Content; +import rba.core.ContentSet; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content Set</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ContentSetImpl#getTarget <em>Target</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ContentSetImpl extends AbstractContentImpl implements ContentSet { + /** + * The cached value of the '{@link #getTarget() <em>Target</em>}' reference list. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getTarget() + * @generated + * @ordered + */ + protected EList<AbstractContent> target; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ContentSetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT_SET; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractContent> getTarget() { + if (target == null) { + target = new EObjectWithInverseResolvingEList.ManyInverse<AbstractContent>(AbstractContent.class, this, + RBACorePackage.CONTENT_SET__TARGET, RBACorePackage.ABSTRACT_CONTENT__CONTENT_GROUP); + } + return target; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Content> collectLeafContents() { + java.util.Set<Content> contents = new java.util.LinkedHashSet<Content>(); + getTarget().forEach(content -> contents.addAll(content.collectLeafContents())); + return new org.eclipse.emf.common.util.BasicEList<Content>(contents); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getTarget()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + return ((InternalEList<?>) getTarget()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + return getTarget(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + getTarget().clear(); + getTarget().addAll((Collection<? extends AbstractContent>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + getTarget().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT_SET__TARGET: + return target != null && !target.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.CONTENT_SET___COLLECT_LEAF_CONTENTS: + return collectLeafContents(); + } + return super.eInvoke(operationID, arguments); + } + +} // ContentSetImpl diff --git a/rba.model.core/src/rba/core/impl/ContentStateImpl.java b/rba.model.core/src/rba/core/impl/ContentStateImpl.java new file mode 100644 index 0000000..f744899 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentStateImpl.java @@ -0,0 +1,256 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +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.EcoreUtil; + +import rba.core.Content; +import rba.core.ContentState; +import rba.core.Expression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content State</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ContentStateImpl#getValue <em>Value</em>}</li> + * <li>{@link rba.core.impl.ContentStateImpl#getOwner <em>Owner</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ContentStateImpl extends RuleObjectImpl implements ContentState { + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected Expression value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ContentStateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT_STATE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetValue(Expression newValue, NotificationChain msgs) { + Expression oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.CONTENT_STATE__VALUE, oldValue, newValue); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setValue(Expression newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject) value).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.CONTENT_STATE__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject) newValue).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.CONTENT_STATE__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.CONTENT_STATE__VALUE, newValue, + newValue)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Content getOwner() { + if (eContainerFeatureID() != RBACorePackage.CONTENT_STATE__OWNER) + return null; + return (Content) eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetOwner(Content newOwner, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newOwner, RBACorePackage.CONTENT_STATE__OWNER, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setOwner(Content newOwner) { + if (newOwner != eInternalContainer() + || (eContainerFeatureID() != RBACorePackage.CONTENT_STATE__OWNER && newOwner != null)) { + if (EcoreUtil.isAncestor(this, newOwner)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newOwner != null) + msgs = ((InternalEObject) newOwner).eInverseAdd(this, RBACorePackage.CONTENT__STATES, Content.class, + msgs); + msgs = basicSetOwner(newOwner, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.CONTENT_STATE__OWNER, newOwner, + newOwner)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__OWNER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetOwner((Content) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__VALUE: + return basicSetValue(null, msgs); + case RBACorePackage.CONTENT_STATE__OWNER: + return basicSetOwner(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case RBACorePackage.CONTENT_STATE__OWNER: + return eInternalContainer().eInverseRemove(this, RBACorePackage.CONTENT__STATES, Content.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__VALUE: + return getValue(); + case RBACorePackage.CONTENT_STATE__OWNER: + return getOwner(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__VALUE: + setValue((Expression) newValue); + return; + case RBACorePackage.CONTENT_STATE__OWNER: + setOwner((Content) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__VALUE: + setValue((Expression) null); + return; + case RBACorePackage.CONTENT_STATE__OWNER: + setOwner((Content) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.CONTENT_STATE__VALUE: + return value != null; + case RBACorePackage.CONTENT_STATE__OWNER: + return getOwner() != null; + } + return super.eIsSet(featureID); + } + +} // ContentStateImpl diff --git a/rba.model.core/src/rba/core/impl/ContentStateOperatorImpl.java b/rba.model.core/src/rba/core/impl/ContentStateOperatorImpl.java new file mode 100644 index 0000000..c8d9330 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentStateOperatorImpl.java @@ -0,0 +1,62 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.ContentStateOperator;
+import rba.core.RBACorePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content State Operator</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public abstract class ContentStateOperatorImpl extends OperatorImpl implements ContentStateOperator {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected ContentStateOperatorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.CONTENT_STATE_OPERATOR;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuffer expressionText = new StringBuffer();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(getSymbol());
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.CONTENT_STATE_OPERATOR___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // ContentStateOperatorImpl
diff --git a/rba.model.core/src/rba/core/impl/ContentValueImpl.java b/rba.model.core/src/rba/core/impl/ContentValueImpl.java new file mode 100644 index 0000000..0feff1f --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ContentValueImpl.java @@ -0,0 +1,69 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ContentValue; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Content Value</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ContentValueImpl extends AllocatableOperatorImpl implements ContentValue { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ContentValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".contentValue()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.CONTENT_VALUE___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.CONTENT_VALUE___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ContentValueImpl diff --git a/rba.model.core/src/rba/core/impl/EnumExpressionImpl.java b/rba.model.core/src/rba/core/impl/EnumExpressionImpl.java new file mode 100644 index 0000000..0c01946 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/EnumExpressionImpl.java @@ -0,0 +1,82 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.EnumExpression; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Enum Expression</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class EnumExpressionImpl extends ExpressionImpl implements EnumExpression { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected EnumExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.ENUM_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.ENUM; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Enumerator getExpressionValue() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getType() { + return getUnderlyingType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.ENUM_EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.ENUM_EXPRESSION___GET_EXPRESSION_VALUE: + return getExpressionValue(); + case RBACorePackage.ENUM_EXPRESSION___GET_TYPE: + return getType(); + } + return super.eInvoke(operationID, arguments); + } + +} // EnumExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/EqualToOperatorImpl.java b/rba.model.core/src/rba/core/impl/EqualToOperatorImpl.java new file mode 100644 index 0000000..c88a227 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/EqualToOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.EqualToOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Equal To Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class EqualToOperatorImpl extends ComparisonOperatorImpl implements EqualToOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected EqualToOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.EQUAL_TO_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "="; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.EQUAL_TO_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // EqualToOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java b/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java new file mode 100644 index 0000000..12fa012 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java @@ -0,0 +1,87 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExistsOperator; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Exists Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ExistsOperatorImpl extends LambdaContextImpl implements ExistsOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ExistsOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.EXISTS_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(getSymbol()); + expressionText.append(" "); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "Exists"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.EXISTS_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.EXISTS_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.EXISTS_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ExistsOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ExpressionImpl.java b/rba.model.core/src/rba/core/impl/ExpressionImpl.java new file mode 100644 index 0000000..207158b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ExpressionImpl.java @@ -0,0 +1,264 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; +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.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.LetStatement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Expression</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ExpressionImpl#getType <em>Type</em>}</li> + * <li>{@link rba.core.impl.ExpressionImpl#getExpression <em>Expression</em>}</li> + * <li>{@link rba.core.impl.ExpressionImpl#getLetStatements <em>Let Statements</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ExpressionImpl extends MinimalEObjectImpl.Container implements Expression { + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final ExpressionType TYPE_EDEFAULT = ExpressionType.VALUE; + + /** + * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getExpression() + * @generated + * @ordered + */ + protected static final String EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLetStatements() <em>Let Statements</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getLetStatements() + * @generated + * @ordered + */ + protected EList<LetStatement> letStatements; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public ExpressionType getType() { + return getUnderlyingType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public boolean isSetType() { + return true; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public String getExpression() { + return getExpressionText(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setExpression(String newExpression) { + // TODO: implement this method to set the 'Expression' attribute + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void unsetExpression() { + // TODO: implement this method to unset the 'Expression' attribute + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public boolean isSetExpression() { + return true; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<LetStatement> getLetStatements() { + if (letStatements == null) { + letStatements = new EObjectContainmentEList<LetStatement>(LetStatement.class, this, + RBACorePackage.EXPRESSION__LET_STATEMENTS); + } + return letStatements; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return ((InternalEList<?>) getLetStatements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.EXPRESSION__TYPE: + return getType(); + case RBACorePackage.EXPRESSION__EXPRESSION: + return getExpression(); + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return getLetStatements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.EXPRESSION__EXPRESSION: + setExpression((String) newValue); + return; + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + getLetStatements().clear(); + getLetStatements().addAll((Collection<? extends LetStatement>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.EXPRESSION__EXPRESSION: + unsetExpression(); + return; + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + getLetStatements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.EXPRESSION__TYPE: + return isSetType(); + case RBACorePackage.EXPRESSION__EXPRESSION: + return isSetExpression(); + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return letStatements != null && !letStatements.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/ForAllOperatorImpl.java b/rba.model.core/src/rba/core/impl/ForAllOperatorImpl.java new file mode 100644 index 0000000..dbcb8af --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ForAllOperatorImpl.java @@ -0,0 +1,91 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.ForAllOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>For All Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ForAllOperatorImpl extends LambdaContextImpl implements ForAllOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ForAllOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.FOR_ALL_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(getSymbol()); + expressionText.append(" "); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "For All"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + rba.core.LambdaExpression lambda = getLambda(); + if (lambda != null && lambda.getBodyText() != null) { + return lambda.getBodyText().getUnderlyingType(); + } + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.FOR_ALL_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.FOR_ALL_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.FOR_ALL_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ForAllOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/GetAllocatablesImpl.java b/rba.model.core/src/rba/core/impl/GetAllocatablesImpl.java new file mode 100644 index 0000000..f2a6e28 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/GetAllocatablesImpl.java @@ -0,0 +1,77 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.GetAllocatables; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Get Allocatables</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class GetAllocatablesImpl extends ContentOperatorImpl implements GetAllocatables { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected GetAllocatablesImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.GET_ALLOCATABLES; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".allocatables()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + EList<rba.core.Expression> expressions = getOperand(); + if (!expressions.isEmpty() && expressions.get(0) != null) { + rba.core.Expression first = expressions.get(0); + if (first.getType() == ExpressionType.CONTENT) { + return ExpressionType.SET_OF_AREA; + } else if (first.getType() == ExpressionType.SOUND) { + return ExpressionType.SET_OF_ZONE; + } + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.GET_ALLOCATABLES___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.GET_ALLOCATABLES___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // GetAllocatablesImpl diff --git a/rba.model.core/src/rba/core/impl/GetContentsListImpl.java b/rba.model.core/src/rba/core/impl/GetContentsListImpl.java new file mode 100644 index 0000000..899b468 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/GetContentsListImpl.java @@ -0,0 +1,77 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.GetContentsList; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Get Contents List</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class GetContentsListImpl extends AllocatableOperatorImpl implements GetContentsList { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected GetContentsListImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.GET_CONTENTS_LIST; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".contentsList()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + EList<rba.core.Expression> expressions = getOperand(); + if (!expressions.isEmpty() && expressions.get(0) != null) { + rba.core.Expression first = expressions.get(0); + if (first.getType() == ExpressionType.AREA) { + return ExpressionType.SET_OF_CONTENT; + } else if (first.getType() == ExpressionType.ZONE) { + return ExpressionType.SET_OF_SOUND; + } + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.GET_CONTENTS_LIST___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.GET_CONTENTS_LIST___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // GetContentsListImpl diff --git a/rba.model.core/src/rba/core/impl/GetPropertyImpl.java b/rba.model.core/src/rba/core/impl/GetPropertyImpl.java new file mode 100644 index 0000000..c3fc47d --- /dev/null +++ b/rba.model.core/src/rba/core/impl/GetPropertyImpl.java @@ -0,0 +1,105 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.GetProperty; +import rba.core.Operator; +import rba.core.PropertyOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Get Property</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class GetPropertyImpl extends PropertyOperatorImpl implements GetProperty { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected GetPropertyImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.GET_PROPERTY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".get()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return RBACorePackage.GET_PROPERTY___GET_UNDERLYING_TYPE; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBACorePackage.GET_PROPERTY___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == PropertyOperator.class) { + switch (baseOperationID) { + case RBACorePackage.PROPERTY_OPERATOR___GET_UNDERLYING_TYPE: + return RBACorePackage.GET_PROPERTY___GET_UNDERLYING_TYPE; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.GET_PROPERTY___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.GET_PROPERTY___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // GetPropertyImpl diff --git a/rba.model.core/src/rba/core/impl/GetStateImpl.java b/rba.model.core/src/rba/core/impl/GetStateImpl.java new file mode 100644 index 0000000..ed4be93 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/GetStateImpl.java @@ -0,0 +1,59 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import rba.core.GetState; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Get State</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class GetStateImpl extends MinimalEObjectImpl.Container implements GetState { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected GetStateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.GET_STATE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".state()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.GET_STATE___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // GetStateImpl diff --git a/rba.model.core/src/rba/core/impl/GreaterThanOperatorImpl.java b/rba.model.core/src/rba/core/impl/GreaterThanOperatorImpl.java new file mode 100644 index 0000000..7da0250 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/GreaterThanOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.GreaterThanOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Greater Than Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class GreaterThanOperatorImpl extends ComparisonOperatorImpl implements GreaterThanOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected GreaterThanOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.GREATER_THAN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ">"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.GREATER_THAN_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // GreaterThanOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/HasBeenDisplayedImpl.java b/rba.model.core/src/rba/core/impl/HasBeenDisplayedImpl.java new file mode 100644 index 0000000..aae7b82 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/HasBeenDisplayedImpl.java @@ -0,0 +1,69 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.HasBeenDisplayed; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Has Been Displayed</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class HasBeenDisplayedImpl extends ContentOperatorImpl implements HasBeenDisplayed { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected HasBeenDisplayedImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.HAS_BEEN_DISPLAYED; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".hasBeenDisplayed()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.HAS_BEEN_DISPLAYED___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.HAS_BEEN_DISPLAYED___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // HasBeenDisplayedImpl diff --git a/rba.model.core/src/rba/core/impl/HasComeEarlierThanImpl.java b/rba.model.core/src/rba/core/impl/HasComeEarlierThanImpl.java new file mode 100644 index 0000000..1b6aed1 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/HasComeEarlierThanImpl.java @@ -0,0 +1,124 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.ContentOperator;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.HasComeEarlierThan;
+import rba.core.Operator;
+import rba.core.RBACorePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Has Come Earlier Than</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class HasComeEarlierThanImpl extends ContentOperatorImpl implements HasComeEarlierThan {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected HasComeEarlierThanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.HAS_COME_EARLIER_THAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".hasComeEarlierThan"; //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuffer expressionText = new StringBuffer();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(getSymbol());
+ expressionText.append("(");
+ expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(")");
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.HAS_COME_EARLIER_THAN___GET_UNDERLYING_TYPE;
+ case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT:
+ return RBACorePackage.HAS_COME_EARLIER_THAN___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.HAS_COME_EARLIER_THAN___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == ContentOperator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.CONTENT_OPERATOR___GET_EXPRESSION_TEXT:
+ return RBACorePackage.HAS_COME_EARLIER_THAN___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.HAS_COME_EARLIER_THAN___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.HAS_COME_EARLIER_THAN___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.HAS_COME_EARLIER_THAN___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // HasComeEarlierThanImpl
diff --git a/rba.model.core/src/rba/core/impl/HasComeLaterThanImpl.java b/rba.model.core/src/rba/core/impl/HasComeLaterThanImpl.java new file mode 100644 index 0000000..130a12a --- /dev/null +++ b/rba.model.core/src/rba/core/impl/HasComeLaterThanImpl.java @@ -0,0 +1,124 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.ContentOperator;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.HasComeLaterThan;
+import rba.core.Operator;
+import rba.core.RBACorePackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Has Come Later Than</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class HasComeLaterThanImpl extends ContentOperatorImpl implements HasComeLaterThan {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected HasComeLaterThanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.HAS_COME_LATER_THAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".hasComeLaterThan"; //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuffer expressionText = new StringBuffer();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(getSymbol());
+ expressionText.append("(");
+ expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(")");
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.HAS_COME_LATER_THAN___GET_UNDERLYING_TYPE;
+ case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT:
+ return RBACorePackage.HAS_COME_LATER_THAN___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.HAS_COME_LATER_THAN___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == ContentOperator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.CONTENT_OPERATOR___GET_EXPRESSION_TEXT:
+ return RBACorePackage.HAS_COME_LATER_THAN___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.HAS_COME_LATER_THAN___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.HAS_COME_LATER_THAN___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.HAS_COME_LATER_THAN___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // HasComeLaterThanImpl
diff --git a/rba.model.core/src/rba/core/impl/IfStatementImpl.java b/rba.model.core/src/rba/core/impl/IfStatementImpl.java new file mode 100644 index 0000000..60ab034 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IfStatementImpl.java @@ -0,0 +1,354 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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 rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.IfStatement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>If Statement</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.IfStatementImpl#getCondition <em>Condition</em>}</li> + * <li>{@link rba.core.impl.IfStatementImpl#getThenExpression <em>Then Expression</em>}</li> + * <li>{@link rba.core.impl.IfStatementImpl#getElseExpression <em>Else Expression</em>}</li> + * </ul> + * + * @generated + */ +public class IfStatementImpl extends ExpressionImpl implements IfStatement { + /** + * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getCondition() + * @generated + * @ordered + */ + protected Expression condition; + + /** + * The cached value of the '{@link #getThenExpression() <em>Then Expression</em>}' containment reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getThenExpression() + * @generated + * @ordered + */ + protected Expression thenExpression; + + /** + * The cached value of the '{@link #getElseExpression() <em>Else Expression</em>}' containment reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getElseExpression() + * @generated + * @ordered + */ + protected Expression elseExpression; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IfStatementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IF_STATEMENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getCondition() { + return condition; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCondition(Expression newCondition, NotificationChain msgs) { + Expression oldCondition = condition; + condition = newCondition; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.IF_STATEMENT__CONDITION, oldCondition, newCondition); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setCondition(Expression newCondition) { + if (newCondition != condition) { + NotificationChain msgs = null; + if (condition != null) + msgs = ((InternalEObject) condition).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__CONDITION, null, msgs); + if (newCondition != null) + msgs = ((InternalEObject) newCondition).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__CONDITION, null, msgs); + msgs = basicSetCondition(newCondition, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.IF_STATEMENT__CONDITION, newCondition, + newCondition)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getThenExpression() { + return thenExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetThenExpression(Expression newThenExpression, NotificationChain msgs) { + Expression oldThenExpression = thenExpression; + thenExpression = newThenExpression; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.IF_STATEMENT__THEN_EXPRESSION, oldThenExpression, newThenExpression); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setThenExpression(Expression newThenExpression) { + if (newThenExpression != thenExpression) { + NotificationChain msgs = null; + if (thenExpression != null) + msgs = ((InternalEObject) thenExpression).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__THEN_EXPRESSION, null, msgs); + if (newThenExpression != null) + msgs = ((InternalEObject) newThenExpression).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__THEN_EXPRESSION, null, msgs); + msgs = basicSetThenExpression(newThenExpression, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.IF_STATEMENT__THEN_EXPRESSION, + newThenExpression, newThenExpression)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getElseExpression() { + return elseExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetElseExpression(Expression newElseExpression, NotificationChain msgs) { + Expression oldElseExpression = elseExpression; + elseExpression = newElseExpression; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION, oldElseExpression, newElseExpression); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setElseExpression(Expression newElseExpression) { + if (newElseExpression != elseExpression) { + NotificationChain msgs = null; + if (elseExpression != null) + msgs = ((InternalEObject) elseExpression).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION, null, msgs); + if (newElseExpression != null) + msgs = ((InternalEObject) newElseExpression).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION, null, msgs); + msgs = basicSetElseExpression(newElseExpression, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION, + newElseExpression, newElseExpression)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + if (thenExpression != null) { + return thenExpression.getUnderlyingType(); + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + expressionText.append("IF("); + expressionText.append(condition != null ? condition.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(") THEN "); + expressionText.append(thenExpression != null ? thenExpression.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" ELSE "); + expressionText.append(elseExpression != null ? elseExpression.getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.IF_STATEMENT__CONDITION: + return basicSetCondition(null, msgs); + case RBACorePackage.IF_STATEMENT__THEN_EXPRESSION: + return basicSetThenExpression(null, msgs); + case RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION: + return basicSetElseExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.IF_STATEMENT__CONDITION: + return getCondition(); + case RBACorePackage.IF_STATEMENT__THEN_EXPRESSION: + return getThenExpression(); + case RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION: + return getElseExpression(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.IF_STATEMENT__CONDITION: + setCondition((Expression) newValue); + return; + case RBACorePackage.IF_STATEMENT__THEN_EXPRESSION: + setThenExpression((Expression) newValue); + return; + case RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION: + setElseExpression((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.IF_STATEMENT__CONDITION: + setCondition((Expression) null); + return; + case RBACorePackage.IF_STATEMENT__THEN_EXPRESSION: + setThenExpression((Expression) null); + return; + case RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION: + setElseExpression((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.IF_STATEMENT__CONDITION: + return condition != null; + case RBACorePackage.IF_STATEMENT__THEN_EXPRESSION: + return thenExpression != null; + case RBACorePackage.IF_STATEMENT__ELSE_EXPRESSION: + return elseExpression != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IF_STATEMENT___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.IF_STATEMENT___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // IfStatementImpl diff --git a/rba.model.core/src/rba/core/impl/ImpliesOperatorImpl.java b/rba.model.core/src/rba/core/impl/ImpliesOperatorImpl.java new file mode 100644 index 0000000..d48ab99 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ImpliesOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ImpliesOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Implies Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ImpliesOperatorImpl extends LogicalOperatorImpl implements ImpliesOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ImpliesOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IMPLIES_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "->"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IMPLIES_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // ImpliesOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IntegerPropertyImpl.java b/rba.model.core/src/rba/core/impl/IntegerPropertyImpl.java new file mode 100644 index 0000000..3b5b2e9 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IntegerPropertyImpl.java @@ -0,0 +1,170 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.Expression; +import rba.core.IntegerProperty; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Integer Property</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.IntegerPropertyImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntegerPropertyImpl extends AbstractPropertyImpl implements IntegerProperty { + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected Expression value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IntegerPropertyImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.INTEGER_PROPERTY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Expression getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetValue(Expression newValue, NotificationChain msgs) { + Expression oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.INTEGER_PROPERTY__VALUE, oldValue, newValue); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setValue(Expression newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject) value).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.INTEGER_PROPERTY__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject) newValue).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.INTEGER_PROPERTY__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.INTEGER_PROPERTY__VALUE, newValue, + newValue)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.INTEGER_PROPERTY__VALUE: + return basicSetValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.INTEGER_PROPERTY__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.INTEGER_PROPERTY__VALUE: + setValue((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.INTEGER_PROPERTY__VALUE: + setValue((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.INTEGER_PROPERTY__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + +} // IntegerPropertyImpl diff --git a/rba.model.core/src/rba/core/impl/IntegerValueImpl.java b/rba.model.core/src/rba/core/impl/IntegerValueImpl.java new file mode 100644 index 0000000..e62d28e --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IntegerValueImpl.java @@ -0,0 +1,186 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.IntegerValue; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Integer Value</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.IntegerValueImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntegerValueImpl extends ValueExpressionImpl implements IntegerValue { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IntegerValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.INTEGER_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setValue(int newValue) { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.INTEGER_VALUE__VALUE, oldValue, + value)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return String.valueOf(value); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.INTEGER_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.INTEGER_VALUE__VALUE: + setValue((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.INTEGER_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.INTEGER_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.INTEGER_VALUE___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.INTEGER_VALUE___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} // IntegerValueImpl diff --git a/rba.model.core/src/rba/core/impl/IsActiveImpl.java b/rba.model.core/src/rba/core/impl/IsActiveImpl.java new file mode 100644 index 0000000..23310da --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsActiveImpl.java @@ -0,0 +1,69 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.IsActive; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Active</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class IsActiveImpl extends ContentOperatorImpl implements IsActive { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsActiveImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_ACTIVE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".isActive()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_ACTIVE___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.IS_ACTIVE___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsActiveImpl diff --git a/rba.model.core/src/rba/core/impl/IsAllocatedToImpl.java b/rba.model.core/src/rba/core/impl/IsAllocatedToImpl.java new file mode 100644 index 0000000..901be5b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsAllocatedToImpl.java @@ -0,0 +1,171 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.AllocatedContent;
+import rba.core.ContentOperator;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.IsAllocatedTo;
+import rba.core.ObjectCompare;
+import rba.core.Operator;
+import rba.core.RBACoreFactory;
+import rba.core.RBACorePackage;
+import rba.core.SugarExpression;
+import rba.core.SugarExpressionBase;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Allocated To</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class IsAllocatedToImpl extends ContentOperatorImpl implements IsAllocatedTo {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected IsAllocatedToImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.IS_ALLOCATED_TO;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".isAllocatedTo";
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuilder expressionText = new StringBuilder();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(getSymbol());
+ expressionText.append("(");
+ expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(")");
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean canExpand() {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Expression getExpanded() {
+ ObjectCompare compare = RBACoreFactory.eINSTANCE.createObjectCompare();
+ AllocatedContent content = RBACoreFactory.eINSTANCE.createAllocatedContent();
+ content.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1)));
+ compare.getOperand().add(content);
+ compare.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0)));
+ return compare;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.IS_ALLOCATED_TO___GET_UNDERLYING_TYPE;
+ case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT:
+ return RBACorePackage.IS_ALLOCATED_TO___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.IS_ALLOCATED_TO___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == ContentOperator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.CONTENT_OPERATOR___GET_EXPRESSION_TEXT:
+ return RBACorePackage.IS_ALLOCATED_TO___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == SugarExpression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND:
+ return RBACorePackage.IS_ALLOCATED_TO___CAN_EXPAND;
+ case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED:
+ return RBACorePackage.IS_ALLOCATED_TO___GET_EXPANDED;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == SugarExpressionBase.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND:
+ return RBACorePackage.IS_ALLOCATED_TO___CAN_EXPAND;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.IS_ALLOCATED_TO___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.IS_ALLOCATED_TO___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.IS_ALLOCATED_TO___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ case RBACorePackage.IS_ALLOCATED_TO___CAN_EXPAND:
+ return canExpand();
+ case RBACorePackage.IS_ALLOCATED_TO___GET_EXPANDED:
+ return getExpanded();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // IsAllocatedToImpl
diff --git a/rba.model.core/src/rba/core/impl/IsChangedImpl.java b/rba.model.core/src/rba/core/impl/IsChangedImpl.java new file mode 100644 index 0000000..1ae8bdf --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsChangedImpl.java @@ -0,0 +1,156 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.AllocatedContent;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.IsChanged;
+import rba.core.NotOperator;
+import rba.core.ObjectCompare;
+import rba.core.ObjectReference;
+import rba.core.Operator;
+import rba.core.PreviousModifier;
+import rba.core.RBACoreFactory;
+import rba.core.RBACorePackage;
+import rba.core.SugarExpression;
+import rba.core.SugarExpressionBase;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Changed</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class IsChangedImpl extends AllocatableOperatorImpl implements IsChanged {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected IsChangedImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.IS_CHANGED;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".isChanged()";
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean canExpand() {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Expression getExpanded() {
+ NotOperator not = RBACoreFactory.eINSTANCE.createNotOperator();
+ ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare();
+ AllocatedContent content = RBACoreFactory.eINSTANCE.createAllocatedContent();
+ PreviousModifier preModifier = RBACoreFactory.eINSTANCE.createPreviousModifier();
+
+ preModifier.setObjReference((ObjectReference) org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0)));
+ content.getOperand().add(preModifier);
+ equal.getOperand().add(content);
+
+ content = RBACoreFactory.eINSTANCE.createAllocatedContent();
+ content.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0)));
+
+ equal.getOperand().add(content);
+ not.getOperand().add(equal);
+ return not;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.IS_CHANGED___GET_UNDERLYING_TYPE;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.IS_CHANGED___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == SugarExpression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND:
+ return RBACorePackage.IS_CHANGED___CAN_EXPAND;
+ case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED:
+ return RBACorePackage.IS_CHANGED___GET_EXPANDED;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == SugarExpressionBase.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND:
+ return RBACorePackage.IS_CHANGED___CAN_EXPAND;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.IS_CHANGED___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.IS_CHANGED___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.IS_CHANGED___CAN_EXPAND:
+ return canExpand();
+ case RBACorePackage.IS_CHANGED___GET_EXPANDED:
+ return getExpanded();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // IsChangedImpl
diff --git a/rba.model.core/src/rba/core/impl/IsEqualToOperatorImpl.java b/rba.model.core/src/rba/core/impl/IsEqualToOperatorImpl.java new file mode 100644 index 0000000..3b5869b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsEqualToOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.IsEqualToOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Equal To Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class IsEqualToOperatorImpl extends LogicalOperatorImpl implements IsEqualToOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsEqualToOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_EQUAL_TO_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "="; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_EQUAL_TO_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsEqualToOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IsGreaterThanEqualOperatorImpl.java b/rba.model.core/src/rba/core/impl/IsGreaterThanEqualOperatorImpl.java new file mode 100644 index 0000000..218422b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsGreaterThanEqualOperatorImpl.java @@ -0,0 +1,59 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.IsGreaterThanEqualOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Greater Than Equal Operator</b></em>'. <!-- + * end-user-doc --> + * + * @generated + */ +public class IsGreaterThanEqualOperatorImpl extends LogicalOperatorImpl implements IsGreaterThanEqualOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsGreaterThanEqualOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_GREATER_THAN_EQUAL_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ">="; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_GREATER_THAN_EQUAL_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsGreaterThanEqualOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IsGreaterThanOperatorImpl.java b/rba.model.core/src/rba/core/impl/IsGreaterThanOperatorImpl.java new file mode 100644 index 0000000..3746b0b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsGreaterThanOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.IsGreaterThanOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Greater Than Operator</b></em>'. <!-- end-user-doc + * --> + * @generated + */ +public class IsGreaterThanOperatorImpl extends LogicalOperatorImpl implements IsGreaterThanOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsGreaterThanOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_GREATER_THAN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ">"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_GREATER_THAN_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsGreaterThanOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IsLowerThanEqualOperatorImpl.java b/rba.model.core/src/rba/core/impl/IsLowerThanEqualOperatorImpl.java new file mode 100644 index 0000000..27d8d48 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsLowerThanEqualOperatorImpl.java @@ -0,0 +1,59 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.IsLowerThanEqualOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Lower Than Equal Operator</b></em>'. <!-- + * end-user-doc --> + * + * @generated + */ +public class IsLowerThanEqualOperatorImpl extends LogicalOperatorImpl implements IsLowerThanEqualOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsLowerThanEqualOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_LOWER_THAN_EQUAL_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "<="; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_LOWER_THAN_EQUAL_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsLowerThanEqualOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IsLowerThanOperatorImpl.java b/rba.model.core/src/rba/core/impl/IsLowerThanOperatorImpl.java new file mode 100644 index 0000000..e4813ee --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsLowerThanOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.IsLowerThanOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Lower Than Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class IsLowerThanOperatorImpl extends LogicalOperatorImpl implements IsLowerThanOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsLowerThanOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_LOWER_THAN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "<"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_LOWER_THAN_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsLowerThanOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/IsOnImpl.java b/rba.model.core/src/rba/core/impl/IsOnImpl.java new file mode 100644 index 0000000..2894799 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsOnImpl.java @@ -0,0 +1,69 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.IsOn; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is On</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class IsOnImpl extends SceneOperatorImpl implements IsOn { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsOnImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_ON; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".isOn()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_ON___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.IS_ON___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // IsOnImpl diff --git a/rba.model.core/src/rba/core/impl/IsTranslatedToImpl.java b/rba.model.core/src/rba/core/impl/IsTranslatedToImpl.java new file mode 100644 index 0000000..fe93499 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsTranslatedToImpl.java @@ -0,0 +1,191 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.AllocatableOperator;
+import rba.core.AllocatedContent;
+import rba.core.AndOperator;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.IsTranslatedTo;
+import rba.core.NotOperator;
+import rba.core.ObjectCompare;
+import rba.core.ObjectReference;
+import rba.core.Operator;
+import rba.core.PreviousModifier;
+import rba.core.RBACoreFactory;
+import rba.core.RBACorePackage;
+import rba.core.SugarExpression;
+import rba.core.SugarExpressionBase;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Translated To</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class IsTranslatedToImpl extends AllocatableOperatorImpl implements IsTranslatedTo {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected IsTranslatedToImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.IS_TRANSLATED_TO;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".isTranslatedTo";
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuilder expressionText = new StringBuilder();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(getSymbol());
+ expressionText.append("(");
+ expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(")");
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean canExpand() {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Expression getExpanded() {
+ AndOperator AND = RBACoreFactory.eINSTANCE.createAndOperator();
+ NotOperator not = RBACoreFactory.eINSTANCE.createNotOperator();
+ ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare();
+ AllocatedContent content = RBACoreFactory.eINSTANCE.createAllocatedContent();
+ PreviousModifier preModifier = RBACoreFactory.eINSTANCE.createPreviousModifier();
+
+ preModifier.setObjReference((ObjectReference) org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0)));
+ content.getOperand().add(preModifier);
+ equal.getOperand().add(content);
+ equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1)));
+ not.getOperand().add(equal);
+ AND.getOperand().add(not);
+
+ content = RBACoreFactory.eINSTANCE.createAllocatedContent();
+ equal = RBACoreFactory.eINSTANCE.createObjectCompare();
+
+ content.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(0)));
+ equal.getOperand().add(content);
+ equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(getOperand().get(1)));
+
+ AND.getOperand().add(equal);
+ return AND;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.IS_TRANSLATED_TO___GET_UNDERLYING_TYPE;
+ case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT:
+ return RBACorePackage.IS_TRANSLATED_TO___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.IS_TRANSLATED_TO___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == AllocatableOperator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.ALLOCATABLE_OPERATOR___GET_EXPRESSION_TEXT:
+ return RBACorePackage.IS_TRANSLATED_TO___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == SugarExpression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND:
+ return RBACorePackage.IS_TRANSLATED_TO___CAN_EXPAND;
+ case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED:
+ return RBACorePackage.IS_TRANSLATED_TO___GET_EXPANDED;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == SugarExpressionBase.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND:
+ return RBACorePackage.IS_TRANSLATED_TO___CAN_EXPAND;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.IS_TRANSLATED_TO___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.IS_TRANSLATED_TO___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.IS_TRANSLATED_TO___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ case RBACorePackage.IS_TRANSLATED_TO___CAN_EXPAND:
+ return canExpand();
+ case RBACorePackage.IS_TRANSLATED_TO___GET_EXPANDED:
+ return getExpanded();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // IsTranslatedToImpl
diff --git a/rba.model.core/src/rba/core/impl/IsTypeOfImpl.java b/rba.model.core/src/rba/core/impl/IsTypeOfImpl.java new file mode 100644 index 0000000..2174a0b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/IsTypeOfImpl.java @@ -0,0 +1,202 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import rba.core.ExpressionType; +import rba.core.IsTypeOf; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Is Type Of</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.IsTypeOfImpl#getTagName <em>Tag Name</em>}</li> + * </ul> + * + * @generated + */ +public class IsTypeOfImpl extends OperatorImpl implements IsTypeOf { + /** + * The default value of the '{@link #getTagName() <em>Tag Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getTagName() + * @generated + * @ordered + */ + protected static final String TAG_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTagName() <em>Tag Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getTagName() + * @generated + * @ordered + */ + protected String tagName = TAG_NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected IsTypeOfImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.IS_TYPE_OF; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getTagName() { + return tagName; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setTagName(String newTagName) { + String oldTagName = tagName; + tagName = newTagName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.IS_TYPE_OF__TAG_NAME, oldTagName, + tagName)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("("); + expressionText.append(tagName != null ? tagName : ""); + expressionText.append(")"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".isTypeOf"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.IS_TYPE_OF__TAG_NAME: + return getTagName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.IS_TYPE_OF__TAG_NAME: + setTagName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.IS_TYPE_OF__TAG_NAME: + setTagName(TAG_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.IS_TYPE_OF__TAG_NAME: + return TAG_NAME_EDEFAULT == null ? tagName != null : !TAG_NAME_EDEFAULT.equals(tagName); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.IS_TYPE_OF___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.IS_TYPE_OF___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.IS_TYPE_OF___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (tagName: "); + result.append(tagName); + result.append(')'); + return result.toString(); + } + +} // IsTypeOfImpl diff --git a/rba.model.core/src/rba/core/impl/LambdaContextImpl.java b/rba.model.core/src/rba/core/impl/LambdaContextImpl.java new file mode 100644 index 0000000..49b5291 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LambdaContextImpl.java @@ -0,0 +1,224 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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 rba.core.ExpressionType; +import rba.core.LambdaContext; +import rba.core.LambdaExpression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Lambda Context</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.LambdaContextImpl#getLambda <em>Lambda</em>}</li> + * </ul> + * + * @generated + */ +public abstract class LambdaContextImpl extends SetOperatorImpl implements LambdaContext { + /** + * The cached value of the '{@link #getLambda() <em>Lambda</em>}' containment reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getLambda() + * @generated + * @ordered + */ + protected LambdaExpression lambda; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected LambdaContextImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.LAMBDA_CONTEXT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LambdaExpression getLambda() { + return lambda; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetLambda(LambdaExpression newLambda, NotificationChain msgs) { + LambdaExpression oldLambda = lambda; + lambda = newLambda; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.LAMBDA_CONTEXT__LAMBDA, oldLambda, newLambda); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setLambda(LambdaExpression newLambda) { + if (newLambda != lambda) { + NotificationChain msgs = null; + if (lambda != null) + msgs = ((InternalEObject) lambda).eInverseRemove(this, RBACorePackage.LAMBDA_EXPRESSION__CONTEXT, + LambdaExpression.class, msgs); + if (newLambda != null) + msgs = ((InternalEObject) newLambda).eInverseAdd(this, RBACorePackage.LAMBDA_EXPRESSION__CONTEXT, + LambdaExpression.class, msgs); + msgs = basicSetLambda(newLambda, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LAMBDA_CONTEXT__LAMBDA, newLambda, + newLambda)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getContextType() { + if (!getOperand().isEmpty()) { + rba.core.Expression first = getOperand().get(0); + if (first.getType() == ExpressionType.SET_OF_CONTENT) { + return ExpressionType.CONTENT; + } else if (first.getType() == ExpressionType.SET_OF_AREA) { + return ExpressionType.AREA; + } else if (first.getType() == ExpressionType.SET_OF_ZONE) { + return ExpressionType.ZONE; + } else if (first.getType() == ExpressionType.SET_OF_SOUND) { + return ExpressionType.SOUND; + } else { + return first.getType(); + } + } + + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + if (lambda != null) + msgs = ((InternalEObject) lambda).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.LAMBDA_CONTEXT__LAMBDA, null, msgs); + return basicSetLambda((LambdaExpression) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + return basicSetLambda(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + return getLambda(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + setLambda((LambdaExpression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + setLambda((LambdaExpression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.LAMBDA_CONTEXT__LAMBDA: + return lambda != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.LAMBDA_CONTEXT___GET_CONTEXT_TYPE: + return getContextType(); + } + return super.eInvoke(operationID, arguments); + } + +} // LambdaContextImpl diff --git a/rba.model.core/src/rba/core/impl/LambdaExpressionImpl.java b/rba.model.core/src/rba/core/impl/LambdaExpressionImpl.java new file mode 100644 index 0000000..7828524 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LambdaExpressionImpl.java @@ -0,0 +1,370 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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.EcoreUtil; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.LambdaContext; +import rba.core.LambdaExpression; +import rba.core.RBACorePackage; +import rba.core.Variable; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Lambda Expression</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.LambdaExpressionImpl#getContext <em>Context</em>}</li> + * <li>{@link rba.core.impl.LambdaExpressionImpl#getX <em>X</em>}</li> + * <li>{@link rba.core.impl.LambdaExpressionImpl#getBodyText <em>Body Text</em>}</li> + * </ul> + * + * @generated + */ +public class LambdaExpressionImpl extends ExpressionImpl implements LambdaExpression { + /** + * The cached value of the '{@link #getX() <em>X</em>}' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getX() + * @generated + * @ordered + */ + protected Variable x; + + /** + * The cached value of the '{@link #getBodyText() <em>Body Text</em>}' containment reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getBodyText() + * @generated + * @ordered + */ + protected Expression bodyText; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected LambdaExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.LAMBDA_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LambdaContext getContext() { + if (eContainerFeatureID() != RBACorePackage.LAMBDA_EXPRESSION__CONTEXT) + return null; + return (LambdaContext) eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetContext(LambdaContext newContext, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newContext, RBACorePackage.LAMBDA_EXPRESSION__CONTEXT, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setContext(LambdaContext newContext) { + if (newContext != eInternalContainer() + || (eContainerFeatureID() != RBACorePackage.LAMBDA_EXPRESSION__CONTEXT && newContext != null)) { + if (EcoreUtil.isAncestor(this, newContext)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newContext != null) + msgs = ((InternalEObject) newContext).eInverseAdd(this, RBACorePackage.LAMBDA_CONTEXT__LAMBDA, + LambdaContext.class, msgs); + msgs = basicSetContext(newContext, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LAMBDA_EXPRESSION__CONTEXT, newContext, + newContext)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Variable getX() { + return x; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetX(Variable newX, NotificationChain msgs) { + Variable oldX = x; + x = newX; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.LAMBDA_EXPRESSION__X, oldX, newX); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setX(Variable newX) { + if (newX != x) { + NotificationChain msgs = null; + if (x != null) + msgs = ((InternalEObject) x).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.LAMBDA_EXPRESSION__X, null, msgs); + if (newX != null) + msgs = ((InternalEObject) newX).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.LAMBDA_EXPRESSION__X, null, msgs); + msgs = basicSetX(newX, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LAMBDA_EXPRESSION__X, newX, newX)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public Expression getBodyText() { + if (bodyText != null) + bodyText.getLetStatements().addAll(getLetStatements()); + return bodyText; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetBodyText(Expression newBodyText, NotificationChain msgs) { + Expression oldBodyText = bodyText; + bodyText = newBodyText; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT, oldBodyText, newBodyText); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setBodyText(Expression newBodyText) { + if (newBodyText != bodyText) { + NotificationChain msgs = null; + if (bodyText != null) + msgs = ((InternalEObject) bodyText).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT, null, msgs); + if (newBodyText != null) + msgs = ((InternalEObject) newBodyText).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT, null, msgs); + msgs = basicSetBodyText(newBodyText, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT, + newBodyText, newBodyText)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + expressionText.append("{ "); + expressionText.append(x != null ? x.getName() : "[Invalid_Expression]"); + expressionText.append(" | "); + getLetStatements().forEach(let -> expressionText.append(let)); + expressionText.append(bodyText != null ? bodyText.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" }"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.LAMBDA; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetContext((LambdaContext) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + return basicSetContext(null, msgs); + case RBACorePackage.LAMBDA_EXPRESSION__X: + return basicSetX(null, msgs); + case RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT: + return basicSetBodyText(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + return eInternalContainer().eInverseRemove(this, RBACorePackage.LAMBDA_CONTEXT__LAMBDA, LambdaContext.class, + msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + return getContext(); + case RBACorePackage.LAMBDA_EXPRESSION__X: + return getX(); + case RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT: + return getBodyText(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + setContext((LambdaContext) newValue); + return; + case RBACorePackage.LAMBDA_EXPRESSION__X: + setX((Variable) newValue); + return; + case RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT: + setBodyText((Expression) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + setContext((LambdaContext) null); + return; + case RBACorePackage.LAMBDA_EXPRESSION__X: + setX((Variable) null); + return; + case RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT: + setBodyText((Expression) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.LAMBDA_EXPRESSION__CONTEXT: + return getContext() != null; + case RBACorePackage.LAMBDA_EXPRESSION__X: + return x != null; + case RBACorePackage.LAMBDA_EXPRESSION__BODY_TEXT: + return bodyText != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.LAMBDA_EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.LAMBDA_EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // LambdaExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/LetStatementImpl.java b/rba.model.core/src/rba/core/impl/LetStatementImpl.java new file mode 100644 index 0000000..53f62aa --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LetStatementImpl.java @@ -0,0 +1,268 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+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 rba.core.Expression;
+import rba.core.LetStatement;
+import rba.core.RBACorePackage;
+import rba.core.Variable;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Let Statement</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link rba.core.impl.LetStatementImpl#getVariable <em>Variable</em>}</li>
+ * <li>{@link rba.core.impl.LetStatementImpl#getBody <em>Body</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class LetStatementImpl extends ModelElementImpl implements LetStatement {
+ /**
+ * The cached value of the '{@link #getVariable() <em>Variable</em>}' containment reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getVariable()
+ * @generated
+ * @ordered
+ */
+ protected Variable variable;
+
+ /**
+ * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getBody()
+ * @generated
+ * @ordered
+ */
+ protected Expression body;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected LetStatementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.LET_STATEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Variable getVariable() {
+ return variable;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetVariable(Variable newVariable, NotificationChain msgs) {
+ Variable oldVariable = variable;
+ variable = newVariable;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ RBACorePackage.LET_STATEMENT__VARIABLE, oldVariable, newVariable);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVariable(Variable newVariable) {
+ if (newVariable != variable) {
+ NotificationChain msgs = null;
+ if (variable != null)
+ msgs = ((InternalEObject) variable).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE - RBACorePackage.LET_STATEMENT__VARIABLE, null, msgs);
+ if (newVariable != null)
+ msgs = ((InternalEObject) newVariable).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE - RBACorePackage.LET_STATEMENT__VARIABLE, null, msgs);
+ msgs = basicSetVariable(newVariable, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LET_STATEMENT__VARIABLE, newVariable,
+ newVariable));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getBody() {
+ return body;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) {
+ Expression oldBody = body;
+ body = newBody;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ RBACorePackage.LET_STATEMENT__BODY, oldBody, newBody);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBody(Expression newBody) {
+ if (newBody != body) {
+ NotificationChain msgs = null;
+ if (body != null)
+ msgs = ((InternalEObject) body).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE - RBACorePackage.LET_STATEMENT__BODY, null, msgs);
+ if (newBody != null)
+ msgs = ((InternalEObject) newBody).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE - RBACorePackage.LET_STATEMENT__BODY, null, msgs);
+ msgs = basicSetBody(newBody, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LET_STATEMENT__BODY, newBody,
+ newBody));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ StringBuilder ret = new StringBuilder();
+ ret.append("let "); //$NON-NLS-1$
+ ret.append(getVariable().getName());
+ ret.append("= "); //$NON-NLS-1$
+ ret.append(getBody().getExpressionText());
+ return ret.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RBACorePackage.LET_STATEMENT__VARIABLE:
+ return basicSetVariable(null, msgs);
+ case RBACorePackage.LET_STATEMENT__BODY:
+ return basicSetBody(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RBACorePackage.LET_STATEMENT__VARIABLE:
+ return getVariable();
+ case RBACorePackage.LET_STATEMENT__BODY:
+ return getBody();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RBACorePackage.LET_STATEMENT__VARIABLE:
+ setVariable((Variable) newValue);
+ return;
+ case RBACorePackage.LET_STATEMENT__BODY:
+ setBody((Expression) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RBACorePackage.LET_STATEMENT__VARIABLE:
+ setVariable((Variable) null);
+ return;
+ case RBACorePackage.LET_STATEMENT__BODY:
+ setBody((Expression) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RBACorePackage.LET_STATEMENT__VARIABLE:
+ return variable != null;
+ case RBACorePackage.LET_STATEMENT__BODY:
+ return body != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.LET_STATEMENT___TO_STRING:
+ return toString();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // LetStatementImpl
diff --git a/rba.model.core/src/rba/core/impl/LogicalOperatorImpl.java b/rba.model.core/src/rba/core/impl/LogicalOperatorImpl.java new file mode 100644 index 0000000..c919cba --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LogicalOperatorImpl.java @@ -0,0 +1,83 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.LogicalOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Logical Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class LogicalOperatorImpl extends OperatorImpl implements LogicalOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected LogicalOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.LOGICAL_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append("("); + for (int i = 0; i < expressions.size(); i++) { + rba.core.Expression expression = expressions.get(i); + expressionText.append(expression.getExpressionText()); + if (i == expressions.size() - 1) { + expressionText.append(")"); + } else { + expressionText.append(" "); + expressionText.append(getSymbol()); + expressionText.append(" "); + } + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.LOGICAL_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.LOGICAL_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // LogicalOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/LoserTypeExpressionImpl.java b/rba.model.core/src/rba/core/impl/LoserTypeExpressionImpl.java new file mode 100644 index 0000000..1e5234e --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LoserTypeExpressionImpl.java @@ -0,0 +1,192 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.LoserType; +import rba.core.LoserTypeExpression; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Loser Type Expression</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.LoserTypeExpressionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class LoserTypeExpressionImpl extends EnumExpressionImpl implements LoserTypeExpression { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final LoserType VALUE_EDEFAULT = LoserType.NEVER_GIVEUP; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected LoserType value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected LoserTypeExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.LOSER_TYPE_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LoserType getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setValue(LoserType newValue) { + LoserType oldValue = value; + value = newValue == null ? VALUE_EDEFAULT : newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.LOSER_TYPE_EXPRESSION__VALUE, oldValue, + value)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + if (value instanceof LoserType) { + return value.getName(); + } else { + return "[Invalid_Expression]"; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Enumerator getExpressionValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.LOSER_TYPE_EXPRESSION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.LOSER_TYPE_EXPRESSION__VALUE: + setValue((LoserType) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.LOSER_TYPE_EXPRESSION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.LOSER_TYPE_EXPRESSION__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.LOSER_TYPE_EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.LOSER_TYPE_EXPRESSION___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} // LoserTypeExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/LowerThanOperatorImpl.java b/rba.model.core/src/rba/core/impl/LowerThanOperatorImpl.java new file mode 100644 index 0000000..ec69740 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/LowerThanOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.LowerThanOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Lower Than Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class LowerThanOperatorImpl extends ComparisonOperatorImpl implements LowerThanOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected LowerThanOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.LOWER_THAN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "<"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.LOWER_THAN_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // LowerThanOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/MaxOperatorImpl.java b/rba.model.core/src/rba/core/impl/MaxOperatorImpl.java new file mode 100644 index 0000000..681b102 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/MaxOperatorImpl.java @@ -0,0 +1,87 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.MaxOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Max Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class MaxOperatorImpl extends LambdaContextImpl implements MaxOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected MaxOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MAX_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("{ "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" }"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".max"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return getContextType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.MAX_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.MAX_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.MAX_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // MaxOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/MaxValueImpl.java b/rba.model.core/src/rba/core/impl/MaxValueImpl.java new file mode 100644 index 0000000..ec458be --- /dev/null +++ b/rba.model.core/src/rba/core/impl/MaxValueImpl.java @@ -0,0 +1,68 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.MaxValue; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Max Value</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class MaxValueImpl extends ValueExpressionImpl implements MaxValue { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected MaxValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MAX_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return "MAX"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + return 9999; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.MAX_VALUE___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.MAX_VALUE___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + +} // MaxValueImpl diff --git a/rba.model.core/src/rba/core/impl/MinOperatorImpl.java b/rba.model.core/src/rba/core/impl/MinOperatorImpl.java new file mode 100644 index 0000000..74f572b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/MinOperatorImpl.java @@ -0,0 +1,87 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.MinOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Min Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class MinOperatorImpl extends LambdaContextImpl implements MinOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected MinOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MIN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("{ "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" }"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".min"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return getContextType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.MIN_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.MIN_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.MIN_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // MinOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/MinValueImpl.java b/rba.model.core/src/rba/core/impl/MinValueImpl.java new file mode 100644 index 0000000..ad28949 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/MinValueImpl.java @@ -0,0 +1,68 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.MinValue; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Min Value</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class MinValueImpl extends ValueExpressionImpl implements MinValue { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected MinValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MIN_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return "MIN"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.MIN_VALUE___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.MIN_VALUE___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + +} // MinValueImpl diff --git a/rba.model.core/src/rba/core/impl/ModelElementImpl.java b/rba.model.core/src/rba/core/impl/ModelElementImpl.java new file mode 100644 index 0000000..6e77878 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ModelElementImpl.java @@ -0,0 +1,154 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import rba.core.ModelElement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Model Element</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ModelElementImpl#getDescription <em>Description</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ModelElementImpl extends MinimalEObjectImpl.Container implements ModelElement { + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ModelElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MODEL_ELEMENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.MODEL_ELEMENT__DESCRIPTION, + oldDescription, description)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.MODEL_ELEMENT__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.MODEL_ELEMENT__DESCRIPTION: + setDescription((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.MODEL_ELEMENT__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.MODEL_ELEMENT__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} // ModelElementImpl diff --git a/rba.model.core/src/rba/core/impl/MuchGreaterThanOperatorImpl.java b/rba.model.core/src/rba/core/impl/MuchGreaterThanOperatorImpl.java new file mode 100644 index 0000000..c6be637 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/MuchGreaterThanOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.MuchGreaterThanOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Much Greater Than Operator</b></em>'. <!-- end-user-doc + * --> + * @generated + */ +public class MuchGreaterThanOperatorImpl extends ComparisonOperatorImpl implements MuchGreaterThanOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected MuchGreaterThanOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.MUCH_GREATER_THAN_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ">>"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.MUCH_GREATER_THAN_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // MuchGreaterThanOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/NamedElementImpl.java b/rba.model.core/src/rba/core/impl/NamedElementImpl.java new file mode 100644 index 0000000..d3b3041 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/NamedElementImpl.java @@ -0,0 +1,150 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.NamedElement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Named Element</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.NamedElementImpl#getName <em>Name</em>}</li> + * </ul> + * + * @generated + */ +public abstract class NamedElementImpl extends ModelElementImpl implements NamedElement { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected NamedElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.NAMED_ELEMENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.NAMED_ELEMENT__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.NAMED_ELEMENT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.NAMED_ELEMENT__NAME: + setName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.NAMED_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.NAMED_ELEMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // NamedElementImpl diff --git a/rba.model.core/src/rba/core/impl/NoneValueImpl.java b/rba.model.core/src/rba/core/impl/NoneValueImpl.java new file mode 100644 index 0000000..90783ba --- /dev/null +++ b/rba.model.core/src/rba/core/impl/NoneValueImpl.java @@ -0,0 +1,68 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.NoneValue; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>None Value</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class NoneValueImpl extends ValueExpressionImpl implements NoneValue { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected NoneValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.NONE_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return "NONE"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + return -1; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.NONE_VALUE___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.NONE_VALUE___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + +} // NoneValueImpl diff --git a/rba.model.core/src/rba/core/impl/NotOperatorImpl.java b/rba.model.core/src/rba/core/impl/NotOperatorImpl.java new file mode 100644 index 0000000..a53a968 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/NotOperatorImpl.java @@ -0,0 +1,110 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.Expression; +import rba.core.LogicalOperator; +import rba.core.NotOperator; +import rba.core.Operator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Not Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class NotOperatorImpl extends LogicalOperatorImpl implements NotOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected NotOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.NOT_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "!"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(getSymbol()); + expressionText.append("("); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(")"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == Expression.class) { + switch (baseOperationID) { + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return RBACorePackage.NOT_OPERATOR___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == Operator.class) { + switch (baseOperationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return RBACorePackage.NOT_OPERATOR___GET_SYMBOL; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + if (baseClass == LogicalOperator.class) { + switch (baseOperationID) { + case RBACorePackage.LOGICAL_OPERATOR___GET_EXPRESSION_TEXT: + return RBACorePackage.NOT_OPERATOR___GET_EXPRESSION_TEXT; + default: + return super.eDerivedOperationID(baseOperationID, baseClass); + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.NOT_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.NOT_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // NotOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/NullExpressionImpl.java b/rba.model.core/src/rba/core/impl/NullExpressionImpl.java new file mode 100644 index 0000000..81286db --- /dev/null +++ b/rba.model.core/src/rba/core/impl/NullExpressionImpl.java @@ -0,0 +1,76 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.ExpressionType;
+import rba.core.NullExpression;
+import rba.core.RBACorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Null Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class NullExpressionImpl extends ExpressionImpl implements NullExpression {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NullExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.NULL_EXPRESSION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.NULL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ return "NULL";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.NULL_EXPRESSION___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.NULL_EXPRESSION___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} //NullExpressionImpl
diff --git a/rba.model.core/src/rba/core/impl/ObjectCompareImpl.java b/rba.model.core/src/rba/core/impl/ObjectCompareImpl.java new file mode 100644 index 0000000..cb440e7 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ObjectCompareImpl.java @@ -0,0 +1,86 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.ObjectCompare; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Object Compare</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ObjectCompareImpl extends OperatorImpl implements ObjectCompare { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ObjectCompareImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.OBJECT_COMPARE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "=="; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuilder expressionText = new StringBuilder(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" "); + expressionText.append(getSymbol()); + expressionText.append(" "); + expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.OBJECT_COMPARE___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.OBJECT_COMPARE___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.OBJECT_COMPARE___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ObjectCompareImpl diff --git a/rba.model.core/src/rba/core/impl/ObjectCompareNotImpl.java b/rba.model.core/src/rba/core/impl/ObjectCompareNotImpl.java new file mode 100644 index 0000000..c974d58 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ObjectCompareNotImpl.java @@ -0,0 +1,160 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import rba.core.Expression;
+import rba.core.ExpressionType;
+import rba.core.NotOperator;
+import rba.core.ObjectCompare;
+import rba.core.ObjectCompareNot;
+import rba.core.Operator;
+import rba.core.RBACoreFactory;
+import rba.core.RBACorePackage;
+import rba.core.SugarExpression;
+import rba.core.SugarExpressionBase;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Object Compare Not</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ObjectCompareNotImpl extends OperatorImpl implements ObjectCompareNot {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected ObjectCompareNotImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.OBJECT_COMPARE_NOT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return "!=";
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExpressionText() {
+ StringBuilder expressionText = new StringBuilder();
+ EList<rba.core.Expression> expressions = getOperand();
+ expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]");
+ expressionText.append(" ");
+ expressionText.append(getSymbol());
+ expressionText.append(" ");
+ expressionText.append(expressions.size() > 1 ? expressions.get(1).getExpressionText() : "[Invalid_Expression]");
+ return expressionText.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean canExpand() {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Expression getExpanded() {
+ NotOperator not = RBACoreFactory.eINSTANCE.createNotOperator();
+ ObjectCompare equal = RBACoreFactory.eINSTANCE.createObjectCompare();
+ getOperand().forEach(o -> equal.getOperand().add(org.eclipse.emf.ecore.util.EcoreUtil.copy(o)));
+ not.getOperand().add(equal);
+ return not;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == Expression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE:
+ return RBACorePackage.OBJECT_COMPARE_NOT___GET_UNDERLYING_TYPE;
+ case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT:
+ return RBACorePackage.OBJECT_COMPARE_NOT___GET_EXPRESSION_TEXT;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == Operator.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.OPERATOR___GET_SYMBOL:
+ return RBACorePackage.OBJECT_COMPARE_NOT___GET_SYMBOL;
+ default:
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+ }
+ if (baseClass == SugarExpression.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION___CAN_EXPAND:
+ return RBACorePackage.OBJECT_COMPARE_NOT___CAN_EXPAND;
+ case RBACorePackage.SUGAR_EXPRESSION___GET_EXPANDED:
+ return RBACorePackage.OBJECT_COMPARE_NOT___GET_EXPANDED;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == SugarExpressionBase.class) {
+ switch (baseOperationID) {
+ case RBACorePackage.SUGAR_EXPRESSION_BASE___CAN_EXPAND:
+ return RBACorePackage.OBJECT_COMPARE_NOT___CAN_EXPAND;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.OBJECT_COMPARE_NOT___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.OBJECT_COMPARE_NOT___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ case RBACorePackage.OBJECT_COMPARE_NOT___GET_EXPRESSION_TEXT:
+ return getExpressionText();
+ case RBACorePackage.OBJECT_COMPARE_NOT___CAN_EXPAND:
+ return canExpand();
+ case RBACorePackage.OBJECT_COMPARE_NOT___GET_EXPANDED:
+ return getExpanded();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // ObjectCompareNotImpl
diff --git a/rba.model.core/src/rba/core/impl/ObjectReferenceImpl.java b/rba.model.core/src/rba/core/impl/ObjectReferenceImpl.java new file mode 100644 index 0000000..6d34cc5 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ObjectReferenceImpl.java @@ -0,0 +1,202 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; + +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 rba.core.AbstractProperty; +import rba.core.ContentState; +import rba.core.ExpressionType; +import rba.core.ObjectReference; +import rba.core.RBACorePackage; +import rba.core.RuleObject; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Object Reference</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ObjectReferenceImpl#getRefObject <em>Ref Object</em>}</li> + * </ul> + * + * @generated + */ +public class ObjectReferenceImpl extends ExpressionImpl implements ObjectReference { + /** + * The cached value of the '{@link #getRefObject() <em>Ref Object</em>}' reference. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getRefObject() + * @generated + * @ordered + */ + protected RuleObject refObject; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ObjectReferenceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.OBJECT_REFERENCE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RuleObject getRefObject() { + if (refObject != null && refObject.eIsProxy()) { + InternalEObject oldRefObject = (InternalEObject) refObject; + refObject = (RuleObject) eResolveProxy(oldRefObject); + if (refObject != oldRefObject) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + RBACorePackage.OBJECT_REFERENCE__REF_OBJECT, oldRefObject, refObject)); + } + } + return refObject; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RuleObject basicGetRefObject() { + return refObject; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setRefObject(RuleObject newRefObject) { + RuleObject oldRefObject = refObject; + refObject = newRefObject; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.OBJECT_REFERENCE__REF_OBJECT, + oldRefObject, refObject)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + RuleObject obj = getRefObject(); + if (obj != null) { + return obj.getExpressionType(); + } else { + return ExpressionType.VALUE; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + RuleObject obj = getRefObject(); + if (obj instanceof ContentState) { + ContentState state = (ContentState) obj; + expressionText.append(state.getOwner().getName() + "." + state.getName()); + } else if (obj instanceof AbstractProperty) { + AbstractProperty property = (AbstractProperty) obj; + expressionText.append(property.getOwner().getName() + "." + property.getName()); + } else { + expressionText.append(obj != null ? obj.getName() : "[Invalid_Expression]"); + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.OBJECT_REFERENCE__REF_OBJECT: + if (resolve) + return getRefObject(); + return basicGetRefObject(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.OBJECT_REFERENCE__REF_OBJECT: + setRefObject((RuleObject) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.OBJECT_REFERENCE__REF_OBJECT: + setRefObject((RuleObject) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.OBJECT_REFERENCE__REF_OBJECT: + return refObject != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.OBJECT_REFERENCE___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.OBJECT_REFERENCE___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ObjectReferenceImpl diff --git a/rba.model.core/src/rba/core/impl/OperatorImpl.java b/rba.model.core/src/rba/core/impl/OperatorImpl.java new file mode 100644 index 0000000..b57c3f0 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/OperatorImpl.java @@ -0,0 +1,165 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.Expression; +import rba.core.Operator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Operator</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.OperatorImpl#getOperand <em>Operand</em>}</li> + * </ul> + * + * @generated + */ +public abstract class OperatorImpl extends ExpressionImpl implements Operator { + /** + * The cached value of the '{@link #getOperand() <em>Operand</em>}' containment reference list. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getOperand() + * @generated + * @ordered + */ + protected EList<Expression> operand; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected OperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Expression> getOperand() { + if (operand == null) { + operand = new EObjectContainmentEList<Expression>(Expression.class, this, RBACorePackage.OPERATOR__OPERAND); + } + return operand; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.OPERATOR__OPERAND: + return ((InternalEList<?>) getOperand()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.OPERATOR__OPERAND: + return getOperand(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.OPERATOR__OPERAND: + getOperand().clear(); + getOperand().addAll((Collection<? extends Expression>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.OPERATOR__OPERAND: + getOperand().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.OPERATOR__OPERAND: + return operand != null && !operand.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // OperatorImpl diff --git a/rba.model.core/src/rba/core/impl/OrOperatorImpl.java b/rba.model.core/src/rba/core/impl/OrOperatorImpl.java new file mode 100644 index 0000000..f288df0 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/OrOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.OrOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Or Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class OrOperatorImpl extends LogicalOperatorImpl implements OrOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected OrOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.OR_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "OR"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.OR_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // OrOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/PackagableElementImpl.java b/rba.model.core/src/rba/core/impl/PackagableElementImpl.java new file mode 100644 index 0000000..de00f27 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/PackagableElementImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.PackagableElement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Packagable Element</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class PackagableElementImpl extends NamedElementImpl implements PackagableElement { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected PackagableElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PACKAGABLE_ELEMENT; + } + +} // PackagableElementImpl diff --git a/rba.model.core/src/rba/core/impl/PackageImpl.java b/rba.model.core/src/rba/core/impl/PackageImpl.java new file mode 100644 index 0000000..079ae9c --- /dev/null +++ b/rba.model.core/src/rba/core/impl/PackageImpl.java @@ -0,0 +1,139 @@ +/** + */ +package rba.core.impl; + +import java.util.Collection; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.PackagableElement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Package</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.PackageImpl#getPackagableelement <em>Packagableelement</em>}</li> + * </ul> + * + * @generated + */ +public class PackageImpl extends PackagableElementImpl implements rba.core.Package { + /** + * The cached value of the '{@link #getPackagableelement() <em>Packagableelement</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getPackagableelement() + * @generated + * @ordered + */ + protected EList<PackagableElement> packagableelement; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected PackageImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PACKAGE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<PackagableElement> getPackagableelement() { + if (packagableelement == null) { + packagableelement = new EObjectContainmentEList<PackagableElement>(PackagableElement.class, this, + RBACorePackage.PACKAGE__PACKAGABLEELEMENT); + } + return packagableelement; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.PACKAGE__PACKAGABLEELEMENT: + return ((InternalEList<?>) getPackagableelement()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.PACKAGE__PACKAGABLEELEMENT: + return getPackagableelement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.PACKAGE__PACKAGABLEELEMENT: + getPackagableelement().clear(); + getPackagableelement().addAll((Collection<? extends PackagableElement>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.PACKAGE__PACKAGABLEELEMENT: + getPackagableelement().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.PACKAGE__PACKAGABLEELEMENT: + return packagableelement != null && !packagableelement.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // PackageImpl diff --git a/rba.model.core/src/rba/core/impl/PlusOperatorImpl.java b/rba.model.core/src/rba/core/impl/PlusOperatorImpl.java new file mode 100644 index 0000000..ee73fb0 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/PlusOperatorImpl.java @@ -0,0 +1,58 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.PlusOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Plus Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class PlusOperatorImpl extends ArithmeticOperatorImpl implements PlusOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected PlusOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PLUS_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "+"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.PLUS_OPERATOR___GET_SYMBOL: + return getSymbol(); + } + return super.eInvoke(operationID, arguments); + } + +} // PlusOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/PreviousModifierImpl.java b/rba.model.core/src/rba/core/impl/PreviousModifierImpl.java new file mode 100644 index 0000000..c531187 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/PreviousModifierImpl.java @@ -0,0 +1,229 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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 rba.core.ExpressionType; +import rba.core.ObjectReference; +import rba.core.PreviousModifier; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Previous Modifier</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.PreviousModifierImpl#getObjReference <em>Obj Reference</em>}</li> + * </ul> + * + * @generated + */ +public class PreviousModifierImpl extends ExpressionImpl implements PreviousModifier { + /** + * The cached value of the '{@link #getObjReference() <em>Obj Reference</em>}' containment reference. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @see #getObjReference() + * @generated + * @ordered + */ + protected ObjectReference objReference; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected PreviousModifierImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PREVIOUS_MODIFIER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ObjectReference getObjReference() { + return objReference; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetObjReference(ObjectReference newObjReference, NotificationChain msgs) { + ObjectReference oldObjReference = objReference; + objReference = newObjReference; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE, oldObjReference, newObjReference); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setObjReference(ObjectReference newObjReference) { + if (newObjReference != objReference) { + NotificationChain msgs = null; + if (objReference != null) + msgs = ((InternalEObject) objReference).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE, null, msgs); + if (newObjReference != null) + msgs = ((InternalEObject) newObjReference).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE, null, msgs); + msgs = basicSetObjReference(newObjReference, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE, + newObjReference, newObjReference)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "(pre)"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + ObjectReference objReference = getObjReference(); + if (objReference != null) { + return objReference.getUnderlyingType(); + } else { + return ExpressionType.VALUE; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + if (getObjReference() != null && getObjReference().getRefObject() != null) { + ObjectReference reference = getObjReference(); + expressionText.append(getSymbol()); + expressionText.append(reference.getExpressionText()); + } else { + expressionText.append("[Invalid_Expression]"); + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE: + return basicSetObjReference(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE: + return getObjReference(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE: + setObjReference((ObjectReference) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE: + setObjReference((ObjectReference) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.PREVIOUS_MODIFIER__OBJ_REFERENCE: + return objReference != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.PREVIOUS_MODIFIER___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.PREVIOUS_MODIFIER___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.PREVIOUS_MODIFIER___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // PreviousModifierImpl diff --git a/rba.model.core/src/rba/core/impl/ProjectImpl.java b/rba.model.core/src/rba/core/impl/ProjectImpl.java new file mode 100644 index 0000000..6e62c3e --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ProjectImpl.java @@ -0,0 +1,233 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import rba.core.Project; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Project</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ProjectImpl#getVersion <em>Version</em>}</li> + * <li>{@link rba.core.impl.ProjectImpl#getDummyName <em>Dummy Name</em>}</li> + * </ul> + * + * @generated + */ +public class ProjectImpl extends PackageImpl implements Project { + /** + * The default value of the '{@link #getVersion() <em>Version</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getDummyName() <em>Dummy Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDummyName() + * @generated + * @ordered + */ + protected static final String DUMMY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDummyName() <em>Dummy Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDummyName() + * @generated + * @ordered + */ + protected String dummyName = DUMMY_NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ProjectImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PROJECT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getVersion() { + return version; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.PROJECT__VERSION, oldVersion, + version)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDummyName() { + return dummyName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDummyName(String newDummyName) { + String oldDummyName = dummyName; + dummyName = newDummyName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.PROJECT__DUMMY_NAME, oldDummyName, + dummyName)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getName() { + if (this.eResource() != null) { + String segments[] = this.eResource().getURI().toString().split("/"); + return segments[2]; + } else { + return this.name; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.PROJECT__VERSION: + return getVersion(); + case RBACorePackage.PROJECT__DUMMY_NAME: + return getDummyName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.PROJECT__VERSION: + setVersion((String) newValue); + return; + case RBACorePackage.PROJECT__DUMMY_NAME: + setDummyName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.PROJECT__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case RBACorePackage.PROJECT__DUMMY_NAME: + setDummyName(DUMMY_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.PROJECT__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case RBACorePackage.PROJECT__DUMMY_NAME: + return DUMMY_NAME_EDEFAULT == null ? dummyName != null : !DUMMY_NAME_EDEFAULT.equals(dummyName); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.PROJECT___GET_NAME: + return getName(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); + result.append(version); + result.append(", dummyName: "); + result.append(dummyName); + result.append(')'); + return result.toString(); + } + +} // ProjectImpl diff --git a/rba.model.core/src/rba/core/impl/PropertyOperatorImpl.java b/rba.model.core/src/rba/core/impl/PropertyOperatorImpl.java new file mode 100644 index 0000000..9f99cfb --- /dev/null +++ b/rba.model.core/src/rba/core/impl/PropertyOperatorImpl.java @@ -0,0 +1,73 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.PropertyOperator; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Property Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class PropertyOperatorImpl extends OperatorImpl implements PropertyOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected PropertyOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.PROPERTY_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.PROPERTY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.PROPERTY_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.PROPERTY_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // PropertyOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/RBACoreFactoryImpl.java b/rba.model.core/src/rba/core/impl/RBACoreFactoryImpl.java new file mode 100644 index 0000000..49b69a2 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/RBACoreFactoryImpl.java @@ -0,0 +1,958 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import rba.core.ActiveContents; +import rba.core.ActiveState; +import rba.core.AllocatedContent; +import rba.core.AndOperator; +import rba.core.ArbitrationPolicy; +import rba.core.ArbitrationPolicyExpression; +import rba.core.ComparisonAnd; +import rba.core.ComplexExpression; +import rba.core.Constraint; +import rba.core.ContentValue; +import rba.core.EqualToOperator; +import rba.core.ExistsOperator; +import rba.core.ExpressionType; +import rba.core.ForAllOperator; +import rba.core.GetAllocatables; +import rba.core.GetContentsList; +import rba.core.GetProperty; +import rba.core.GetState; +import rba.core.GreaterThanOperator; +import rba.core.HasBeenDisplayed; +import rba.core.HasComeEarlierThan; +import rba.core.HasComeLaterThan; +import rba.core.IfStatement; +import rba.core.ImpliesOperator; +import rba.core.IntegerProperty; +import rba.core.IntegerValue; +import rba.core.IsActive; +import rba.core.IsAllocatedTo; +import rba.core.IsChanged; +import rba.core.IsEqualToOperator; +import rba.core.IsGreaterThanEqualOperator; +import rba.core.IsGreaterThanOperator; +import rba.core.IsLowerThanEqualOperator; +import rba.core.IsLowerThanOperator; +import rba.core.IsOn; +import rba.core.IsTranslatedTo; +import rba.core.IsTypeOf; +import rba.core.LambdaExpression; +import rba.core.LetStatement; +import rba.core.LoserType; +import rba.core.LoserTypeExpression; +import rba.core.LowerThanOperator; +import rba.core.MaxOperator; +import rba.core.MaxValue; +import rba.core.MinOperator; +import rba.core.MinValue; +import rba.core.MuchGreaterThanOperator; +import rba.core.NoneValue; +import rba.core.NotOperator; +import rba.core.NullExpression; +import rba.core.ObjectCompare; +import rba.core.ObjectCompareNot; +import rba.core.ObjectReference; +import rba.core.OrOperator; +import rba.core.PlusOperator; +import rba.core.PreviousModifier; +import rba.core.Project; +import rba.core.RBACoreFactory; +import rba.core.RBACorePackage; +import rba.core.Scene; +import rba.core.SelectOperator; +import rba.core.SetOfOperator; +import rba.core.SizeOperator; +import rba.core.StandardValue; +import rba.core.StateValue; +import rba.core.Stereotype; +import rba.core.Tag; +import rba.core.ThatOfOperator; +import rba.core.Variable; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> + * @generated + */ +public class RBACoreFactoryImpl extends EFactoryImpl implements RBACoreFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public static RBACoreFactory init() { + try { + RBACoreFactory theRBACoreFactory = (RBACoreFactory) EPackage.Registry.INSTANCE + .getEFactory(RBACorePackage.eNS_URI); + if (theRBACoreFactory != null) { + return theRBACoreFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new RBACoreFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RBACoreFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case RBACorePackage.PROJECT: + return createProject(); + case RBACorePackage.PACKAGE: + return createPackage(); + case RBACorePackage.STEREOTYPE: + return createStereotype(); + case RBACorePackage.TAG: + return createTag(); + case RBACorePackage.SCENE: + return createScene(); + case RBACorePackage.INTEGER_PROPERTY: + return createIntegerProperty(); + case RBACorePackage.CONSTRAINT: + return createConstraint(); + case RBACorePackage.LET_STATEMENT: + return createLetStatement(); + case RBACorePackage.COMPLEX_EXPRESSION: + return createComplexExpression(); + case RBACorePackage.IS_TYPE_OF: + return createIsTypeOf(); + case RBACorePackage.OBJECT_REFERENCE: + return createObjectReference(); + case RBACorePackage.PREVIOUS_MODIFIER: + return createPreviousModifier(); + case RBACorePackage.GREATER_THAN_OPERATOR: + return createGreaterThanOperator(); + case RBACorePackage.MUCH_GREATER_THAN_OPERATOR: + return createMuchGreaterThanOperator(); + case RBACorePackage.LOWER_THAN_OPERATOR: + return createLowerThanOperator(); + case RBACorePackage.EQUAL_TO_OPERATOR: + return createEqualToOperator(); + case RBACorePackage.COMPARISON_AND: + return createComparisonAnd(); + case RBACorePackage.AND_OPERATOR: + return createAndOperator(); + case RBACorePackage.OR_OPERATOR: + return createOrOperator(); + case RBACorePackage.NOT_OPERATOR: + return createNotOperator(); + case RBACorePackage.IS_EQUAL_TO_OPERATOR: + return createIsEqualToOperator(); + case RBACorePackage.IS_GREATER_THAN_OPERATOR: + return createIsGreaterThanOperator(); + case RBACorePackage.IS_LOWER_THAN_OPERATOR: + return createIsLowerThanOperator(); + case RBACorePackage.IS_GREATER_THAN_EQUAL_OPERATOR: + return createIsGreaterThanEqualOperator(); + case RBACorePackage.IS_LOWER_THAN_EQUAL_OPERATOR: + return createIsLowerThanEqualOperator(); + case RBACorePackage.PLUS_OPERATOR: + return createPlusOperator(); + case RBACorePackage.IMPLIES_OPERATOR: + return createImpliesOperator(); + case RBACorePackage.IS_ACTIVE: + return createIsActive(); + case RBACorePackage.GET_ALLOCATABLES: + return createGetAllocatables(); + case RBACorePackage.HAS_BEEN_DISPLAYED: + return createHasBeenDisplayed(); + case RBACorePackage.ACTIVE_STATE: + return createActiveState(); + case RBACorePackage.OBJECT_COMPARE: + return createObjectCompare(); + case RBACorePackage.THAT_OF_OPERATOR: + return createThatOfOperator(); + case RBACorePackage.MAX_VALUE: + return createMaxValue(); + case RBACorePackage.MIN_VALUE: + return createMinValue(); + case RBACorePackage.NONE_VALUE: + return createNoneValue(); + case RBACorePackage.STANDARD_VALUE: + return createStandardValue(); + case RBACorePackage.INTEGER_VALUE: + return createIntegerValue(); + case RBACorePackage.LOSER_TYPE_EXPRESSION: + return createLoserTypeExpression(); + case RBACorePackage.ARBITRATION_POLICY_EXPRESSION: + return createArbitrationPolicyExpression(); + case RBACorePackage.SIZE_OPERATOR: + return createSizeOperator(); + case RBACorePackage.EXISTS_OPERATOR: + return createExistsOperator(); + case RBACorePackage.FOR_ALL_OPERATOR: + return createForAllOperator(); + case RBACorePackage.MAX_OPERATOR: + return createMaxOperator(); + case RBACorePackage.MIN_OPERATOR: + return createMinOperator(); + case RBACorePackage.SELECT_OPERATOR: + return createSelectOperator(); + case RBACorePackage.SET_OF_OPERATOR: + return createSetOfOperator(); + case RBACorePackage.LAMBDA_EXPRESSION: + return createLambdaExpression(); + case RBACorePackage.VARIABLE: + return createVariable(); + case RBACorePackage.IF_STATEMENT: + return createIfStatement(); + case RBACorePackage.IS_ON: + return createIsOn(); + case RBACorePackage.ALLOCATED_CONTENT: + return createAllocatedContent(); + case RBACorePackage.CONTENT_VALUE: + return createContentValue(); + case RBACorePackage.GET_CONTENTS_LIST: + return createGetContentsList(); + case RBACorePackage.ACTIVE_CONTENTS: + return createActiveContents(); + case RBACorePackage.GET_PROPERTY: + return createGetProperty(); + case RBACorePackage.STATE_VALUE: + return createStateValue(); + case RBACorePackage.HAS_COME_LATER_THAN: + return createHasComeLaterThan(); + case RBACorePackage.HAS_COME_EARLIER_THAN: + return createHasComeEarlierThan(); + case RBACorePackage.OBJECT_COMPARE_NOT: + return createObjectCompareNot(); + case RBACorePackage.IS_ALLOCATED_TO: + return createIsAllocatedTo(); + case RBACorePackage.IS_CHANGED: + return createIsChanged(); + case RBACorePackage.IS_TRANSLATED_TO: + return createIsTranslatedTo(); + case RBACorePackage.GET_STATE: + return createGetState(); + case RBACorePackage.NULL_EXPRESSION: + return createNullExpression(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case RBACorePackage.ARBITRATION_POLICY: + return createArbitrationPolicyFromString(eDataType, initialValue); + case RBACorePackage.EXPRESSION_TYPE: + return createExpressionTypeFromString(eDataType, initialValue); + case RBACorePackage.LOSER_TYPE: + return createLoserTypeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case RBACorePackage.ARBITRATION_POLICY: + return convertArbitrationPolicyToString(eDataType, instanceValue); + case RBACorePackage.EXPRESSION_TYPE: + return convertExpressionTypeToString(eDataType, instanceValue); + case RBACorePackage.LOSER_TYPE: + return convertLoserTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Project createProject() { + ProjectImpl project = new ProjectImpl(); + return project; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public rba.core.Package createPackage() { + PackageImpl package_ = new PackageImpl(); + return package_; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Stereotype createStereotype() { + StereotypeImpl stereotype = new StereotypeImpl(); + return stereotype; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Tag createTag() { + TagImpl tag = new TagImpl(); + return tag; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Scene createScene() { + SceneImpl scene = new SceneImpl(); + return scene; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IntegerProperty createIntegerProperty() { + IntegerPropertyImpl integerProperty = new IntegerPropertyImpl(); + return integerProperty; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Constraint createConstraint() { + ConstraintImpl constraint = new ConstraintImpl(); + return constraint; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LetStatement createLetStatement() { + LetStatementImpl letStatement = new LetStatementImpl(); + return letStatement; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ComplexExpression createComplexExpression() { + ComplexExpressionImpl complexExpression = new ComplexExpressionImpl(); + return complexExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsTypeOf createIsTypeOf() { + IsTypeOfImpl isTypeOf = new IsTypeOfImpl(); + return isTypeOf; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ObjectReference createObjectReference() { + ObjectReferenceImpl objectReference = new ObjectReferenceImpl(); + return objectReference; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public PreviousModifier createPreviousModifier() { + PreviousModifierImpl previousModifier = new PreviousModifierImpl(); + return previousModifier; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public GreaterThanOperator createGreaterThanOperator() { + GreaterThanOperatorImpl greaterThanOperator = new GreaterThanOperatorImpl(); + return greaterThanOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MuchGreaterThanOperator createMuchGreaterThanOperator() { + MuchGreaterThanOperatorImpl muchGreaterThanOperator = new MuchGreaterThanOperatorImpl(); + return muchGreaterThanOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LowerThanOperator createLowerThanOperator() { + LowerThanOperatorImpl lowerThanOperator = new LowerThanOperatorImpl(); + return lowerThanOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EqualToOperator createEqualToOperator() { + EqualToOperatorImpl equalToOperator = new EqualToOperatorImpl(); + return equalToOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ComparisonAnd createComparisonAnd() { + ComparisonAndImpl comparisonAnd = new ComparisonAndImpl(); + return comparisonAnd; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AndOperator createAndOperator() { + AndOperatorImpl andOperator = new AndOperatorImpl(); + return andOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public OrOperator createOrOperator() { + OrOperatorImpl orOperator = new OrOperatorImpl(); + return orOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NotOperator createNotOperator() { + NotOperatorImpl notOperator = new NotOperatorImpl(); + return notOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsEqualToOperator createIsEqualToOperator() { + IsEqualToOperatorImpl isEqualToOperator = new IsEqualToOperatorImpl(); + return isEqualToOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsGreaterThanOperator createIsGreaterThanOperator() { + IsGreaterThanOperatorImpl isGreaterThanOperator = new IsGreaterThanOperatorImpl(); + return isGreaterThanOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsLowerThanOperator createIsLowerThanOperator() { + IsLowerThanOperatorImpl isLowerThanOperator = new IsLowerThanOperatorImpl(); + return isLowerThanOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsGreaterThanEqualOperator createIsGreaterThanEqualOperator() { + IsGreaterThanEqualOperatorImpl isGreaterThanEqualOperator = new IsGreaterThanEqualOperatorImpl(); + return isGreaterThanEqualOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsLowerThanEqualOperator createIsLowerThanEqualOperator() { + IsLowerThanEqualOperatorImpl isLowerThanEqualOperator = new IsLowerThanEqualOperatorImpl(); + return isLowerThanEqualOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public PlusOperator createPlusOperator() { + PlusOperatorImpl plusOperator = new PlusOperatorImpl(); + return plusOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ImpliesOperator createImpliesOperator() { + ImpliesOperatorImpl impliesOperator = new ImpliesOperatorImpl(); + return impliesOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsActive createIsActive() { + IsActiveImpl isActive = new IsActiveImpl(); + return isActive; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public GetAllocatables createGetAllocatables() { + GetAllocatablesImpl getAllocatables = new GetAllocatablesImpl(); + return getAllocatables; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public HasBeenDisplayed createHasBeenDisplayed() { + HasBeenDisplayedImpl hasBeenDisplayed = new HasBeenDisplayedImpl(); + return hasBeenDisplayed; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ActiveState createActiveState() { + ActiveStateImpl activeState = new ActiveStateImpl(); + return activeState; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ObjectCompare createObjectCompare() { + ObjectCompareImpl objectCompare = new ObjectCompareImpl(); + return objectCompare; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ThatOfOperator createThatOfOperator() { + ThatOfOperatorImpl thatOfOperator = new ThatOfOperatorImpl(); + return thatOfOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MaxValue createMaxValue() { + MaxValueImpl maxValue = new MaxValueImpl(); + return maxValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MinValue createMinValue() { + MinValueImpl minValue = new MinValueImpl(); + return minValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public NoneValue createNoneValue() { + NoneValueImpl noneValue = new NoneValueImpl(); + return noneValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public StandardValue createStandardValue() { + StandardValueImpl standardValue = new StandardValueImpl(); + return standardValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IntegerValue createIntegerValue() { + IntegerValueImpl integerValue = new IntegerValueImpl(); + return integerValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LoserTypeExpression createLoserTypeExpression() { + LoserTypeExpressionImpl loserTypeExpression = new LoserTypeExpressionImpl(); + return loserTypeExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ArbitrationPolicyExpression createArbitrationPolicyExpression() { + ArbitrationPolicyExpressionImpl arbitrationPolicyExpression = new ArbitrationPolicyExpressionImpl(); + return arbitrationPolicyExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SizeOperator createSizeOperator() { + SizeOperatorImpl sizeOperator = new SizeOperatorImpl(); + return sizeOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExistsOperator createExistsOperator() { + ExistsOperatorImpl existsOperator = new ExistsOperatorImpl(); + return existsOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ForAllOperator createForAllOperator() { + ForAllOperatorImpl forAllOperator = new ForAllOperatorImpl(); + return forAllOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MaxOperator createMaxOperator() { + MaxOperatorImpl maxOperator = new MaxOperatorImpl(); + return maxOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public MinOperator createMinOperator() { + MinOperatorImpl minOperator = new MinOperatorImpl(); + return minOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SelectOperator createSelectOperator() { + SelectOperatorImpl selectOperator = new SelectOperatorImpl(); + return selectOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public SetOfOperator createSetOfOperator() { + SetOfOperatorImpl setOfOperator = new SetOfOperatorImpl(); + return setOfOperator; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LambdaExpression createLambdaExpression() { + LambdaExpressionImpl lambdaExpression = new LambdaExpressionImpl(); + return lambdaExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public Variable createVariable() { + VariableImpl variable = new VariableImpl(); + return variable; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IfStatement createIfStatement() { + IfStatementImpl ifStatement = new IfStatementImpl(); + return ifStatement; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsOn createIsOn() { + IsOnImpl isOn = new IsOnImpl(); + return isOn; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public AllocatedContent createAllocatedContent() { + AllocatedContentImpl allocatedContent = new AllocatedContentImpl(); + return allocatedContent; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ContentValue createContentValue() { + ContentValueImpl contentValue = new ContentValueImpl(); + return contentValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public GetContentsList createGetContentsList() { + GetContentsListImpl getContentsList = new GetContentsListImpl(); + return getContentsList; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ActiveContents createActiveContents() { + ActiveContentsImpl activeContents = new ActiveContentsImpl(); + return activeContents; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public GetProperty createGetProperty() { + GetPropertyImpl getProperty = new GetPropertyImpl(); + return getProperty; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public StateValue createStateValue() { + StateValueImpl stateValue = new StateValueImpl(); + return stateValue; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public HasComeLaterThan createHasComeLaterThan() { + HasComeLaterThanImpl hasComeLaterThan = new HasComeLaterThanImpl(); + return hasComeLaterThan; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public HasComeEarlierThan createHasComeEarlierThan() { + HasComeEarlierThanImpl hasComeEarlierThan = new HasComeEarlierThanImpl(); + return hasComeEarlierThan; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ObjectCompareNot createObjectCompareNot() { + ObjectCompareNotImpl objectCompareNot = new ObjectCompareNotImpl(); + return objectCompareNot; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsAllocatedTo createIsAllocatedTo() { + IsAllocatedToImpl isAllocatedTo = new IsAllocatedToImpl(); + return isAllocatedTo; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsChanged createIsChanged() { + IsChangedImpl isChanged = new IsChangedImpl(); + return isChanged; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public IsTranslatedTo createIsTranslatedTo() { + IsTranslatedToImpl isTranslatedTo = new IsTranslatedToImpl(); + return isTranslatedTo; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public GetState createGetState() { + GetStateImpl getState = new GetStateImpl(); + return getState; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NullExpression createNullExpression() { + NullExpressionImpl nullExpression = new NullExpressionImpl(); + return nullExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ArbitrationPolicy createArbitrationPolicyFromString(EDataType eDataType, String initialValue) { + ArbitrationPolicy result = ArbitrationPolicy.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String convertArbitrationPolicyToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType createExpressionTypeFromString(EDataType eDataType, String initialValue) { + ExpressionType result = ExpressionType.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String convertExpressionTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public LoserType createLoserTypeFromString(EDataType eDataType, String initialValue) { + LoserType result = LoserType.get(initialValue); + if (result == null) + throw new IllegalArgumentException( + "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String convertLoserTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RBACorePackage getRBACorePackage() { + return (RBACorePackage) getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static RBACorePackage getPackage() { + return RBACorePackage.eINSTANCE; + } + +} // RBACoreFactoryImpl diff --git a/rba.model.core/src/rba/core/impl/RBACorePackageImpl.java b/rba.model.core/src/rba/core/impl/RBACorePackageImpl.java new file mode 100644 index 0000000..ce9e33c --- /dev/null +++ b/rba.model.core/src/rba/core/impl/RBACorePackageImpl.java @@ -0,0 +1,4565 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; +import rba.core.*; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> + * @generated + */ +public class RBACorePackageImpl extends EPackageImpl implements RBACorePackage { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass modelElementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass namedElementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass abstractAllocatableEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass allocatableEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass allocatableSetEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass projectEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass packagableElementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass packageEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass stereotypeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass tagEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass ruleObjectEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass abstractContentEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass abstractSceneEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass sceneEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentSetEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentStateEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass abstractPropertyEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass integerPropertyEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass abstractConstraintEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass constraintEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass expressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass letStatementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass complexExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass operatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isTypeOfEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass objectReferenceEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass previousModifierEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass greaterThanOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass muchGreaterThanOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass lowerThanOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass comparisonOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass equalToOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass comparisonAndEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass logicalOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass andOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass orOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass notOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isEqualToOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isGreaterThanOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isLowerThanOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isGreaterThanEqualOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isLowerThanEqualOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass arithmeticOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass plusOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass impliesOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isActiveEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass getAllocatablesEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass hasBeenDisplayedEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass activeStateEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass objectCompareEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass thatOfOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass valueExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass maxValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass minValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass noneValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass standardValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass integerValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass enumExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass loserTypeExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass arbitrationPolicyExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass setExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass setOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass sizeOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass existsOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass forAllOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass maxOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass minOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass selectOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass setOfOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass lambdaExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass variableEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass lambdaContextEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass ifStatementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass sceneOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isOnEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass allocatableOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass allocatedContentEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass getContentsListEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass activeContentsEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass propertyOperatorEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass getPropertyEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass stateValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass hasComeLaterThanEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass hasComeEarlierThanEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass sugarExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass sugarExpressionBaseEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass objectCompareNotEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isAllocatedToEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isChangedEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass isTranslatedToEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass getStateEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EClass contentStateOperatorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass nullExpressionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EEnum arbitrationPolicyEEnum = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EEnum expressionTypeEEnum = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private EEnum loserTypeEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see rba.core.RBACorePackage#eNS_URI + * @see #init() + * @generated + */ + private RBACorePackageImpl() { + super(eNS_URI, RBACoreFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link RBACorePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static RBACorePackage init() { + if (isInited) + return (RBACorePackage) EPackage.Registry.INSTANCE.getEPackage(RBACorePackage.eNS_URI); + + // Obtain or create and register package + RBACorePackageImpl theRBACorePackage = (RBACorePackageImpl) (EPackage.Registry.INSTANCE + .get(eNS_URI) instanceof RBACorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) + : new RBACorePackageImpl()); + + isInited = true; + + // Create package meta-data objects + theRBACorePackage.createPackageContents(); + + // Initialize created meta-data + theRBACorePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theRBACorePackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(RBACorePackage.eNS_URI, theRBACorePackage); + return theRBACorePackage; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getModelElement() { + return modelElementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getModelElement_Description() { + return (EAttribute) modelElementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getNamedElement() { + return namedElementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedElement_Name() { + return (EAttribute) namedElementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractAllocatable() { + return abstractAllocatableEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractAllocatable_Contents() { + return (EReference) abstractAllocatableEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractAllocatable_AllocatableGroup() { + return (EReference) abstractAllocatableEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAbstractAllocatable__GetContentsList() { + return abstractAllocatableEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAbstractAllocatable__CollectLeafAllocatable() { + return abstractAllocatableEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAllocatable() { + return allocatableEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getAllocatable_ArbitrationPolicy() { + return (EAttribute) allocatableEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAllocatable_Visibility() { + return (EReference) allocatableEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAllocatable__CollectLeafAllocatable() { + return allocatableEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAllocatableSet() { + return allocatableSetEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAllocatableSet_Target() { + return (EReference) allocatableSetEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAllocatableSet__CollectLeafAllocatable() { + return allocatableSetEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getProject() { + return projectEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getProject_Version() { + return (EAttribute) projectEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getProject_DummyName() { + return (EAttribute) projectEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getProject__GetName() { + return projectEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getPackagableElement() { + return packagableElementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getPackage() { + return packageEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getPackage_Packagableelement() { + return (EReference) packageEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getStereotype() { + return stereotypeEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getStereotype_TargetModelName() { + return (EAttribute) stereotypeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getStereotype_BodyText() { + return (EAttribute) stereotypeEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTag() { + return tagEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTag_Values() { + return (EAttribute) tagEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getStereotype_Variables() { + return (EReference) stereotypeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getRuleObject() { + return ruleObjectEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getRuleObject_Tags() { + return (EReference) ruleObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getRuleObject__GetExpressionType() { + return ruleObjectEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractContent() { + return abstractContentEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractContent_ContentGroup() { + return (EReference) abstractContentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractContent_Allocatable() { + return (EReference) abstractContentEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAbstractContent__GetAllocatableList() { + return abstractContentEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAbstractContent__CollectLeafContents() { + return abstractContentEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractScene() { + return abstractSceneEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getScene() { + return sceneEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getScene_Global() { + return (EAttribute) sceneEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getScene_Properties() { + return (EReference) sceneEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getScene__GetExpressionType() { + return sceneEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContent() { + return contentEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getContent_LoserType() { + return (EAttribute) contentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getContent_States() { + return (EReference) contentEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContent__CollectLeafContents() { + return contentEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContentSet() { + return contentSetEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getContentSet_Target() { + return (EReference) contentSetEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContentSet__CollectLeafContents() { + return contentSetEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContentState() { + return contentStateEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getContentState_Value() { + return (EReference) contentStateEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getContentState_Owner() { + return (EReference) contentStateEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractProperty() { + return abstractPropertyEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractProperty_Owner() { + return (EReference) abstractPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAbstractProperty__GetExpressionType() { + return abstractPropertyEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIntegerProperty() { + return integerPropertyEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getIntegerProperty_Value() { + return (EReference) integerPropertyEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAbstractConstraint() { + return abstractConstraintEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getAbstractConstraint_Expression() { + return (EReference) abstractConstraintEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getConstraint() { + return constraintEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getConstraint_Runtime() { + return (EAttribute) constraintEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getExpression() { + return expressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getExpression_Type() { + return (EAttribute) expressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getExpression_Expression() { + return (EAttribute) expressionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getExpression_LetStatements() { + return (EReference) expressionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getExpression__GetUnderlyingType() { + return expressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getExpression__GetExpressionText() { + return expressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLetStatement() { + return letStatementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLetStatement_Variable() { + return (EReference) letStatementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLetStatement_Body() { + return (EReference) letStatementEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLetStatement__ToString() { + return letStatementEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getComplexExpression() { + return complexExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getComplexExpression_OtherExpression() { + return (EReference) complexExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComplexExpression__GetExpressionText() { + return complexExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComplexExpression__GetUnderlyingType() { + return complexExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComplexExpression__GetType() { + return complexExpressionEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getOperator() { + return operatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getOperator_Operand() { + return (EReference) operatorEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getOperator__GetSymbol() { + return operatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsTypeOf() { + return isTypeOfEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getIsTypeOf_TagName() { + return (EAttribute) isTypeOfEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTypeOf__GetExpressionText() { + return isTypeOfEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTypeOf__GetSymbol() { + return isTypeOfEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTypeOf__GetUnderlyingType() { + return isTypeOfEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getObjectReference() { + return objectReferenceEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getObjectReference_RefObject() { + return (EReference) objectReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectReference__GetUnderlyingType() { + return objectReferenceEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectReference__GetExpressionText() { + return objectReferenceEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getPreviousModifier() { + return previousModifierEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getPreviousModifier_ObjReference() { + return (EReference) previousModifierEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPreviousModifier__GetSymbol() { + return previousModifierEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPreviousModifier__GetUnderlyingType() { + return previousModifierEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPreviousModifier__GetExpressionText() { + return previousModifierEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getGreaterThanOperator() { + return greaterThanOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGreaterThanOperator__GetSymbol() { + return greaterThanOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getMuchGreaterThanOperator() { + return muchGreaterThanOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMuchGreaterThanOperator__GetSymbol() { + return muchGreaterThanOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLowerThanOperator() { + return lowerThanOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLowerThanOperator__GetSymbol() { + return lowerThanOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getComparisonOperator() { + return comparisonOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComparisonOperator__GetUnderlyingType() { + return comparisonOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComparisonOperator__GetExpressionText() { + return comparisonOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getEqualToOperator() { + return equalToOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getEqualToOperator__GetSymbol() { + return equalToOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getComparisonAnd() { + return comparisonAndEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComparisonAnd__GetSymbol() { + return comparisonAndEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getComparisonAnd__GetExpressionText() { + return comparisonAndEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLogicalOperator() { + return logicalOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLogicalOperator__GetUnderlyingType() { + return logicalOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLogicalOperator__GetExpressionText() { + return logicalOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAndOperator() { + return andOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAndOperator__GetSymbol() { + return andOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getOrOperator() { + return orOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getOrOperator__GetSymbol() { + return orOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getNotOperator() { + return notOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getNotOperator__GetSymbol() { + return notOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getNotOperator__GetExpressionText() { + return notOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsEqualToOperator() { + return isEqualToOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsEqualToOperator__GetSymbol() { + return isEqualToOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsGreaterThanOperator() { + return isGreaterThanOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsGreaterThanOperator__GetSymbol() { + return isGreaterThanOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsLowerThanOperator() { + return isLowerThanOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsLowerThanOperator__GetSymbol() { + return isLowerThanOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsGreaterThanEqualOperator() { + return isGreaterThanEqualOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsGreaterThanEqualOperator__GetSymbol() { + return isGreaterThanEqualOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsLowerThanEqualOperator() { + return isLowerThanEqualOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsLowerThanEqualOperator__GetSymbol() { + return isLowerThanEqualOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getArithmeticOperator() { + return arithmeticOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getArithmeticOperator__GetUnderlyingType() { + return arithmeticOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getArithmeticOperator__GetExpressionText() { + return arithmeticOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getPlusOperator() { + return plusOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPlusOperator__GetSymbol() { + return plusOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getImpliesOperator() { + return impliesOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getImpliesOperator__GetSymbol() { + return impliesOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContentOperator() { + return contentOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContentOperator__GetExpressionText() { + return contentOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsActive() { + return isActiveEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsActive__GetSymbol() { + return isActiveEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsActive__GetUnderlyingType() { + return isActiveEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getGetAllocatables() { + return getAllocatablesEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetAllocatables__GetSymbol() { + return getAllocatablesEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetAllocatables__GetUnderlyingType() { + return getAllocatablesEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getHasBeenDisplayed() { + return hasBeenDisplayedEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasBeenDisplayed__GetSymbol() { + return hasBeenDisplayedEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasBeenDisplayed__GetUnderlyingType() { + return hasBeenDisplayedEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getActiveState() { + return activeStateEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getActiveState__GetSymbol() { + return activeStateEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getActiveState__GetUnderlyingType() { + return activeStateEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getObjectCompare() { + return objectCompareEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompare__GetSymbol() { + return objectCompareEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompare__GetUnderlyingType() { + return objectCompareEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompare__GetExpressionText() { + return objectCompareEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getThatOfOperator() { + return thatOfOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getThatOfOperator__GetExpressionText() { + return thatOfOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getThatOfOperator__GetSymbol() { + return thatOfOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getThatOfOperator__GetUnderlyingType() { + return thatOfOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getValueExpression() { + return valueExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getValueExpression__GetUnderlyingType() { + return valueExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getValueExpression__GetExpressionValue() { + return valueExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getValueExpression__GetType() { + return valueExpressionEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getMaxValue() { + return maxValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMaxValue__GetExpressionText() { + return maxValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMaxValue__GetExpressionValue() { + return maxValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getMinValue() { + return minValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMinValue__GetExpressionText() { + return minValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMinValue__GetExpressionValue() { + return minValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getNoneValue() { + return noneValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getNoneValue__GetExpressionText() { + return noneValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getNoneValue__GetExpressionValue() { + return noneValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getStandardValue() { + return standardValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getStandardValue__GetExpressionText() { + return standardValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getStandardValue__GetExpressionValue() { + return standardValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIntegerValue() { + return integerValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getIntegerValue_Value() { + return (EAttribute) integerValueEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIntegerValue__GetExpressionText() { + return integerValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIntegerValue__GetExpressionValue() { + return integerValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getEnumExpression() { + return enumExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getEnumExpression__GetUnderlyingType() { + return enumExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getEnumExpression__GetExpressionValue() { + return enumExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getEnumExpression__GetType() { + return enumExpressionEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLoserTypeExpression() { + return loserTypeExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getLoserTypeExpression_Value() { + return (EAttribute) loserTypeExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLoserTypeExpression__GetExpressionText() { + return loserTypeExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLoserTypeExpression__GetExpressionValue() { + return loserTypeExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getArbitrationPolicyExpression() { + return arbitrationPolicyExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EAttribute getArbitrationPolicyExpression_Value() { + return (EAttribute) arbitrationPolicyExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getArbitrationPolicyExpression__GetExpressionText() { + return arbitrationPolicyExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getArbitrationPolicyExpression__GetExpressionValue() { + return arbitrationPolicyExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSetExpression() { + return setExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSetOperator() { + return setOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSizeOperator() { + return sizeOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSizeOperator__GetExpressionText() { + return sizeOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSizeOperator__GetSymbol() { + return sizeOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSizeOperator__GetUnderlyingType() { + return sizeOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getExistsOperator() { + return existsOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getExistsOperator__GetExpressionText() { + return existsOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getExistsOperator__GetSymbol() { + return existsOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getExistsOperator__GetUnderlyingType() { + return existsOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getForAllOperator() { + return forAllOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getForAllOperator__GetExpressionText() { + return forAllOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getForAllOperator__GetSymbol() { + return forAllOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getForAllOperator__GetUnderlyingType() { + return forAllOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getMaxOperator() { + return maxOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMaxOperator__GetExpressionText() { + return maxOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMaxOperator__GetSymbol() { + return maxOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMaxOperator__GetUnderlyingType() { + return maxOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getMinOperator() { + return minOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMinOperator__GetExpressionText() { + return minOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMinOperator__GetSymbol() { + return minOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getMinOperator__GetUnderlyingType() { + return minOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSelectOperator() { + return selectOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSelectOperator__GetExpressionText() { + return selectOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSelectOperator__GetSymbol() { + return selectOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSelectOperator__GetUnderlyingType() { + return selectOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSetOfOperator() { + return setOfOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSetOfOperator__GetExpressionText() { + return setOfOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSetOfOperator__GetSymbol() { + return setOfOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSetOfOperator__GetUnderlyingType() { + return setOfOperatorEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLambdaExpression() { + return lambdaExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLambdaExpression_Context() { + return (EReference) lambdaExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLambdaExpression_X() { + return (EReference) lambdaExpressionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLambdaExpression_BodyText() { + return (EReference) lambdaExpressionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLambdaExpression__GetExpressionText() { + return lambdaExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLambdaExpression__GetUnderlyingType() { + return lambdaExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getVariable() { + return variableEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getVariable__GetExpressionType() { + return variableEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getLambdaContext() { + return lambdaContextEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getLambdaContext_Lambda() { + return (EReference) lambdaContextEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getLambdaContext__GetContextType() { + return lambdaContextEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIfStatement() { + return ifStatementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getIfStatement_Condition() { + return (EReference) ifStatementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getIfStatement_ThenExpression() { + return (EReference) ifStatementEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EReference getIfStatement_ElseExpression() { + return (EReference) ifStatementEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIfStatement__GetUnderlyingType() { + return ifStatementEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIfStatement__GetExpressionText() { + return ifStatementEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSceneOperator() { + return sceneOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSceneOperator__GetExpressionText() { + return sceneOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsOn() { + return isOnEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsOn__GetSymbol() { + return isOnEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsOn__GetUnderlyingType() { + return isOnEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAllocatableOperator() { + return allocatableOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAllocatableOperator__GetExpressionText() { + return allocatableOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getAllocatedContent() { + return allocatedContentEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAllocatedContent__GetSymbol() { + return allocatedContentEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getAllocatedContent__GetUnderlyingType() { + return allocatedContentEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContentValue() { + return contentValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContentValue__GetSymbol() { + return contentValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContentValue__GetUnderlyingType() { + return contentValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getGetContentsList() { + return getContentsListEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetContentsList__GetSymbol() { + return getContentsListEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetContentsList__GetUnderlyingType() { + return getContentsListEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getActiveContents() { + return activeContentsEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getActiveContents__GetSymbol() { + return activeContentsEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getActiveContents__GetUnderlyingType() { + return activeContentsEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getPropertyOperator() { + return propertyOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPropertyOperator__GetUnderlyingType() { + return propertyOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getPropertyOperator__GetExpressionText() { + return propertyOperatorEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getGetProperty() { + return getPropertyEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetProperty__GetSymbol() { + return getPropertyEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetProperty__GetUnderlyingType() { + return getPropertyEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getStateValue() { + return stateValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getStateValue__GetSymbol() { + return stateValueEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getStateValue__GetUnderlyingType() { + return stateValueEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getHasComeLaterThan() { + return hasComeLaterThanEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeLaterThan__GetSymbol() { + return hasComeLaterThanEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeLaterThan__GetUnderlyingType() { + return hasComeLaterThanEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeLaterThan__GetExpressionText() { + return hasComeLaterThanEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getHasComeEarlierThan() { + return hasComeEarlierThanEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeEarlierThan__GetSymbol() { + return hasComeEarlierThanEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeEarlierThan__GetUnderlyingType() { + return hasComeEarlierThanEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getHasComeEarlierThan__GetExpressionText() { + return hasComeEarlierThanEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSugarExpression() { + return sugarExpressionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSugarExpression__CanExpand() { + return sugarExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSugarExpression__GetExpanded() { + return sugarExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getSugarExpressionBase() { + return sugarExpressionBaseEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getSugarExpressionBase__CanExpand() { + return sugarExpressionBaseEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getObjectCompareNot() { + return objectCompareNotEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompareNot__GetSymbol() { + return objectCompareNotEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompareNot__GetUnderlyingType() { + return objectCompareNotEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getObjectCompareNot__GetExpressionText() { + return objectCompareNotEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsAllocatedTo() { + return isAllocatedToEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsAllocatedTo__GetSymbol() { + return isAllocatedToEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsAllocatedTo__GetUnderlyingType() { + return isAllocatedToEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsAllocatedTo__GetExpressionText() { + return isAllocatedToEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsChanged() { + return isChangedEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsChanged__GetSymbol() { + return isChangedEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsChanged__GetUnderlyingType() { + return isChangedEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getIsTranslatedTo() { + return isTranslatedToEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTranslatedTo__GetSymbol() { + return isTranslatedToEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTranslatedTo__GetUnderlyingType() { + return isTranslatedToEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getIsTranslatedTo__GetExpressionText() { + return isTranslatedToEClass.getEOperations().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getGetState() { + return getStateEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getGetState__GetSymbol() { + return getStateEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EClass getContentStateOperator() { + return contentStateOperatorEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EOperation getContentStateOperator__GetExpressionText() { + return contentStateOperatorEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getNullExpression() { + return nullExpressionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getNullExpression__GetUnderlyingType() { + return nullExpressionEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getNullExpression__GetExpressionText() { + return nullExpressionEClass.getEOperations().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EEnum getArbitrationPolicy() { + return arbitrationPolicyEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EEnum getExpressionType() { + return expressionTypeEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EEnum getLoserType() { + return loserTypeEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public RBACoreFactory getRBACoreFactory() { + return (RBACoreFactory) getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + modelElementEClass = createEClass(MODEL_ELEMENT); + createEAttribute(modelElementEClass, MODEL_ELEMENT__DESCRIPTION); + + namedElementEClass = createEClass(NAMED_ELEMENT); + createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME); + + abstractAllocatableEClass = createEClass(ABSTRACT_ALLOCATABLE); + createEReference(abstractAllocatableEClass, ABSTRACT_ALLOCATABLE__CONTENTS); + createEReference(abstractAllocatableEClass, ABSTRACT_ALLOCATABLE__ALLOCATABLE_GROUP); + createEOperation(abstractAllocatableEClass, ABSTRACT_ALLOCATABLE___GET_CONTENTS_LIST); + createEOperation(abstractAllocatableEClass, ABSTRACT_ALLOCATABLE___COLLECT_LEAF_ALLOCATABLE); + + allocatableEClass = createEClass(ALLOCATABLE); + createEAttribute(allocatableEClass, ALLOCATABLE__ARBITRATION_POLICY); + createEReference(allocatableEClass, ALLOCATABLE__VISIBILITY); + createEOperation(allocatableEClass, ALLOCATABLE___COLLECT_LEAF_ALLOCATABLE); + + allocatableSetEClass = createEClass(ALLOCATABLE_SET); + createEReference(allocatableSetEClass, ALLOCATABLE_SET__TARGET); + createEOperation(allocatableSetEClass, ALLOCATABLE_SET___COLLECT_LEAF_ALLOCATABLE); + + projectEClass = createEClass(PROJECT); + createEAttribute(projectEClass, PROJECT__VERSION); + createEAttribute(projectEClass, PROJECT__DUMMY_NAME); + createEOperation(projectEClass, PROJECT___GET_NAME); + + packagableElementEClass = createEClass(PACKAGABLE_ELEMENT); + + packageEClass = createEClass(PACKAGE); + createEReference(packageEClass, PACKAGE__PACKAGABLEELEMENT); + + stereotypeEClass = createEClass(STEREOTYPE); + createEAttribute(stereotypeEClass, STEREOTYPE__TARGET_MODEL_NAME); + createEReference(stereotypeEClass, STEREOTYPE__VARIABLES); + createEAttribute(stereotypeEClass, STEREOTYPE__BODY_TEXT); + + tagEClass = createEClass(TAG); + createEAttribute(tagEClass, TAG__VALUES); + + ruleObjectEClass = createEClass(RULE_OBJECT); + createEReference(ruleObjectEClass, RULE_OBJECT__TAGS); + createEOperation(ruleObjectEClass, RULE_OBJECT___GET_EXPRESSION_TYPE); + + abstractContentEClass = createEClass(ABSTRACT_CONTENT); + createEReference(abstractContentEClass, ABSTRACT_CONTENT__CONTENT_GROUP); + createEReference(abstractContentEClass, ABSTRACT_CONTENT__ALLOCATABLE); + createEOperation(abstractContentEClass, ABSTRACT_CONTENT___GET_ALLOCATABLE_LIST); + createEOperation(abstractContentEClass, ABSTRACT_CONTENT___COLLECT_LEAF_CONTENTS); + + abstractSceneEClass = createEClass(ABSTRACT_SCENE); + + sceneEClass = createEClass(SCENE); + createEAttribute(sceneEClass, SCENE__GLOBAL); + createEReference(sceneEClass, SCENE__PROPERTIES); + createEOperation(sceneEClass, SCENE___GET_EXPRESSION_TYPE); + + contentEClass = createEClass(CONTENT); + createEAttribute(contentEClass, CONTENT__LOSER_TYPE); + createEReference(contentEClass, CONTENT__STATES); + createEOperation(contentEClass, CONTENT___COLLECT_LEAF_CONTENTS); + + contentSetEClass = createEClass(CONTENT_SET); + createEReference(contentSetEClass, CONTENT_SET__TARGET); + createEOperation(contentSetEClass, CONTENT_SET___COLLECT_LEAF_CONTENTS); + + contentStateEClass = createEClass(CONTENT_STATE); + createEReference(contentStateEClass, CONTENT_STATE__VALUE); + createEReference(contentStateEClass, CONTENT_STATE__OWNER); + + abstractPropertyEClass = createEClass(ABSTRACT_PROPERTY); + createEReference(abstractPropertyEClass, ABSTRACT_PROPERTY__OWNER); + createEOperation(abstractPropertyEClass, ABSTRACT_PROPERTY___GET_EXPRESSION_TYPE); + + integerPropertyEClass = createEClass(INTEGER_PROPERTY); + createEReference(integerPropertyEClass, INTEGER_PROPERTY__VALUE); + + abstractConstraintEClass = createEClass(ABSTRACT_CONSTRAINT); + createEReference(abstractConstraintEClass, ABSTRACT_CONSTRAINT__EXPRESSION); + + constraintEClass = createEClass(CONSTRAINT); + createEAttribute(constraintEClass, CONSTRAINT__RUNTIME); + + expressionEClass = createEClass(EXPRESSION); + createEAttribute(expressionEClass, EXPRESSION__TYPE); + createEAttribute(expressionEClass, EXPRESSION__EXPRESSION); + createEReference(expressionEClass, EXPRESSION__LET_STATEMENTS); + createEOperation(expressionEClass, EXPRESSION___GET_UNDERLYING_TYPE); + createEOperation(expressionEClass, EXPRESSION___GET_EXPRESSION_TEXT); + + letStatementEClass = createEClass(LET_STATEMENT); + createEReference(letStatementEClass, LET_STATEMENT__VARIABLE); + createEReference(letStatementEClass, LET_STATEMENT__BODY); + createEOperation(letStatementEClass, LET_STATEMENT___TO_STRING); + + complexExpressionEClass = createEClass(COMPLEX_EXPRESSION); + createEReference(complexExpressionEClass, COMPLEX_EXPRESSION__OTHER_EXPRESSION); + createEOperation(complexExpressionEClass, COMPLEX_EXPRESSION___GET_EXPRESSION_TEXT); + createEOperation(complexExpressionEClass, COMPLEX_EXPRESSION___GET_UNDERLYING_TYPE); + createEOperation(complexExpressionEClass, COMPLEX_EXPRESSION___GET_TYPE); + + operatorEClass = createEClass(OPERATOR); + createEReference(operatorEClass, OPERATOR__OPERAND); + createEOperation(operatorEClass, OPERATOR___GET_SYMBOL); + + isTypeOfEClass = createEClass(IS_TYPE_OF); + createEAttribute(isTypeOfEClass, IS_TYPE_OF__TAG_NAME); + createEOperation(isTypeOfEClass, IS_TYPE_OF___GET_EXPRESSION_TEXT); + createEOperation(isTypeOfEClass, IS_TYPE_OF___GET_SYMBOL); + createEOperation(isTypeOfEClass, IS_TYPE_OF___GET_UNDERLYING_TYPE); + + objectReferenceEClass = createEClass(OBJECT_REFERENCE); + createEReference(objectReferenceEClass, OBJECT_REFERENCE__REF_OBJECT); + createEOperation(objectReferenceEClass, OBJECT_REFERENCE___GET_UNDERLYING_TYPE); + createEOperation(objectReferenceEClass, OBJECT_REFERENCE___GET_EXPRESSION_TEXT); + + previousModifierEClass = createEClass(PREVIOUS_MODIFIER); + createEReference(previousModifierEClass, PREVIOUS_MODIFIER__OBJ_REFERENCE); + createEOperation(previousModifierEClass, PREVIOUS_MODIFIER___GET_SYMBOL); + createEOperation(previousModifierEClass, PREVIOUS_MODIFIER___GET_UNDERLYING_TYPE); + createEOperation(previousModifierEClass, PREVIOUS_MODIFIER___GET_EXPRESSION_TEXT); + + greaterThanOperatorEClass = createEClass(GREATER_THAN_OPERATOR); + createEOperation(greaterThanOperatorEClass, GREATER_THAN_OPERATOR___GET_SYMBOL); + + muchGreaterThanOperatorEClass = createEClass(MUCH_GREATER_THAN_OPERATOR); + createEOperation(muchGreaterThanOperatorEClass, MUCH_GREATER_THAN_OPERATOR___GET_SYMBOL); + + lowerThanOperatorEClass = createEClass(LOWER_THAN_OPERATOR); + createEOperation(lowerThanOperatorEClass, LOWER_THAN_OPERATOR___GET_SYMBOL); + + comparisonOperatorEClass = createEClass(COMPARISON_OPERATOR); + createEOperation(comparisonOperatorEClass, COMPARISON_OPERATOR___GET_UNDERLYING_TYPE); + createEOperation(comparisonOperatorEClass, COMPARISON_OPERATOR___GET_EXPRESSION_TEXT); + + equalToOperatorEClass = createEClass(EQUAL_TO_OPERATOR); + createEOperation(equalToOperatorEClass, EQUAL_TO_OPERATOR___GET_SYMBOL); + + comparisonAndEClass = createEClass(COMPARISON_AND); + createEOperation(comparisonAndEClass, COMPARISON_AND___GET_SYMBOL); + createEOperation(comparisonAndEClass, COMPARISON_AND___GET_EXPRESSION_TEXT); + + logicalOperatorEClass = createEClass(LOGICAL_OPERATOR); + createEOperation(logicalOperatorEClass, LOGICAL_OPERATOR___GET_UNDERLYING_TYPE); + createEOperation(logicalOperatorEClass, LOGICAL_OPERATOR___GET_EXPRESSION_TEXT); + + andOperatorEClass = createEClass(AND_OPERATOR); + createEOperation(andOperatorEClass, AND_OPERATOR___GET_SYMBOL); + + orOperatorEClass = createEClass(OR_OPERATOR); + createEOperation(orOperatorEClass, OR_OPERATOR___GET_SYMBOL); + + notOperatorEClass = createEClass(NOT_OPERATOR); + createEOperation(notOperatorEClass, NOT_OPERATOR___GET_SYMBOL); + createEOperation(notOperatorEClass, NOT_OPERATOR___GET_EXPRESSION_TEXT); + + isEqualToOperatorEClass = createEClass(IS_EQUAL_TO_OPERATOR); + createEOperation(isEqualToOperatorEClass, IS_EQUAL_TO_OPERATOR___GET_SYMBOL); + + isGreaterThanOperatorEClass = createEClass(IS_GREATER_THAN_OPERATOR); + createEOperation(isGreaterThanOperatorEClass, IS_GREATER_THAN_OPERATOR___GET_SYMBOL); + + isLowerThanOperatorEClass = createEClass(IS_LOWER_THAN_OPERATOR); + createEOperation(isLowerThanOperatorEClass, IS_LOWER_THAN_OPERATOR___GET_SYMBOL); + + isGreaterThanEqualOperatorEClass = createEClass(IS_GREATER_THAN_EQUAL_OPERATOR); + createEOperation(isGreaterThanEqualOperatorEClass, IS_GREATER_THAN_EQUAL_OPERATOR___GET_SYMBOL); + + isLowerThanEqualOperatorEClass = createEClass(IS_LOWER_THAN_EQUAL_OPERATOR); + createEOperation(isLowerThanEqualOperatorEClass, IS_LOWER_THAN_EQUAL_OPERATOR___GET_SYMBOL); + + arithmeticOperatorEClass = createEClass(ARITHMETIC_OPERATOR); + createEOperation(arithmeticOperatorEClass, ARITHMETIC_OPERATOR___GET_UNDERLYING_TYPE); + createEOperation(arithmeticOperatorEClass, ARITHMETIC_OPERATOR___GET_EXPRESSION_TEXT); + + plusOperatorEClass = createEClass(PLUS_OPERATOR); + createEOperation(plusOperatorEClass, PLUS_OPERATOR___GET_SYMBOL); + + impliesOperatorEClass = createEClass(IMPLIES_OPERATOR); + createEOperation(impliesOperatorEClass, IMPLIES_OPERATOR___GET_SYMBOL); + + contentOperatorEClass = createEClass(CONTENT_OPERATOR); + createEOperation(contentOperatorEClass, CONTENT_OPERATOR___GET_EXPRESSION_TEXT); + + isActiveEClass = createEClass(IS_ACTIVE); + createEOperation(isActiveEClass, IS_ACTIVE___GET_SYMBOL); + createEOperation(isActiveEClass, IS_ACTIVE___GET_UNDERLYING_TYPE); + + getAllocatablesEClass = createEClass(GET_ALLOCATABLES); + createEOperation(getAllocatablesEClass, GET_ALLOCATABLES___GET_SYMBOL); + createEOperation(getAllocatablesEClass, GET_ALLOCATABLES___GET_UNDERLYING_TYPE); + + hasBeenDisplayedEClass = createEClass(HAS_BEEN_DISPLAYED); + createEOperation(hasBeenDisplayedEClass, HAS_BEEN_DISPLAYED___GET_SYMBOL); + createEOperation(hasBeenDisplayedEClass, HAS_BEEN_DISPLAYED___GET_UNDERLYING_TYPE); + + activeStateEClass = createEClass(ACTIVE_STATE); + createEOperation(activeStateEClass, ACTIVE_STATE___GET_SYMBOL); + createEOperation(activeStateEClass, ACTIVE_STATE___GET_UNDERLYING_TYPE); + + objectCompareEClass = createEClass(OBJECT_COMPARE); + createEOperation(objectCompareEClass, OBJECT_COMPARE___GET_SYMBOL); + createEOperation(objectCompareEClass, OBJECT_COMPARE___GET_UNDERLYING_TYPE); + createEOperation(objectCompareEClass, OBJECT_COMPARE___GET_EXPRESSION_TEXT); + + thatOfOperatorEClass = createEClass(THAT_OF_OPERATOR); + createEOperation(thatOfOperatorEClass, THAT_OF_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(thatOfOperatorEClass, THAT_OF_OPERATOR___GET_SYMBOL); + createEOperation(thatOfOperatorEClass, THAT_OF_OPERATOR___GET_UNDERLYING_TYPE); + + valueExpressionEClass = createEClass(VALUE_EXPRESSION); + createEOperation(valueExpressionEClass, VALUE_EXPRESSION___GET_UNDERLYING_TYPE); + createEOperation(valueExpressionEClass, VALUE_EXPRESSION___GET_EXPRESSION_VALUE); + createEOperation(valueExpressionEClass, VALUE_EXPRESSION___GET_TYPE); + + maxValueEClass = createEClass(MAX_VALUE); + createEOperation(maxValueEClass, MAX_VALUE___GET_EXPRESSION_TEXT); + createEOperation(maxValueEClass, MAX_VALUE___GET_EXPRESSION_VALUE); + + minValueEClass = createEClass(MIN_VALUE); + createEOperation(minValueEClass, MIN_VALUE___GET_EXPRESSION_TEXT); + createEOperation(minValueEClass, MIN_VALUE___GET_EXPRESSION_VALUE); + + noneValueEClass = createEClass(NONE_VALUE); + createEOperation(noneValueEClass, NONE_VALUE___GET_EXPRESSION_TEXT); + createEOperation(noneValueEClass, NONE_VALUE___GET_EXPRESSION_VALUE); + + standardValueEClass = createEClass(STANDARD_VALUE); + createEOperation(standardValueEClass, STANDARD_VALUE___GET_EXPRESSION_TEXT); + createEOperation(standardValueEClass, STANDARD_VALUE___GET_EXPRESSION_VALUE); + + integerValueEClass = createEClass(INTEGER_VALUE); + createEAttribute(integerValueEClass, INTEGER_VALUE__VALUE); + createEOperation(integerValueEClass, INTEGER_VALUE___GET_EXPRESSION_TEXT); + createEOperation(integerValueEClass, INTEGER_VALUE___GET_EXPRESSION_VALUE); + + enumExpressionEClass = createEClass(ENUM_EXPRESSION); + createEOperation(enumExpressionEClass, ENUM_EXPRESSION___GET_UNDERLYING_TYPE); + createEOperation(enumExpressionEClass, ENUM_EXPRESSION___GET_EXPRESSION_VALUE); + createEOperation(enumExpressionEClass, ENUM_EXPRESSION___GET_TYPE); + + loserTypeExpressionEClass = createEClass(LOSER_TYPE_EXPRESSION); + createEAttribute(loserTypeExpressionEClass, LOSER_TYPE_EXPRESSION__VALUE); + createEOperation(loserTypeExpressionEClass, LOSER_TYPE_EXPRESSION___GET_EXPRESSION_TEXT); + createEOperation(loserTypeExpressionEClass, LOSER_TYPE_EXPRESSION___GET_EXPRESSION_VALUE); + + arbitrationPolicyExpressionEClass = createEClass(ARBITRATION_POLICY_EXPRESSION); + createEAttribute(arbitrationPolicyExpressionEClass, ARBITRATION_POLICY_EXPRESSION__VALUE); + createEOperation(arbitrationPolicyExpressionEClass, ARBITRATION_POLICY_EXPRESSION___GET_EXPRESSION_TEXT); + createEOperation(arbitrationPolicyExpressionEClass, ARBITRATION_POLICY_EXPRESSION___GET_EXPRESSION_VALUE); + + setExpressionEClass = createEClass(SET_EXPRESSION); + + setOperatorEClass = createEClass(SET_OPERATOR); + + sizeOperatorEClass = createEClass(SIZE_OPERATOR); + createEOperation(sizeOperatorEClass, SIZE_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(sizeOperatorEClass, SIZE_OPERATOR___GET_SYMBOL); + createEOperation(sizeOperatorEClass, SIZE_OPERATOR___GET_UNDERLYING_TYPE); + + existsOperatorEClass = createEClass(EXISTS_OPERATOR); + createEOperation(existsOperatorEClass, EXISTS_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(existsOperatorEClass, EXISTS_OPERATOR___GET_SYMBOL); + createEOperation(existsOperatorEClass, EXISTS_OPERATOR___GET_UNDERLYING_TYPE); + + forAllOperatorEClass = createEClass(FOR_ALL_OPERATOR); + createEOperation(forAllOperatorEClass, FOR_ALL_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(forAllOperatorEClass, FOR_ALL_OPERATOR___GET_SYMBOL); + createEOperation(forAllOperatorEClass, FOR_ALL_OPERATOR___GET_UNDERLYING_TYPE); + + maxOperatorEClass = createEClass(MAX_OPERATOR); + createEOperation(maxOperatorEClass, MAX_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(maxOperatorEClass, MAX_OPERATOR___GET_SYMBOL); + createEOperation(maxOperatorEClass, MAX_OPERATOR___GET_UNDERLYING_TYPE); + + minOperatorEClass = createEClass(MIN_OPERATOR); + createEOperation(minOperatorEClass, MIN_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(minOperatorEClass, MIN_OPERATOR___GET_SYMBOL); + createEOperation(minOperatorEClass, MIN_OPERATOR___GET_UNDERLYING_TYPE); + + selectOperatorEClass = createEClass(SELECT_OPERATOR); + createEOperation(selectOperatorEClass, SELECT_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(selectOperatorEClass, SELECT_OPERATOR___GET_SYMBOL); + createEOperation(selectOperatorEClass, SELECT_OPERATOR___GET_UNDERLYING_TYPE); + + setOfOperatorEClass = createEClass(SET_OF_OPERATOR); + createEOperation(setOfOperatorEClass, SET_OF_OPERATOR___GET_EXPRESSION_TEXT); + createEOperation(setOfOperatorEClass, SET_OF_OPERATOR___GET_SYMBOL); + createEOperation(setOfOperatorEClass, SET_OF_OPERATOR___GET_UNDERLYING_TYPE); + + lambdaExpressionEClass = createEClass(LAMBDA_EXPRESSION); + createEReference(lambdaExpressionEClass, LAMBDA_EXPRESSION__CONTEXT); + createEReference(lambdaExpressionEClass, LAMBDA_EXPRESSION__X); + createEReference(lambdaExpressionEClass, LAMBDA_EXPRESSION__BODY_TEXT); + createEOperation(lambdaExpressionEClass, LAMBDA_EXPRESSION___GET_EXPRESSION_TEXT); + createEOperation(lambdaExpressionEClass, LAMBDA_EXPRESSION___GET_UNDERLYING_TYPE); + + variableEClass = createEClass(VARIABLE); + createEOperation(variableEClass, VARIABLE___GET_EXPRESSION_TYPE); + + lambdaContextEClass = createEClass(LAMBDA_CONTEXT); + createEReference(lambdaContextEClass, LAMBDA_CONTEXT__LAMBDA); + createEOperation(lambdaContextEClass, LAMBDA_CONTEXT___GET_CONTEXT_TYPE); + + ifStatementEClass = createEClass(IF_STATEMENT); + createEReference(ifStatementEClass, IF_STATEMENT__CONDITION); + createEReference(ifStatementEClass, IF_STATEMENT__THEN_EXPRESSION); + createEReference(ifStatementEClass, IF_STATEMENT__ELSE_EXPRESSION); + createEOperation(ifStatementEClass, IF_STATEMENT___GET_UNDERLYING_TYPE); + createEOperation(ifStatementEClass, IF_STATEMENT___GET_EXPRESSION_TEXT); + + sceneOperatorEClass = createEClass(SCENE_OPERATOR); + createEOperation(sceneOperatorEClass, SCENE_OPERATOR___GET_EXPRESSION_TEXT); + + isOnEClass = createEClass(IS_ON); + createEOperation(isOnEClass, IS_ON___GET_SYMBOL); + createEOperation(isOnEClass, IS_ON___GET_UNDERLYING_TYPE); + + allocatableOperatorEClass = createEClass(ALLOCATABLE_OPERATOR); + createEOperation(allocatableOperatorEClass, ALLOCATABLE_OPERATOR___GET_EXPRESSION_TEXT); + + allocatedContentEClass = createEClass(ALLOCATED_CONTENT); + createEOperation(allocatedContentEClass, ALLOCATED_CONTENT___GET_SYMBOL); + createEOperation(allocatedContentEClass, ALLOCATED_CONTENT___GET_UNDERLYING_TYPE); + + contentValueEClass = createEClass(CONTENT_VALUE); + createEOperation(contentValueEClass, CONTENT_VALUE___GET_SYMBOL); + createEOperation(contentValueEClass, CONTENT_VALUE___GET_UNDERLYING_TYPE); + + getContentsListEClass = createEClass(GET_CONTENTS_LIST); + createEOperation(getContentsListEClass, GET_CONTENTS_LIST___GET_SYMBOL); + createEOperation(getContentsListEClass, GET_CONTENTS_LIST___GET_UNDERLYING_TYPE); + + activeContentsEClass = createEClass(ACTIVE_CONTENTS); + createEOperation(activeContentsEClass, ACTIVE_CONTENTS___GET_SYMBOL); + createEOperation(activeContentsEClass, ACTIVE_CONTENTS___GET_UNDERLYING_TYPE); + + propertyOperatorEClass = createEClass(PROPERTY_OPERATOR); + createEOperation(propertyOperatorEClass, PROPERTY_OPERATOR___GET_UNDERLYING_TYPE); + createEOperation(propertyOperatorEClass, PROPERTY_OPERATOR___GET_EXPRESSION_TEXT); + + getPropertyEClass = createEClass(GET_PROPERTY); + createEOperation(getPropertyEClass, GET_PROPERTY___GET_SYMBOL); + createEOperation(getPropertyEClass, GET_PROPERTY___GET_UNDERLYING_TYPE); + + stateValueEClass = createEClass(STATE_VALUE); + createEOperation(stateValueEClass, STATE_VALUE___GET_SYMBOL); + createEOperation(stateValueEClass, STATE_VALUE___GET_UNDERLYING_TYPE); + + hasComeLaterThanEClass = createEClass(HAS_COME_LATER_THAN); + createEOperation(hasComeLaterThanEClass, HAS_COME_LATER_THAN___GET_SYMBOL); + createEOperation(hasComeLaterThanEClass, HAS_COME_LATER_THAN___GET_UNDERLYING_TYPE); + createEOperation(hasComeLaterThanEClass, HAS_COME_LATER_THAN___GET_EXPRESSION_TEXT); + + hasComeEarlierThanEClass = createEClass(HAS_COME_EARLIER_THAN); + createEOperation(hasComeEarlierThanEClass, HAS_COME_EARLIER_THAN___GET_SYMBOL); + createEOperation(hasComeEarlierThanEClass, HAS_COME_EARLIER_THAN___GET_UNDERLYING_TYPE); + createEOperation(hasComeEarlierThanEClass, HAS_COME_EARLIER_THAN___GET_EXPRESSION_TEXT); + + sugarExpressionEClass = createEClass(SUGAR_EXPRESSION); + createEOperation(sugarExpressionEClass, SUGAR_EXPRESSION___CAN_EXPAND); + createEOperation(sugarExpressionEClass, SUGAR_EXPRESSION___GET_EXPANDED); + + sugarExpressionBaseEClass = createEClass(SUGAR_EXPRESSION_BASE); + createEOperation(sugarExpressionBaseEClass, SUGAR_EXPRESSION_BASE___CAN_EXPAND); + + objectCompareNotEClass = createEClass(OBJECT_COMPARE_NOT); + createEOperation(objectCompareNotEClass, OBJECT_COMPARE_NOT___GET_SYMBOL); + createEOperation(objectCompareNotEClass, OBJECT_COMPARE_NOT___GET_UNDERLYING_TYPE); + createEOperation(objectCompareNotEClass, OBJECT_COMPARE_NOT___GET_EXPRESSION_TEXT); + + isAllocatedToEClass = createEClass(IS_ALLOCATED_TO); + createEOperation(isAllocatedToEClass, IS_ALLOCATED_TO___GET_SYMBOL); + createEOperation(isAllocatedToEClass, IS_ALLOCATED_TO___GET_UNDERLYING_TYPE); + createEOperation(isAllocatedToEClass, IS_ALLOCATED_TO___GET_EXPRESSION_TEXT); + + isChangedEClass = createEClass(IS_CHANGED); + createEOperation(isChangedEClass, IS_CHANGED___GET_SYMBOL); + createEOperation(isChangedEClass, IS_CHANGED___GET_UNDERLYING_TYPE); + + isTranslatedToEClass = createEClass(IS_TRANSLATED_TO); + createEOperation(isTranslatedToEClass, IS_TRANSLATED_TO___GET_SYMBOL); + createEOperation(isTranslatedToEClass, IS_TRANSLATED_TO___GET_UNDERLYING_TYPE); + createEOperation(isTranslatedToEClass, IS_TRANSLATED_TO___GET_EXPRESSION_TEXT); + + getStateEClass = createEClass(GET_STATE); + createEOperation(getStateEClass, GET_STATE___GET_SYMBOL); + + contentStateOperatorEClass = createEClass(CONTENT_STATE_OPERATOR); + createEOperation(contentStateOperatorEClass, CONTENT_STATE_OPERATOR___GET_EXPRESSION_TEXT); + + nullExpressionEClass = createEClass(NULL_EXPRESSION); + createEOperation(nullExpressionEClass, NULL_EXPRESSION___GET_UNDERLYING_TYPE); + createEOperation(nullExpressionEClass, NULL_EXPRESSION___GET_EXPRESSION_TEXT); + + // Create enums + arbitrationPolicyEEnum = createEEnum(ARBITRATION_POLICY); + expressionTypeEEnum = createEEnum(EXPRESSION_TYPE); + loserTypeEEnum = createEEnum(LOSER_TYPE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + namedElementEClass.getESuperTypes().add(this.getModelElement()); + abstractAllocatableEClass.getESuperTypes().add(this.getRuleObject()); + allocatableEClass.getESuperTypes().add(this.getAbstractAllocatable()); + allocatableSetEClass.getESuperTypes().add(this.getAbstractAllocatable()); + projectEClass.getESuperTypes().add(this.getPackage()); + packagableElementEClass.getESuperTypes().add(this.getNamedElement()); + packageEClass.getESuperTypes().add(this.getPackagableElement()); + stereotypeEClass.getESuperTypes().add(this.getPackagableElement()); + tagEClass.getESuperTypes().add(this.getNamedElement()); + ruleObjectEClass.getESuperTypes().add(this.getPackagableElement()); + abstractContentEClass.getESuperTypes().add(this.getRuleObject()); + abstractSceneEClass.getESuperTypes().add(this.getRuleObject()); + sceneEClass.getESuperTypes().add(this.getAbstractScene()); + contentEClass.getESuperTypes().add(this.getAbstractContent()); + contentSetEClass.getESuperTypes().add(this.getAbstractContent()); + contentStateEClass.getESuperTypes().add(this.getRuleObject()); + abstractPropertyEClass.getESuperTypes().add(this.getRuleObject()); + integerPropertyEClass.getESuperTypes().add(this.getAbstractProperty()); + abstractConstraintEClass.getESuperTypes().add(this.getPackagableElement()); + constraintEClass.getESuperTypes().add(this.getAbstractConstraint()); + letStatementEClass.getESuperTypes().add(this.getModelElement()); + complexExpressionEClass.getESuperTypes().add(this.getExpression()); + complexExpressionEClass.getESuperTypes().add(this.getSugarExpressionBase()); + operatorEClass.getESuperTypes().add(this.getExpression()); + isTypeOfEClass.getESuperTypes().add(this.getOperator()); + objectReferenceEClass.getESuperTypes().add(this.getExpression()); + previousModifierEClass.getESuperTypes().add(this.getExpression()); + greaterThanOperatorEClass.getESuperTypes().add(this.getComparisonOperator()); + muchGreaterThanOperatorEClass.getESuperTypes().add(this.getComparisonOperator()); + lowerThanOperatorEClass.getESuperTypes().add(this.getComparisonOperator()); + comparisonOperatorEClass.getESuperTypes().add(this.getOperator()); + equalToOperatorEClass.getESuperTypes().add(this.getComparisonOperator()); + comparisonAndEClass.getESuperTypes().add(this.getComparisonOperator()); + logicalOperatorEClass.getESuperTypes().add(this.getOperator()); + andOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + orOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + notOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + isEqualToOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + isGreaterThanOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + isLowerThanOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + isGreaterThanEqualOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + isLowerThanEqualOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + arithmeticOperatorEClass.getESuperTypes().add(this.getOperator()); + plusOperatorEClass.getESuperTypes().add(this.getArithmeticOperator()); + impliesOperatorEClass.getESuperTypes().add(this.getLogicalOperator()); + contentOperatorEClass.getESuperTypes().add(this.getOperator()); + isActiveEClass.getESuperTypes().add(this.getContentOperator()); + getAllocatablesEClass.getESuperTypes().add(this.getContentOperator()); + hasBeenDisplayedEClass.getESuperTypes().add(this.getContentOperator()); + activeStateEClass.getESuperTypes().add(this.getContentOperator()); + objectCompareEClass.getESuperTypes().add(this.getOperator()); + thatOfOperatorEClass.getESuperTypes().add(this.getOperator()); + valueExpressionEClass.getESuperTypes().add(this.getExpression()); + maxValueEClass.getESuperTypes().add(this.getValueExpression()); + minValueEClass.getESuperTypes().add(this.getValueExpression()); + noneValueEClass.getESuperTypes().add(this.getValueExpression()); + standardValueEClass.getESuperTypes().add(this.getValueExpression()); + integerValueEClass.getESuperTypes().add(this.getValueExpression()); + enumExpressionEClass.getESuperTypes().add(this.getExpression()); + loserTypeExpressionEClass.getESuperTypes().add(this.getEnumExpression()); + arbitrationPolicyExpressionEClass.getESuperTypes().add(this.getEnumExpression()); + setExpressionEClass.getESuperTypes().add(this.getExpression()); + setOperatorEClass.getESuperTypes().add(this.getOperator()); + sizeOperatorEClass.getESuperTypes().add(this.getSetOperator()); + existsOperatorEClass.getESuperTypes().add(this.getLambdaContext()); + forAllOperatorEClass.getESuperTypes().add(this.getLambdaContext()); + maxOperatorEClass.getESuperTypes().add(this.getLambdaContext()); + minOperatorEClass.getESuperTypes().add(this.getLambdaContext()); + selectOperatorEClass.getESuperTypes().add(this.getLambdaContext()); + setOfOperatorEClass.getESuperTypes().add(this.getOperator()); + lambdaExpressionEClass.getESuperTypes().add(this.getExpression()); + variableEClass.getESuperTypes().add(this.getRuleObject()); + lambdaContextEClass.getESuperTypes().add(this.getSetOperator()); + ifStatementEClass.getESuperTypes().add(this.getExpression()); + sceneOperatorEClass.getESuperTypes().add(this.getOperator()); + isOnEClass.getESuperTypes().add(this.getSceneOperator()); + allocatableOperatorEClass.getESuperTypes().add(this.getOperator()); + allocatedContentEClass.getESuperTypes().add(this.getAllocatableOperator()); + contentValueEClass.getESuperTypes().add(this.getAllocatableOperator()); + getContentsListEClass.getESuperTypes().add(this.getAllocatableOperator()); + activeContentsEClass.getESuperTypes().add(this.getAllocatableOperator()); + propertyOperatorEClass.getESuperTypes().add(this.getOperator()); + getPropertyEClass.getESuperTypes().add(this.getPropertyOperator()); + stateValueEClass.getESuperTypes().add(this.getContentOperator()); + hasComeLaterThanEClass.getESuperTypes().add(this.getContentOperator()); + hasComeEarlierThanEClass.getESuperTypes().add(this.getContentOperator()); + sugarExpressionBaseEClass.getESuperTypes().add(this.getSugarExpression()); + objectCompareNotEClass.getESuperTypes().add(this.getOperator()); + objectCompareNotEClass.getESuperTypes().add(this.getSugarExpressionBase()); + isAllocatedToEClass.getESuperTypes().add(this.getContentOperator()); + isAllocatedToEClass.getESuperTypes().add(this.getSugarExpressionBase()); + isChangedEClass.getESuperTypes().add(this.getAllocatableOperator()); + isChangedEClass.getESuperTypes().add(this.getSugarExpressionBase()); + isTranslatedToEClass.getESuperTypes().add(this.getAllocatableOperator()); + isTranslatedToEClass.getESuperTypes().add(this.getSugarExpressionBase()); + contentStateOperatorEClass.getESuperTypes().add(this.getOperator()); + nullExpressionEClass.getESuperTypes().add(this.getExpression()); + + // Initialize classes, features, and operations; add parameters + initEClass(modelElementEClass, ModelElement.class, "ModelElement", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getModelElement_Description(), ecorePackage.getEString(), "description", null, 0, 1, + ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(namedElementEClass, NamedElement.class, "NamedElement", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(abstractAllocatableEClass, AbstractAllocatable.class, "AbstractAllocatable", IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractAllocatable_Contents(), this.getAbstractContent(), + this.getAbstractContent_Allocatable(), "contents", null, 0, -1, AbstractAllocatable.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractAllocatable_AllocatableGroup(), this.getAllocatableSet(), + this.getAllocatableSet_Target(), "allocatableGroup", null, 0, -1, AbstractAllocatable.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAbstractAllocatable__GetContentsList(), this.getContent(), "getContentsList", 0, -1, + IS_UNIQUE, !IS_ORDERED); + + initEOperation(getAbstractAllocatable__CollectLeafAllocatable(), this.getAllocatable(), + "collectLeafAllocatable", 0, -1, IS_UNIQUE, !IS_ORDERED); + + initEClass(allocatableEClass, Allocatable.class, "Allocatable", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAllocatable_ArbitrationPolicy(), this.getArbitrationPolicy(), "arbitrationPolicy", null, 0, 1, + Allocatable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getAllocatable_Visibility(), this.getExpression(), null, "visibility", null, 0, 1, + Allocatable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAllocatable__CollectLeafAllocatable(), this.getAllocatable(), "collectLeafAllocatable", 0, -1, + IS_UNIQUE, !IS_ORDERED); + + initEClass(allocatableSetEClass, AllocatableSet.class, "AllocatableSet", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAllocatableSet_Target(), this.getAbstractAllocatable(), + this.getAbstractAllocatable_AllocatableGroup(), "target", null, 0, -1, AllocatableSet.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAllocatableSet__CollectLeafAllocatable(), this.getAllocatable(), "collectLeafAllocatable", 0, + -1, IS_UNIQUE, !IS_ORDERED); + + initEClass(projectEClass, Project.class, "Project", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProject_Version(), ecorePackage.getEString(), "version", null, 0, 1, Project.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProject_DummyName(), ecorePackage.getEString(), "dummyName", null, 0, 1, Project.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getProject__GetName(), ecorePackage.getEString(), "getName", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(packagableElementEClass, PackagableElement.class, "PackagableElement", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(packageEClass, rba.core.Package.class, "Package", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getPackage_Packagableelement(), this.getPackagableElement(), null, "packagableelement", null, 0, + -1, rba.core.Package.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stereotypeEClass, Stereotype.class, "Stereotype", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStereotype_TargetModelName(), ecorePackage.getEString(), "targetModelName", null, 1, 1, + Stereotype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getStereotype_Variables(), this.getVariable(), null, "variables", null, 0, -1, Stereotype.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getStereotype_BodyText(), ecorePackage.getEString(), "bodyText", null, 1, 1, Stereotype.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(tagEClass, Tag.class, "Tag", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTag_Values(), ecorePackage.getEString(), "values", null, 0, -1, Tag.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(ruleObjectEClass, RuleObject.class, "RuleObject", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getRuleObject_Tags(), this.getTag(), null, "tags", null, 0, -1, RuleObject.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEOperation(getRuleObject__GetExpressionType(), this.getExpressionType(), "getExpressionType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(abstractContentEClass, AbstractContent.class, "AbstractContent", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractContent_ContentGroup(), this.getContentSet(), this.getContentSet_Target(), + "contentGroup", null, 0, -1, AbstractContent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractContent_Allocatable(), this.getAbstractAllocatable(), + this.getAbstractAllocatable_Contents(), "allocatable", null, 0, -1, AbstractContent.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAbstractContent__GetAllocatableList(), this.getAllocatable(), "getAllocatableList", 0, -1, + IS_UNIQUE, !IS_ORDERED); + + initEOperation(getAbstractContent__CollectLeafContents(), this.getContent(), "collectLeafContents", 0, -1, + IS_UNIQUE, !IS_ORDERED); + + initEClass(abstractSceneEClass, AbstractScene.class, "AbstractScene", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(sceneEClass, Scene.class, "Scene", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getScene_Global(), ecorePackage.getEBoolean(), "global", "false", 1, 1, Scene.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getScene_Properties(), this.getAbstractProperty(), this.getAbstractProperty_Owner(), + "properties", null, 0, -1, Scene.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getScene__GetExpressionType(), this.getExpressionType(), "getExpressionType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(contentEClass, Content.class, "Content", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getContent_LoserType(), this.getLoserType(), "loserType", "NEVER_GIVEUP", 0, 1, Content.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContent_States(), this.getContentState(), this.getContentState_Owner(), "states", null, 0, -1, + Content.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getContent__CollectLeafContents(), this.getContent(), "collectLeafContents", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEClass(contentSetEClass, ContentSet.class, "ContentSet", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getContentSet_Target(), this.getAbstractContent(), this.getAbstractContent_ContentGroup(), + "target", null, 0, -1, ContentSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getContentSet__CollectLeafContents(), this.getContent(), "collectLeafContents", 0, -1, IS_UNIQUE, + !IS_ORDERED); + + initEClass(contentStateEClass, ContentState.class, "ContentState", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getContentState_Value(), this.getExpression(), null, "value", null, 1, 1, ContentState.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContentState_Owner(), this.getContent(), this.getContent_States(), "owner", null, 0, 1, + ContentState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(abstractPropertyEClass, AbstractProperty.class, "AbstractProperty", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractProperty_Owner(), this.getScene(), this.getScene_Properties(), "owner", null, 0, 1, + AbstractProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getAbstractProperty__GetExpressionType(), this.getExpressionType(), "getExpressionType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(integerPropertyEClass, IntegerProperty.class, "IntegerProperty", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getIntegerProperty_Value(), this.getExpression(), null, "value", null, 1, 1, + IntegerProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(abstractConstraintEClass, AbstractConstraint.class, "AbstractConstraint", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractConstraint_Expression(), this.getExpression(), null, "expression", null, 1, 1, + AbstractConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(constraintEClass, Constraint.class, "Constraint", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConstraint_Runtime(), ecorePackage.getEBoolean(), "runtime", "true", 1, 1, Constraint.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(expressionEClass, Expression.class, "Expression", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getExpression_Type(), this.getExpressionType(), "type", null, 0, 1, Expression.class, + !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEAttribute(getExpression_Expression(), ecorePackage.getEString(), "expression", null, 0, 1, + Expression.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEReference(getExpression_LetStatements(), this.getLetStatement(), null, "letStatements", null, 0, -1, + Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getExpression__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(letStatementEClass, LetStatement.class, "LetStatement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getLetStatement_Variable(), this.getVariable(), null, "variable", null, 1, 1, LetStatement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLetStatement_Body(), this.getExpression(), null, "body", null, 1, 1, LetStatement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getLetStatement__ToString(), ecorePackage.getEString(), "toString", 1, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(complexExpressionEClass, ComplexExpression.class, "ComplexExpression", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getComplexExpression_OtherExpression(), this.getExpression(), null, "otherExpression", null, 1, + 1, ComplexExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getComplexExpression__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getComplexExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getComplexExpression__GetType(), this.getExpressionType(), "getType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(operatorEClass, Operator.class, "Operator", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOperator_Operand(), this.getExpression(), null, "operand", null, 1, -1, Operator.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(isTypeOfEClass, IsTypeOf.class, "IsTypeOf", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIsTypeOf_TagName(), ecorePackage.getEString(), "tagName", null, 1, 1, IsTypeOf.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getIsTypeOf__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsTypeOf__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsTypeOf__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(objectReferenceEClass, ObjectReference.class, "ObjectReference", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getObjectReference_RefObject(), this.getRuleObject(), null, "refObject", null, 0, 1, + ObjectReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getObjectReference__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getObjectReference__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(previousModifierEClass, PreviousModifier.class, "PreviousModifier", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getPreviousModifier_ObjReference(), this.getObjectReference(), null, "objReference", null, 0, 1, + PreviousModifier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getPreviousModifier__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getPreviousModifier__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getPreviousModifier__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(greaterThanOperatorEClass, GreaterThanOperator.class, "GreaterThanOperator", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGreaterThanOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(muchGreaterThanOperatorEClass, MuchGreaterThanOperator.class, "MuchGreaterThanOperator", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMuchGreaterThanOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(lowerThanOperatorEClass, LowerThanOperator.class, "LowerThanOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getLowerThanOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(comparisonOperatorEClass, ComparisonOperator.class, "ComparisonOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getComparisonOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getComparisonOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(equalToOperatorEClass, EqualToOperator.class, "EqualToOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getEqualToOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(comparisonAndEClass, ComparisonAnd.class, "ComparisonAnd", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getComparisonAnd__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getComparisonAnd__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(logicalOperatorEClass, LogicalOperator.class, "LogicalOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getLogicalOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getLogicalOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(andOperatorEClass, AndOperator.class, "AndOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAndOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(orOperatorEClass, OrOperator.class, "OrOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getOrOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(notOperatorEClass, NotOperator.class, "NotOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getNotOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getNotOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isEqualToOperatorEClass, IsEqualToOperator.class, "IsEqualToOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsEqualToOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(isGreaterThanOperatorEClass, IsGreaterThanOperator.class, "IsGreaterThanOperator", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsGreaterThanOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(isLowerThanOperatorEClass, IsLowerThanOperator.class, "IsLowerThanOperator", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsLowerThanOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(isGreaterThanEqualOperatorEClass, IsGreaterThanEqualOperator.class, "IsGreaterThanEqualOperator", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsGreaterThanEqualOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isLowerThanEqualOperatorEClass, IsLowerThanEqualOperator.class, "IsLowerThanEqualOperator", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsLowerThanEqualOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(arithmeticOperatorEClass, ArithmeticOperator.class, "ArithmeticOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getArithmeticOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getArithmeticOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(plusOperatorEClass, PlusOperator.class, "PlusOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getPlusOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(impliesOperatorEClass, ImpliesOperator.class, "ImpliesOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getImpliesOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(contentOperatorEClass, ContentOperator.class, "ContentOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getContentOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isActiveEClass, IsActive.class, "IsActive", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsActive__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsActive__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(getAllocatablesEClass, GetAllocatables.class, "GetAllocatables", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGetAllocatables__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getGetAllocatables__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(hasBeenDisplayedEClass, HasBeenDisplayed.class, "HasBeenDisplayed", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getHasBeenDisplayed__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getHasBeenDisplayed__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(activeStateEClass, ActiveState.class, "ActiveState", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getActiveState__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getActiveState__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(objectCompareEClass, ObjectCompare.class, "ObjectCompare", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getObjectCompare__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getObjectCompare__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getObjectCompare__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(thatOfOperatorEClass, ThatOfOperator.class, "ThatOfOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getThatOfOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getThatOfOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getThatOfOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(valueExpressionEClass, ValueExpression.class, "ValueExpression", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getValueExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getValueExpression__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getValueExpression__GetType(), this.getExpressionType(), "getType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(maxValueEClass, MaxValue.class, "MaxValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMaxValue__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getMaxValue__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(minValueEClass, MinValue.class, "MinValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMinValue__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getMinValue__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(noneValueEClass, NoneValue.class, "NoneValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getNoneValue__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getNoneValue__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(standardValueEClass, StandardValue.class, "StandardValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getStandardValue__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getStandardValue__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(integerValueEClass, IntegerValue.class, "IntegerValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerValue_Value(), ecorePackage.getEInt(), "value", null, 1, 1, IntegerValue.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getIntegerValue__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getIntegerValue__GetExpressionValue(), ecorePackage.getEInt(), "getExpressionValue", 1, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(enumExpressionEClass, EnumExpression.class, "EnumExpression", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getEnumExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getEnumExpression__GetExpressionValue(), ecorePackage.getEEnumerator(), "getExpressionValue", 1, + 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getEnumExpression__GetType(), this.getExpressionType(), "getType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(loserTypeExpressionEClass, LoserTypeExpression.class, "LoserTypeExpression", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLoserTypeExpression_Value(), this.getLoserType(), "value", null, 1, 1, + LoserTypeExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getLoserTypeExpression__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, + 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getLoserTypeExpression__GetExpressionValue(), ecorePackage.getEEnumerator(), + "getExpressionValue", 1, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(arbitrationPolicyExpressionEClass, ArbitrationPolicyExpression.class, "ArbitrationPolicyExpression", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getArbitrationPolicyExpression_Value(), this.getArbitrationPolicy(), "value", null, 1, 1, + ArbitrationPolicyExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getArbitrationPolicyExpression__GetExpressionText(), ecorePackage.getEString(), + "getExpressionText", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getArbitrationPolicyExpression__GetExpressionValue(), ecorePackage.getEEnumerator(), + "getExpressionValue", 1, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(setExpressionEClass, SetExpression.class, "SetExpression", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(setOperatorEClass, SetOperator.class, "SetOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(sizeOperatorEClass, SizeOperator.class, "SizeOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSizeOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getSizeOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getSizeOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(existsOperatorEClass, ExistsOperator.class, "ExistsOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getExistsOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getExistsOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getExistsOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(forAllOperatorEClass, ForAllOperator.class, "ForAllOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getForAllOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getForAllOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getForAllOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(maxOperatorEClass, MaxOperator.class, "MaxOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMaxOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getMaxOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getMaxOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(minOperatorEClass, MinOperator.class, "MinOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getMinOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getMinOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getMinOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(selectOperatorEClass, SelectOperator.class, "SelectOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSelectOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getSelectOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getSelectOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(setOfOperatorEClass, SetOfOperator.class, "SetOfOperator", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSetOfOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getSetOfOperator__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getSetOfOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(lambdaExpressionEClass, LambdaExpression.class, "LambdaExpression", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getLambdaExpression_Context(), this.getLambdaContext(), this.getLambdaContext_Lambda(), + "context", null, 0, 1, LambdaExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLambdaExpression_X(), this.getVariable(), null, "x", null, 1, 1, LambdaExpression.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLambdaExpression_BodyText(), this.getExpression(), null, "bodyText", null, 1, 1, + LambdaExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getLambdaExpression__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getLambdaExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(variableEClass, Variable.class, "Variable", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getVariable__GetExpressionType(), this.getExpressionType(), "getExpressionType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(lambdaContextEClass, LambdaContext.class, "LambdaContext", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getLambdaContext_Lambda(), this.getLambdaExpression(), this.getLambdaExpression_Context(), + "lambda", null, 0, 1, LambdaContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getLambdaContext__GetContextType(), this.getExpressionType(), "getContextType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(ifStatementEClass, IfStatement.class, "IfStatement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getIfStatement_Condition(), this.getExpression(), null, "condition", null, 1, 1, + IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIfStatement_ThenExpression(), this.getExpression(), null, "thenExpression", null, 1, 1, + IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIfStatement_ElseExpression(), this.getExpression(), null, "elseExpression", null, 1, 1, + IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getIfStatement__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getIfStatement__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(sceneOperatorEClass, SceneOperator.class, "SceneOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSceneOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isOnEClass, IsOn.class, "IsOn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsOn__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsOn__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(allocatableOperatorEClass, AllocatableOperator.class, "AllocatableOperator", IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAllocatableOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, + 1, IS_UNIQUE, IS_ORDERED); + + initEClass(allocatedContentEClass, AllocatedContent.class, "AllocatedContent", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getAllocatedContent__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getAllocatedContent__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(contentValueEClass, ContentValue.class, "ContentValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getContentValue__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getContentValue__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(getContentsListEClass, GetContentsList.class, "GetContentsList", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGetContentsList__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getGetContentsList__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(activeContentsEClass, ActiveContents.class, "ActiveContents", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getActiveContents__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getActiveContents__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(propertyOperatorEClass, PropertyOperator.class, "PropertyOperator", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getPropertyOperator__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getPropertyOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(getPropertyEClass, GetProperty.class, "GetProperty", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGetProperty__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getGetProperty__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(stateValueEClass, StateValue.class, "StateValue", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getStateValue__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getStateValue__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(hasComeLaterThanEClass, HasComeLaterThan.class, "HasComeLaterThan", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getHasComeLaterThan__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getHasComeLaterThan__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getHasComeLaterThan__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(hasComeEarlierThanEClass, HasComeEarlierThan.class, "HasComeEarlierThan", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getHasComeEarlierThan__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getHasComeEarlierThan__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getHasComeEarlierThan__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(sugarExpressionEClass, SugarExpression.class, "SugarExpression", IS_ABSTRACT, IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSugarExpression__CanExpand(), ecorePackage.getEBoolean(), "canExpand", 1, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getSugarExpression__GetExpanded(), this.getExpression(), "getExpanded", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(sugarExpressionBaseEClass, SugarExpressionBase.class, "SugarExpressionBase", IS_ABSTRACT, + IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getSugarExpressionBase__CanExpand(), ecorePackage.getEBoolean(), "canExpand", 1, 1, IS_UNIQUE, + IS_ORDERED); + + initEClass(objectCompareNotEClass, ObjectCompareNot.class, "ObjectCompareNot", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getObjectCompareNot__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getObjectCompareNot__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getObjectCompareNot__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isAllocatedToEClass, IsAllocatedTo.class, "IsAllocatedTo", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsAllocatedTo__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsAllocatedTo__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsAllocatedTo__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isChangedEClass, IsChanged.class, "IsChanged", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsChanged__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsChanged__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(isTranslatedToEClass, IsTranslatedTo.class, "IsTranslatedTo", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getIsTranslatedTo__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, + IS_ORDERED); + + initEOperation(getIsTranslatedTo__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getIsTranslatedTo__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEClass(getStateEClass, GetState.class, "GetState", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGetState__GetSymbol(), ecorePackage.getEString(), "getSymbol", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(contentStateOperatorEClass, ContentStateOperator.class, "ContentStateOperator", IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getContentStateOperator__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, + 1, IS_UNIQUE, IS_ORDERED); + + initEClass(nullExpressionEClass, NullExpression.class, "NullExpression", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getNullExpression__GetUnderlyingType(), this.getExpressionType(), "getUnderlyingType", 0, 1, + IS_UNIQUE, IS_ORDERED); + + initEOperation(getNullExpression__GetExpressionText(), ecorePackage.getEString(), "getExpressionText", 0, 1, + IS_UNIQUE, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(arbitrationPolicyEEnum, ArbitrationPolicy.class, "ArbitrationPolicy"); + addEEnumLiteral(arbitrationPolicyEEnum, ArbitrationPolicy.DEFAULT); + addEEnumLiteral(arbitrationPolicyEEnum, ArbitrationPolicy.FIRST_COME_FIRST); + addEEnumLiteral(arbitrationPolicyEEnum, ArbitrationPolicy.LAST_COME_FIRST); + addEEnumLiteral(arbitrationPolicyEEnum, ArbitrationPolicy.PRIORITY_FIRST_COME_FIRST); + addEEnumLiteral(arbitrationPolicyEEnum, ArbitrationPolicy.PRIORITY_LAST_COME_FIRST); + + initEEnum(expressionTypeEEnum, ExpressionType.class, "ExpressionType"); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.VALUE); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.BOOLEAN); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.AREA); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.CONTENT); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SET_OF_AREA); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SET_OF_CONTENT); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.LAMBDA); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SCENE); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.ZONE); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SET_OF_ZONE); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SOUND); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.SET_OF_SOUND); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.PROPERTY); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.CONTENT_STATE); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.ENUM); + addEEnumLiteral(expressionTypeEEnum, ExpressionType.NULL); + + initEEnum(loserTypeEEnum, LoserType.class, "LoserType"); + addEEnumLiteral(loserTypeEEnum, LoserType.NEVER_GIVEUP); + addEEnumLiteral(loserTypeEEnum, LoserType.GOOD_LOSER); + addEEnumLiteral(loserTypeEEnum, LoserType.DO_NOT_GIVEUP_UNTIL_WIN); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/OCL/Import + createImportAnnotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void createImportAnnotations() { + String source = "http://www.eclipse.org/OCL/Import"; + addAnnotation(this, source, new String[] { "ecore", "http://www.eclipse.org/emf/2002/Ecore" }); + } + +} // RBACorePackageImpl diff --git a/rba.model.core/src/rba/core/impl/RuleObjectImpl.java b/rba.model.core/src/rba/core/impl/RuleObjectImpl.java new file mode 100644 index 0000000..bd3687c --- /dev/null +++ b/rba.model.core/src/rba/core/impl/RuleObjectImpl.java @@ -0,0 +1,167 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.RuleObject; +import rba.core.Tag; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Rule Object</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.RuleObjectImpl#getTags <em>Tags</em>}</li> + * </ul> + * + * @generated + */ +public abstract class RuleObjectImpl extends PackagableElementImpl implements RuleObject { + /** + * The cached value of the '{@link #getTags() <em>Tags</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTags() + * @generated + * @ordered + */ + protected EList<Tag> tags; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected RuleObjectImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.RULE_OBJECT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Tag> getTags() { + if (tags == null) { + tags = new EObjectContainmentEList<Tag>(Tag.class, this, RBACorePackage.RULE_OBJECT__TAGS); + } + return tags; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getExpressionType() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.RULE_OBJECT__TAGS: + return ((InternalEList<?>) getTags()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.RULE_OBJECT__TAGS: + return getTags(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.RULE_OBJECT__TAGS: + getTags().clear(); + getTags().addAll((Collection<? extends Tag>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.RULE_OBJECT__TAGS: + getTags().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.RULE_OBJECT__TAGS: + return tags != null && !tags.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.RULE_OBJECT___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // RuleObjectImpl diff --git a/rba.model.core/src/rba/core/impl/SceneImpl.java b/rba.model.core/src/rba/core/impl/SceneImpl.java new file mode 100644 index 0000000..9cdd3a4 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SceneImpl.java @@ -0,0 +1,245 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.AbstractProperty; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.Scene; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Scene</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.SceneImpl#isGlobal <em>Global</em>}</li> + * <li>{@link rba.core.impl.SceneImpl#getProperties <em>Properties</em>}</li> + * </ul> + * + * @generated + */ +public class SceneImpl extends AbstractSceneImpl implements Scene { + /** + * The default value of the '{@link #isGlobal() <em>Global</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isGlobal() + * @generated + * @ordered + */ + protected static final boolean GLOBAL_EDEFAULT = false; + + /** + * The cached value of the '{@link #isGlobal() <em>Global</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #isGlobal() + * @generated + * @ordered + */ + protected boolean global = GLOBAL_EDEFAULT; + + /** + * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list. + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @see #getProperties() + * @generated + * @ordered + */ + protected EList<AbstractProperty> properties; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SceneImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SCENE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public boolean isGlobal() { + return global; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setGlobal(boolean newGlobal) { + boolean oldGlobal = global; + global = newGlobal; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.SCENE__GLOBAL, oldGlobal, global)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<AbstractProperty> getProperties() { + if (properties == null) { + properties = new EObjectContainmentWithInverseEList<AbstractProperty>(AbstractProperty.class, this, + RBACorePackage.SCENE__PROPERTIES, RBACorePackage.ABSTRACT_PROPERTY__OWNER); + } + return properties; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getExpressionType() { + return ExpressionType.SCENE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.SCENE__PROPERTIES: + return ((InternalEList<InternalEObject>) (InternalEList<?>) getProperties()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.SCENE__PROPERTIES: + return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + return isGlobal(); + case RBACorePackage.SCENE__PROPERTIES: + return getProperties(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + setGlobal((Boolean) newValue); + return; + case RBACorePackage.SCENE__PROPERTIES: + getProperties().clear(); + getProperties().addAll((Collection<? extends AbstractProperty>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + setGlobal(GLOBAL_EDEFAULT); + return; + case RBACorePackage.SCENE__PROPERTIES: + getProperties().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.SCENE__GLOBAL: + return global != GLOBAL_EDEFAULT; + case RBACorePackage.SCENE__PROPERTIES: + return properties != null && !properties.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SCENE___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (global: "); + result.append(global); + result.append(')'); + return result.toString(); + } + +} // SceneImpl diff --git a/rba.model.core/src/rba/core/impl/SceneOperatorImpl.java b/rba.model.core/src/rba/core/impl/SceneOperatorImpl.java new file mode 100644 index 0000000..86fdfcf --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SceneOperatorImpl.java @@ -0,0 +1,62 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.RBACorePackage; +import rba.core.SceneOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Scene Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class SceneOperatorImpl extends OperatorImpl implements SceneOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SceneOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SCENE_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SCENE_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // SceneOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/SelectOperatorImpl.java b/rba.model.core/src/rba/core/impl/SelectOperatorImpl.java new file mode 100644 index 0000000..9acb6d1 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SelectOperatorImpl.java @@ -0,0 +1,92 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.SelectOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Select Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class SelectOperatorImpl extends LambdaContextImpl implements SelectOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SelectOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SELECT_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + expressionText.append("{ "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" }"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".select"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + if (!getOperand().isEmpty()) { + Expression first = getOperand().get(0); + return first.getType(); + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SELECT_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.SELECT_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.SELECT_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // SelectOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/SetExpressionImpl.java b/rba.model.core/src/rba/core/impl/SetExpressionImpl.java new file mode 100644 index 0000000..612a015 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SetExpressionImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.RBACorePackage; +import rba.core.SetExpression; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Set Expression</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class SetExpressionImpl extends ExpressionImpl implements SetExpression { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SetExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SET_EXPRESSION; + } + +} // SetExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/SetOfOperatorImpl.java b/rba.model.core/src/rba/core/impl/SetOfOperatorImpl.java new file mode 100644 index 0000000..4500364 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SetOfOperatorImpl.java @@ -0,0 +1,106 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.SetOfOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Set Of Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class SetOfOperatorImpl extends OperatorImpl implements SetOfOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SetOfOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SET_OF_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append("{"); + for (int i = 0; i < expressions.size(); i++) { + rba.core.Expression expression = expressions.get(i); + expressionText.append(expression.getExpressionText()); + if (i == expressions.size() - 1) { + expressionText.append("}"); + } else { + expressionText.append(", "); + } + } + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ""; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + EList<rba.core.Expression> expressions = getOperand(); + if (!expressions.isEmpty() && expressions.get(0) != null) { + rba.core.Expression first = expressions.get(0); + if ((first.getType() == ExpressionType.CONTENT) || (first.getType() == ExpressionType.SET_OF_CONTENT)) { + return ExpressionType.SET_OF_CONTENT; + } else if ((first.getType() == ExpressionType.AREA) || (first.getType() == ExpressionType.SET_OF_AREA)) { + return ExpressionType.SET_OF_AREA; + } else if ((first.getType() == ExpressionType.SOUND) || (first.getType() == ExpressionType.SET_OF_SOUND)) { + return ExpressionType.SET_OF_SOUND; + } else if ((first.getType() == ExpressionType.ZONE) || (first.getType() == ExpressionType.SET_OF_ZONE)) { + return ExpressionType.SET_OF_ZONE; + } else { + return first.getType(); + } + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SET_OF_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.SET_OF_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.SET_OF_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // SetOfOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/SetOperatorImpl.java b/rba.model.core/src/rba/core/impl/SetOperatorImpl.java new file mode 100644 index 0000000..0614ac8 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SetOperatorImpl.java @@ -0,0 +1,33 @@ +/** + */ +package rba.core.impl; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.RBACorePackage; +import rba.core.SetOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Set Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class SetOperatorImpl extends OperatorImpl implements SetOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SetOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SET_OPERATOR; + } + +} // SetOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/SizeOperatorImpl.java b/rba.model.core/src/rba/core/impl/SizeOperatorImpl.java new file mode 100644 index 0000000..df669e5 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/SizeOperatorImpl.java @@ -0,0 +1,83 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.SizeOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Size Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class SizeOperatorImpl extends SetOperatorImpl implements SizeOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected SizeOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.SIZE_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(getSymbol()); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return ".size()"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.SIZE_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.SIZE_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.SIZE_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // SizeOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/StandardValueImpl.java b/rba.model.core/src/rba/core/impl/StandardValueImpl.java new file mode 100644 index 0000000..177510a --- /dev/null +++ b/rba.model.core/src/rba/core/impl/StandardValueImpl.java @@ -0,0 +1,68 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.RBACorePackage; +import rba.core.StandardValue; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Standard Value</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class StandardValueImpl extends ValueExpressionImpl implements StandardValue { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected StandardValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.STANDARD_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + return "STANDARD"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + return 10; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.STANDARD_VALUE___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.STANDARD_VALUE___GET_EXPRESSION_VALUE: + return getExpressionValue(); + } + return super.eInvoke(operationID, arguments); + } + +} // StandardValueImpl diff --git a/rba.model.core/src/rba/core/impl/StateValueImpl.java b/rba.model.core/src/rba/core/impl/StateValueImpl.java new file mode 100644 index 0000000..047682d --- /dev/null +++ b/rba.model.core/src/rba/core/impl/StateValueImpl.java @@ -0,0 +1,69 @@ +/**
+ */
+package rba.core.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import rba.core.ExpressionType;
+import rba.core.RBACorePackage;
+import rba.core.StateValue;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>State Value</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class StateValueImpl extends ContentOperatorImpl implements StateValue {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected StateValueImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBACorePackage.Literals.STATE_VALUE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol() {
+ return ".stateValue()"; //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpressionType getUnderlyingType() {
+ return ExpressionType.VALUE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RBACorePackage.STATE_VALUE___GET_SYMBOL:
+ return getSymbol();
+ case RBACorePackage.STATE_VALUE___GET_UNDERLYING_TYPE:
+ return getUnderlyingType();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // StateValueImpl
diff --git a/rba.model.core/src/rba/core/impl/StereotypeImpl.java b/rba.model.core/src/rba/core/impl/StereotypeImpl.java new file mode 100644 index 0000000..d53306f --- /dev/null +++ b/rba.model.core/src/rba/core/impl/StereotypeImpl.java @@ -0,0 +1,263 @@ +/** + */ +package rba.core.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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import rba.core.RBACorePackage; +import rba.core.Stereotype; +import rba.core.Variable; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Stereotype</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.StereotypeImpl#getTargetModelName <em>Target Model Name</em>}</li> + * <li>{@link rba.core.impl.StereotypeImpl#getVariables <em>Variables</em>}</li> + * <li>{@link rba.core.impl.StereotypeImpl#getBodyText <em>Body Text</em>}</li> + * </ul> + * + * @generated + */ +public class StereotypeImpl extends PackagableElementImpl implements Stereotype { + /** + * The default value of the '{@link #getTargetModelName() <em>Target Model Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTargetModelName() + * @generated + * @ordered + */ + protected static final String TARGET_MODEL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTargetModelName() <em>Target Model Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTargetModelName() + * @generated + * @ordered + */ + protected String targetModelName = TARGET_MODEL_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getVariables() <em>Variables</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVariables() + * @generated + * @ordered + */ + protected EList<Variable> variables; + + /** + * The default value of the '{@link #getBodyText() <em>Body Text</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getBodyText() + * @generated + * @ordered + */ + protected static final String BODY_TEXT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBodyText() <em>Body Text</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * @see #getBodyText() + * @generated + * @ordered + */ + protected String bodyText = BODY_TEXT_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected StereotypeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.STEREOTYPE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getTargetModelName() { + return targetModelName; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setTargetModelName(String newTargetModelName) { + String oldTargetModelName = targetModelName; + targetModelName = newTargetModelName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.STEREOTYPE__TARGET_MODEL_NAME, + oldTargetModelName, targetModelName)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getBodyText() { + return bodyText; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setBodyText(String newBodyText) { + String oldBodyText = bodyText; + bodyText = newBodyText; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.STEREOTYPE__BODY_TEXT, oldBodyText, + bodyText)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<Variable> getVariables() { + if (variables == null) { + variables = new EObjectContainmentEList<Variable>(Variable.class, this, + RBACorePackage.STEREOTYPE__VARIABLES); + } + return variables; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.STEREOTYPE__VARIABLES: + return ((InternalEList<?>) getVariables()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.STEREOTYPE__TARGET_MODEL_NAME: + return getTargetModelName(); + case RBACorePackage.STEREOTYPE__VARIABLES: + return getVariables(); + case RBACorePackage.STEREOTYPE__BODY_TEXT: + return getBodyText(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.STEREOTYPE__TARGET_MODEL_NAME: + setTargetModelName((String) newValue); + return; + case RBACorePackage.STEREOTYPE__VARIABLES: + getVariables().clear(); + getVariables().addAll((Collection<? extends Variable>) newValue); + return; + case RBACorePackage.STEREOTYPE__BODY_TEXT: + setBodyText((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.STEREOTYPE__TARGET_MODEL_NAME: + setTargetModelName(TARGET_MODEL_NAME_EDEFAULT); + return; + case RBACorePackage.STEREOTYPE__VARIABLES: + getVariables().clear(); + return; + case RBACorePackage.STEREOTYPE__BODY_TEXT: + setBodyText(BODY_TEXT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.STEREOTYPE__TARGET_MODEL_NAME: + return TARGET_MODEL_NAME_EDEFAULT == null ? targetModelName != null + : !TARGET_MODEL_NAME_EDEFAULT.equals(targetModelName); + case RBACorePackage.STEREOTYPE__VARIABLES: + return variables != null && !variables.isEmpty(); + case RBACorePackage.STEREOTYPE__BODY_TEXT: + return BODY_TEXT_EDEFAULT == null ? bodyText != null : !BODY_TEXT_EDEFAULT.equals(bodyText); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (targetModelName: "); + result.append(targetModelName); + result.append(", bodyText: "); + result.append(bodyText); + result.append(')'); + return result.toString(); + } + +} // StereotypeImpl diff --git a/rba.model.core/src/rba/core/impl/TagImpl.java b/rba.model.core/src/rba/core/impl/TagImpl.java new file mode 100644 index 0000000..c94583c --- /dev/null +++ b/rba.model.core/src/rba/core/impl/TagImpl.java @@ -0,0 +1,148 @@ +/** + */ +package rba.core.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeEList; + +import rba.core.RBACorePackage; +import rba.core.Tag; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Tag</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.TagImpl#getValues <em>Values</em>}</li> + * </ul> + * + * @generated + */ +public class TagImpl extends NamedElementImpl implements Tag { + /** + * The cached value of the '{@link #getValues() <em>Values</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValues() + * @generated + * @ordered + */ + protected EList<String> values; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TagImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.TAG; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getValues() { + if (values == null) { + values = new EDataTypeEList<String>(String.class, this, RBACorePackage.TAG__VALUES); + } + return values; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.TAG__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.TAG__VALUES: + getValues().clear(); + getValues().addAll((Collection<? extends String>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.TAG__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.TAG__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (values: "); + result.append(values); + result.append(')'); + return result.toString(); + } + +} //TagImpl diff --git a/rba.model.core/src/rba/core/impl/ThatOfOperatorImpl.java b/rba.model.core/src/rba/core/impl/ThatOfOperatorImpl.java new file mode 100644 index 0000000..323fcad --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ThatOfOperatorImpl.java @@ -0,0 +1,83 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.ThatOfOperator; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>That Of Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ThatOfOperatorImpl extends OperatorImpl implements ThatOfOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ThatOfOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.THAT_OF_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + expressionText.append(getSymbol()); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "That of "; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.THAT_OF_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.THAT_OF_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.THAT_OF_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ThatOfOperatorImpl diff --git a/rba.model.core/src/rba/core/impl/ValueExpressionImpl.java b/rba.model.core/src/rba/core/impl/ValueExpressionImpl.java new file mode 100644 index 0000000..b46eb87 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ValueExpressionImpl.java @@ -0,0 +1,81 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExpressionType; +import rba.core.RBACorePackage; +import rba.core.ValueExpression; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Value Expression</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class ValueExpressionImpl extends ExpressionImpl implements ValueExpression { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ValueExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.VALUE_EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public int getExpressionValue() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getType() { + return getUnderlyingType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.VALUE_EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.VALUE_EXPRESSION___GET_EXPRESSION_VALUE: + return getExpressionValue(); + case RBACorePackage.VALUE_EXPRESSION___GET_TYPE: + return getType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ValueExpressionImpl diff --git a/rba.model.core/src/rba/core/impl/VariableImpl.java b/rba.model.core/src/rba/core/impl/VariableImpl.java new file mode 100644 index 0000000..3a16ec6 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/VariableImpl.java @@ -0,0 +1,103 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.EObject; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.LambdaContext; +import rba.core.LambdaExpression; +import rba.core.LetStatement; +import rba.core.RBACorePackage; +import rba.core.Variable; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Variable</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class VariableImpl extends RuleObjectImpl implements Variable { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected VariableImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.VARIABLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getExpressionType() { + EObject container = eContainer(); + if (container instanceof LambdaExpression) { + container = container.eContainer(); + if (container instanceof LambdaContext) { + List<Expression> operands = ((LambdaContext) container).getOperand(); + if (operands.size() > 0) { + switch (operands.get(0).getUnderlyingType()) { + case AREA: + case SET_OF_AREA: + return ExpressionType.AREA; + case CONTENT: + case SET_OF_CONTENT: + return ExpressionType.CONTENT; + case SOUND: + case SET_OF_SOUND: + return ExpressionType.SOUND; + case ZONE: + case SET_OF_ZONE: + return ExpressionType.ZONE; + case SCENE: + return ExpressionType.SCENE; + case PROPERTY: + return ExpressionType.PROPERTY; + case BOOLEAN: + return ExpressionType.BOOLEAN; + case LAMBDA: + return ExpressionType.LAMBDA; + case VALUE: + default: + return ExpressionType.VALUE; + } + } + } + } else if (container instanceof LetStatement) { + Expression body = ((LetStatement) container).getBody(); + if (body != null) { + return body.getUnderlyingType(); + } + } + return ExpressionType.VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.VARIABLE___GET_EXPRESSION_TYPE: + return getExpressionType(); + } + return super.eInvoke(operationID, arguments); + } + +} // VariableImpl |