/** */ package hu.bme.mit.inf.dslreasoner.domains.satellite.impl; import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload; import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; 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; /** * * An implementation of the model object 'Spacecraft'. * *

* The following features are implemented: *

* * * @generated */ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements Spacecraft { /** * The cached value of the '{@link #getPayload() Payload}' containment reference. * * * @see #getPayload() * @generated * @ordered */ protected Payload payload; /** * * * @generated */ protected SpacecraftImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SatellitePackage.Literals.SPACECRAFT; } /** * * * @generated */ @Override public Payload getPayload() { return payload; } /** * * * @generated */ public NotificationChain basicSetPayload(Payload newPayload, NotificationChain msgs) { Payload oldPayload = payload; payload = newPayload; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, oldPayload, newPayload); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setPayload(Payload newPayload) { if (newPayload != payload) { NotificationChain msgs = null; if (payload != null) msgs = ((InternalEObject) payload).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); if (newPayload != null) msgs = ((InternalEObject) newPayload).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); msgs = basicSetPayload(newPayload, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, newPayload, newPayload)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SatellitePackage.SPACECRAFT__PAYLOAD: return basicSetPayload(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SatellitePackage.SPACECRAFT__PAYLOAD: return getPayload(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SatellitePackage.SPACECRAFT__PAYLOAD: setPayload((Payload) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SatellitePackage.SPACECRAFT__PAYLOAD: setPayload((Payload) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SatellitePackage.SPACECRAFT__PAYLOAD: return payload != null; } return super.eIsSet(featureID); } } //SpacecraftImpl