/** */ package net.certware.evidence.hugin.netDSL.impl; import net.certware.evidence.hugin.netDSL.DomainDefinition; import net.certware.evidence.hugin.netDSL.Model; import net.certware.evidence.hugin.netDSL.NetDSLPackage; 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>Model</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.evidence.hugin.netDSL.impl.ModelImpl#getDomain <em>Domain</em>}</li> * </ul> * </p> * * @generated */ public class ModelImpl extends MinimalEObjectImpl.Container implements Model { /** * The cached value of the '{@link #getDomain() <em>Domain</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDomain() * @generated * @ordered */ protected DomainDefinition domain; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ModelImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return NetDSLPackage.Literals.MODEL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DomainDefinition getDomain() { return domain; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetDomain(DomainDefinition newDomain, NotificationChain msgs) { DomainDefinition oldDomain = domain; domain = newDomain; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NetDSLPackage.MODEL__DOMAIN, oldDomain, newDomain); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDomain(DomainDefinition newDomain) { if (newDomain != domain) { NotificationChain msgs = null; if (domain != null) msgs = ((InternalEObject)domain).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.MODEL__DOMAIN, null, msgs); if (newDomain != null) msgs = ((InternalEObject)newDomain).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NetDSLPackage.MODEL__DOMAIN, null, msgs); msgs = basicSetDomain(newDomain, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NetDSLPackage.MODEL__DOMAIN, newDomain, newDomain)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case NetDSLPackage.MODEL__DOMAIN: return basicSetDomain(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.MODEL__DOMAIN: return getDomain(); } 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.MODEL__DOMAIN: setDomain((DomainDefinition)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case NetDSLPackage.MODEL__DOMAIN: setDomain((DomainDefinition)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case NetDSLPackage.MODEL__DOMAIN: return domain != null; } return super.eIsSet(featureID); } } //ModelImpl