From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- .../src/rba/core/impl/ContentStateImpl.java | 256 +++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 rba.model.core/src/rba/core/impl/ContentStateImpl.java (limited to 'rba.model.core/src/rba/core/impl/ContentStateImpl.java') 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; + +/** + * An implementation of the model object 'Content State'. + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class ContentStateImpl extends RuleObjectImpl implements ContentState { + /** + * The cached value of the '{@link #getValue() Value}' containment reference. + * + * @see #getValue() + * @generated + * @ordered + */ + protected Expression value; + + /** + * + * @generated + */ + protected ContentStateImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.CONTENT_STATE; + } + + /** + * + * @generated + */ + public Expression getValue() { + return value; + } + + /** + * + * @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; + } + + /** + * + * @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)); + } + + /** + * + * @generated + */ + public Content getOwner() { + if (eContainerFeatureID() != RBACorePackage.CONTENT_STATE__OWNER) + return null; + return (Content) eInternalContainer(); + } + + /** + * + * @generated + */ + public NotificationChain basicSetOwner(Content newOwner, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newOwner, RBACorePackage.CONTENT_STATE__OWNER, msgs); + return msgs; + } + + /** + * + * @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)); + } + + /** + * + * @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); + } + + /** + * + * @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); + } + + /** + * + * @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); + } + + /** + * + * @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); + } + + /** + * + * @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); + } + + /** + * + * @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); + } + + /** + * + * @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 -- cgit 1.2.3-korg