All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openxma.dsl.dom.model.impl.PropertyAssignmentImpl Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.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.impl.MinimalEObjectImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Expression;
import org.openxma.dsl.dom.model.PropertyAssignment;
import org.openxma.dsl.dom.model.PropertyValue;

/**
 * 
 * An implementation of the model object 'Property Assignment'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.PropertyAssignmentImpl#getProperty Property}
  • *
  • {@link org.openxma.dsl.dom.model.impl.PropertyAssignmentImpl#getExpression Expression}
  • *
*

* * @generated */ public class PropertyAssignmentImpl extends MinimalEObjectImpl.Container implements PropertyAssignment { /** * The cached value of the '{@link #getProperty() Property}' containment reference. * * * @see #getProperty() * @generated * @ordered */ protected PropertyValue property; /** * The cached value of the '{@link #getExpression() Expression}' containment reference. * * * @see #getExpression() * @generated * @ordered */ protected Expression expression; /** * * * @generated */ protected PropertyAssignmentImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.PROPERTY_ASSIGNMENT; } /** * * * @generated */ public PropertyValue getProperty() { return property; } /** * * * @generated */ public NotificationChain basicSetProperty(PropertyValue newProperty, NotificationChain msgs) { PropertyValue oldProperty = property; property = newProperty; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY_ASSIGNMENT__PROPERTY, oldProperty, newProperty); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setProperty(PropertyValue newProperty) { if (newProperty != property) { NotificationChain msgs = null; if (property != null) msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.PROPERTY_ASSIGNMENT__PROPERTY, null, msgs); if (newProperty != null) msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.PROPERTY_ASSIGNMENT__PROPERTY, null, msgs); msgs = basicSetProperty(newProperty, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY_ASSIGNMENT__PROPERTY, newProperty, newProperty)); } /** * * * @generated */ public Expression getExpression() { return expression; } /** * * * @generated */ public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) { Expression oldExpression = expression; expression = newExpression; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION, oldExpression, newExpression); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setExpression(Expression newExpression) { if (newExpression != expression) { NotificationChain msgs = null; if (expression != null) msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION, null, msgs); if (newExpression != null) msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION, null, msgs); msgs = basicSetExpression(newExpression, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION, newExpression, newExpression)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.PROPERTY_ASSIGNMENT__PROPERTY: return basicSetProperty(null, msgs); case DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION: return basicSetExpression(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.PROPERTY_ASSIGNMENT__PROPERTY: return getProperty(); case DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION: return getExpression(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.PROPERTY_ASSIGNMENT__PROPERTY: setProperty((PropertyValue)newValue); return; case DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION: setExpression((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.PROPERTY_ASSIGNMENT__PROPERTY: setProperty((PropertyValue)null); return; case DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION: setExpression((Expression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.PROPERTY_ASSIGNMENT__PROPERTY: return property != null; case DomPackage.PROPERTY_ASSIGNMENT__EXPRESSION: return expression != null; } return super.eIsSet(featureID); } } //PropertyAssignmentImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy