/** */ package hu.bme.mit.inf.dslreasoner.domains.satellite.impl; import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; 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 'Directed Communication Link'. * *

* The following features are implemented: *

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