/** */ package net.certware.argument.sfp.semiFormalProof.impl; import net.certware.argument.sfp.semiFormalProof.Conjunction; import net.certware.argument.sfp.semiFormalProof.SemiFormalProofPackage; 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>Conjunction</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.argument.sfp.semiFormalProof.impl.ConjunctionImpl#getLhs <em>Lhs</em>}</li> * <li>{@link net.certware.argument.sfp.semiFormalProof.impl.ConjunctionImpl#getRhs <em>Rhs</em>}</li> * </ul> * </p> * * @generated */ public class ConjunctionImpl extends MinimalEObjectImpl.Container implements Conjunction { /** * The default value of the '{@link #getLhs() <em>Lhs</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLhs() * @generated * @ordered */ protected static final String LHS_EDEFAULT = null; /** * The cached value of the '{@link #getLhs() <em>Lhs</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLhs() * @generated * @ordered */ protected String lhs = LHS_EDEFAULT; /** * The cached value of the '{@link #getRhs() <em>Rhs</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRhs() * @generated * @ordered */ protected Conjunction rhs; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ConjunctionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SemiFormalProofPackage.Literals.CONJUNCTION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLhs() { return lhs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLhs(String newLhs) { String oldLhs = lhs; lhs = newLhs; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SemiFormalProofPackage.CONJUNCTION__LHS, oldLhs, lhs)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Conjunction getRhs() { return rhs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetRhs(Conjunction newRhs, NotificationChain msgs) { Conjunction oldRhs = rhs; rhs = newRhs; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SemiFormalProofPackage.CONJUNCTION__RHS, oldRhs, newRhs); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setRhs(Conjunction newRhs) { if (newRhs != rhs) { NotificationChain msgs = null; if (rhs != null) msgs = ((InternalEObject)rhs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SemiFormalProofPackage.CONJUNCTION__RHS, null, msgs); if (newRhs != null) msgs = ((InternalEObject)newRhs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SemiFormalProofPackage.CONJUNCTION__RHS, null, msgs); msgs = basicSetRhs(newRhs, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SemiFormalProofPackage.CONJUNCTION__RHS, newRhs, newRhs)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SemiFormalProofPackage.CONJUNCTION__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 SemiFormalProofPackage.CONJUNCTION__LHS: return getLhs(); case SemiFormalProofPackage.CONJUNCTION__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 SemiFormalProofPackage.CONJUNCTION__LHS: setLhs((String)newValue); return; case SemiFormalProofPackage.CONJUNCTION__RHS: setRhs((Conjunction)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SemiFormalProofPackage.CONJUNCTION__LHS: setLhs(LHS_EDEFAULT); return; case SemiFormalProofPackage.CONJUNCTION__RHS: setRhs((Conjunction)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SemiFormalProofPackage.CONJUNCTION__LHS: return LHS_EDEFAULT == null ? lhs != null : !LHS_EDEFAULT.equals(lhs); case SemiFormalProofPackage.CONJUNCTION__RHS: return rhs != null; } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (lhs: "); result.append(lhs); result.append(')'); return result.toString(); } } //ConjunctionImpl