/** */ package net.certware.evidence.hugin.netDSL.impl; import net.certware.evidence.hugin.netDSL.NetDSLPackage; import net.certware.evidence.hugin.netDSL.OutputBinding; import net.certware.evidence.hugin.netDSL.OutputBindings; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Output Bindings</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.evidence.hugin.netDSL.impl.OutputBindingsImpl#getLhs <em>Lhs</em>}</li> * <li>{@link net.certware.evidence.hugin.netDSL.impl.OutputBindingsImpl#getRhs <em>Rhs</em>}</li> * </ul> * </p> * * @generated */ public class OutputBindingsImpl extends MinimalEObjectImpl.Container implements OutputBindings { /** * The cached value of the '{@link #getLhs() <em>Lhs</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLhs() * @generated * @ordered */ protected OutputBinding lhs; /** * The cached value of the '{@link #getRhs() <em>Rhs</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRhs() * @generated * @ordered */ protected OutputBindings rhs; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected OutputBindingsImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return NetDSLPackage.Literals.OUTPUT_BINDINGS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OutputBinding getLhs() { return lhs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetLhs(OutputBinding newLhs, NotificationChain msgs) { OutputBinding oldLhs = lhs; lhs = newLhs; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NetDSLPackage.OUTPUT_BINDINGS__LHS, oldLhs, newLhs); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLhs(OutputBinding newLhs) { if (newLhs != lhs) { NotificationChain msgs = null; if (lhs != null) msgs = ((InternalEObject)lhs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.OUTPUT_BINDINGS__LHS, null, msgs); if (newLhs != null) msgs = ((InternalEObject)newLhs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.OUTPUT_BINDINGS__LHS, null, msgs); msgs = basicSetLhs(newLhs, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NetDSLPackage.OUTPUT_BINDINGS__LHS, newLhs, newLhs)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OutputBindings getRhs() { return rhs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetRhs(OutputBindings newRhs, NotificationChain msgs) { OutputBindings oldRhs = rhs; rhs = newRhs; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NetDSLPackage.OUTPUT_BINDINGS__RHS, oldRhs, newRhs); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setRhs(OutputBindings newRhs) { if (newRhs != rhs) { NotificationChain msgs = null; if (rhs != null) msgs = ((InternalEObject)rhs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.OUTPUT_BINDINGS__RHS, null, msgs); if (newRhs != null) msgs = ((InternalEObject)newRhs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.OUTPUT_BINDINGS__RHS, null, msgs); msgs = basicSetRhs(newRhs, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NetDSLPackage.OUTPUT_BINDINGS__RHS, newRhs, newRhs)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case NetDSLPackage.OUTPUT_BINDINGS__LHS: return basicSetLhs(null, msgs); case NetDSLPackage.OUTPUT_BINDINGS__RHS: return basicSetRhs(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case NetDSLPackage.OUTPUT_BINDINGS__LHS: return getLhs(); case NetDSLPackage.OUTPUT_BINDINGS__RHS: return getRhs(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case NetDSLPackage.OUTPUT_BINDINGS__LHS: setLhs((OutputBinding)newValue); return; case NetDSLPackage.OUTPUT_BINDINGS__RHS: setRhs((OutputBindings)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case NetDSLPackage.OUTPUT_BINDINGS__LHS: setLhs((OutputBinding)null); return; case NetDSLPackage.OUTPUT_BINDINGS__RHS: setRhs((OutputBindings)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case NetDSLPackage.OUTPUT_BINDINGS__LHS: return lhs != null; case NetDSLPackage.OUTPUT_BINDINGS__RHS: return rhs != null; } return super.eIsSet(featureID); } } //OutputBindingsImpl