/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.wcs10.impl; import net.opengis.wcs10.OnlineResourceType; import net.opengis.wcs10.PostType; import net.opengis.wcs10.Wcs10Package; 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.EObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Post Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.opengis.wcs10.impl.PostTypeImpl#getOnlineResource <em>Online Resource</em>}</li> * </ul> * </p> * * @generated */ public class PostTypeImpl extends EObjectImpl implements PostType { /** * The cached value of the '{@link #getOnlineResource() <em>Online Resource</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOnlineResource() * @generated * @ordered */ protected OnlineResourceType onlineResource; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PostTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return Wcs10Package.Literals.POST_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OnlineResourceType getOnlineResource() { return onlineResource; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetOnlineResource(OnlineResourceType newOnlineResource, NotificationChain msgs) { OnlineResourceType oldOnlineResource = onlineResource; onlineResource = newOnlineResource; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.POST_TYPE__ONLINE_RESOURCE, oldOnlineResource, newOnlineResource); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOnlineResource(OnlineResourceType newOnlineResource) { if (newOnlineResource != onlineResource) { NotificationChain msgs = null; if (onlineResource != null) msgs = ((InternalEObject)onlineResource).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs10Package.POST_TYPE__ONLINE_RESOURCE, null, msgs); if (newOnlineResource != null) msgs = ((InternalEObject)newOnlineResource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs10Package.POST_TYPE__ONLINE_RESOURCE, null, msgs); msgs = basicSetOnlineResource(newOnlineResource, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.POST_TYPE__ONLINE_RESOURCE, newOnlineResource, newOnlineResource)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Wcs10Package.POST_TYPE__ONLINE_RESOURCE: return basicSetOnlineResource(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Wcs10Package.POST_TYPE__ONLINE_RESOURCE: return getOnlineResource(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Wcs10Package.POST_TYPE__ONLINE_RESOURCE: setOnlineResource((OnlineResourceType)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case Wcs10Package.POST_TYPE__ONLINE_RESOURCE: setOnlineResource((OnlineResourceType)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Wcs10Package.POST_TYPE__ONLINE_RESOURCE: return onlineResource != null; } return super.eIsSet(featureID); } } //PostTypeImpl