/** */ package crossingScenario.impl; import crossingScenario.Actor; import crossingScenario.CrossingScenarioPackage; import crossingScenario.Relation; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'Relation'. * *

* The following features are implemented: *

* * * @generated */ public abstract class RelationImpl extends MinimalEObjectImpl.Container implements Relation { /** * The cached value of the '{@link #getTarget() Target}' reference. * * * @see #getTarget() * @generated * @ordered */ protected Actor target; /** * The cached value of the '{@link #getSource() Source}' reference. * * * @see #getSource() * @generated * @ordered */ protected Actor source; /** * * * @generated */ protected RelationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CrossingScenarioPackage.Literals.RELATION; } /** * * * @generated */ @Override public Actor getTarget() { if (target != null && target.eIsProxy()) { InternalEObject oldTarget = (InternalEObject)target; target = (Actor)eResolveProxy(oldTarget); if (target != oldTarget) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); } } return target; } /** * * * @generated */ public Actor basicGetTarget() { return target; } /** * * * @generated */ @Override public void setTarget(Actor newTarget) { Actor oldTarget = target; target = newTarget; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__TARGET, oldTarget, target)); } /** * * * @generated */ @Override public Actor getSource() { if (source != null && source.eIsProxy()) { InternalEObject oldSource = (InternalEObject)source; source = (Actor)eResolveProxy(oldSource); if (source != oldSource) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); } } return source; } /** * * * @generated */ public Actor basicGetSource() { return source; } /** * * * @generated */ @Override public void setSource(Actor newSource) { Actor oldSource = source; source = newSource; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.RELATION__SOURCE, oldSource, source)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CrossingScenarioPackage.RELATION__TARGET: if (resolve) return getTarget(); return basicGetTarget(); case CrossingScenarioPackage.RELATION__SOURCE: if (resolve) return getSource(); return basicGetSource(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CrossingScenarioPackage.RELATION__TARGET: setTarget((Actor)newValue); return; case CrossingScenarioPackage.RELATION__SOURCE: setSource((Actor)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CrossingScenarioPackage.RELATION__TARGET: setTarget((Actor)null); return; case CrossingScenarioPackage.RELATION__SOURCE: setSource((Actor)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CrossingScenarioPackage.RELATION__TARGET: return target != null; case CrossingScenarioPackage.RELATION__SOURCE: return source != null; } return super.eIsSet(featureID); } } //RelationImpl