/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.wcs10.impl; import net.opengis.wcs10.TypedLiteralType; import net.opengis.wcs10.ValuesType; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Values Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.opengis.wcs10.impl.ValuesTypeImpl#getDefault <em>Default</em>}</li> * </ul> * </p> * * @generated */ public class ValuesTypeImpl extends ValueEnumTypeImpl implements ValuesType { /** * The cached value of the '{@link #getDefault() <em>Default</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDefault() * @generated * @ordered */ protected TypedLiteralType default_; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ValuesTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return Wcs10Package.Literals.VALUES_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TypedLiteralType getDefault() { return default_; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetDefault(TypedLiteralType newDefault, NotificationChain msgs) { TypedLiteralType oldDefault = default_; default_ = newDefault; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.VALUES_TYPE__DEFAULT, oldDefault, newDefault); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDefault(TypedLiteralType newDefault) { if (newDefault != default_) { NotificationChain msgs = null; if (default_ != null) msgs = ((InternalEObject)default_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs10Package.VALUES_TYPE__DEFAULT, null, msgs); if (newDefault != null) msgs = ((InternalEObject)newDefault).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs10Package.VALUES_TYPE__DEFAULT, null, msgs); msgs = basicSetDefault(newDefault, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.VALUES_TYPE__DEFAULT, newDefault, newDefault)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Wcs10Package.VALUES_TYPE__DEFAULT: return basicSetDefault(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.VALUES_TYPE__DEFAULT: return getDefault(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Wcs10Package.VALUES_TYPE__DEFAULT: setDefault((TypedLiteralType)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case Wcs10Package.VALUES_TYPE__DEFAULT: setDefault((TypedLiteralType)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Wcs10Package.VALUES_TYPE__DEFAULT: return default_ != null; } return super.eIsSet(featureID); } } //ValuesTypeImpl