| /** |
| */ |
| package nestedcondition.impl; |
| |
| import graph.Node; |
| |
| import nestedcondition.NestedconditionPackage; |
| import nestedcondition.NodeMapping; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Node Mapping</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link nestedcondition.impl.NodeMappingImpl#getOrigin <em>Origin</em>}</li> |
| * <li>{@link nestedcondition.impl.NodeMappingImpl#getImage <em>Image</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class NodeMappingImpl extends MinimalEObjectImpl.Container implements NodeMapping { |
| /** |
| * The cached value of the '{@link #getOrigin() <em>Origin</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOrigin() |
| * @generated |
| * @ordered |
| */ |
| protected Node origin; |
| |
| /** |
| * The cached value of the '{@link #getImage() <em>Image</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getImage() |
| * @generated |
| * @ordered |
| */ |
| protected Node image; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected NodeMappingImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return NestedconditionPackage.Literals.NODE_MAPPING; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Node getOrigin() { |
| if (origin != null && origin.eIsProxy()) { |
| InternalEObject oldOrigin = (InternalEObject)origin; |
| origin = (Node)eResolveProxy(oldOrigin); |
| if (origin != oldOrigin) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, NestedconditionPackage.NODE_MAPPING__ORIGIN, oldOrigin, origin)); |
| } |
| } |
| return origin; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Node basicGetOrigin() { |
| return origin; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOrigin(Node newOrigin) { |
| Node oldOrigin = origin; |
| origin = newOrigin; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, NestedconditionPackage.NODE_MAPPING__ORIGIN, oldOrigin, origin)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Node getImage() { |
| if (image != null && image.eIsProxy()) { |
| InternalEObject oldImage = (InternalEObject)image; |
| image = (Node)eResolveProxy(oldImage); |
| if (image != oldImage) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, NestedconditionPackage.NODE_MAPPING__IMAGE, oldImage, image)); |
| } |
| } |
| return image; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Node basicGetImage() { |
| return image; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setImage(Node newImage) { |
| Node oldImage = image; |
| image = newImage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, NestedconditionPackage.NODE_MAPPING__IMAGE, oldImage, image)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case NestedconditionPackage.NODE_MAPPING__ORIGIN: |
| if (resolve) return getOrigin(); |
| return basicGetOrigin(); |
| case NestedconditionPackage.NODE_MAPPING__IMAGE: |
| if (resolve) return getImage(); |
| return basicGetImage(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case NestedconditionPackage.NODE_MAPPING__ORIGIN: |
| setOrigin((Node)newValue); |
| return; |
| case NestedconditionPackage.NODE_MAPPING__IMAGE: |
| setImage((Node)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case NestedconditionPackage.NODE_MAPPING__ORIGIN: |
| setOrigin((Node)null); |
| return; |
| case NestedconditionPackage.NODE_MAPPING__IMAGE: |
| setImage((Node)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case NestedconditionPackage.NODE_MAPPING__ORIGIN: |
| return origin != null; |
| case NestedconditionPackage.NODE_MAPPING__IMAGE: |
| return image != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //NodeMappingImpl |