/**
*
*
*
* $Id$
*/
package net.opengis.wcs11.impl;
import java.util.Collection;
import net.opengis.wcs11.InterpolationMethodType;
import net.opengis.wcs11.InterpolationMethodsType;
import net.opengis.wcs11.Wcs111Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
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;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Interpolation Methods Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wcs11.impl.InterpolationMethodsTypeImpl#getInterpolationMethod Interpolation Method}
* - {@link net.opengis.wcs11.impl.InterpolationMethodsTypeImpl#getDefault Default}
*
*
*
* @generated
*/
public class InterpolationMethodsTypeImpl extends EObjectImpl implements InterpolationMethodsType {
/**
* The cached value of the '{@link #getInterpolationMethod() Interpolation Method}' containment reference list.
*
*
* @see #getInterpolationMethod()
* @generated
* @ordered
*/
protected EList interpolationMethod;
/**
* The default value of the '{@link #getDefault() Default}' attribute.
*
*
* @see #getDefault()
* @generated
* @ordered
*/
protected static final String DEFAULT_EDEFAULT = null;
/**
* The cached value of the '{@link #getDefault() Default}' attribute.
*
*
* @see #getDefault()
* @generated
* @ordered
*/
protected String default_ = DEFAULT_EDEFAULT;
/**
*
*
* @generated
*/
protected InterpolationMethodsTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wcs111Package.Literals.INTERPOLATION_METHODS_TYPE;
}
/**
*
*
* @generated
*/
public EList getInterpolationMethod() {
if (interpolationMethod == null) {
interpolationMethod = new EObjectContainmentEList(InterpolationMethodType.class, this, Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD);
}
return interpolationMethod;
}
/**
*
*
* @generated
*/
public String getDefault() {
return default_;
}
/**
*
*
* @generated
*/
public void setDefault(String newDefault) {
String oldDefault = default_;
default_ = newDefault;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.INTERPOLATION_METHODS_TYPE__DEFAULT, oldDefault, default_));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD:
return ((InternalEList)getInterpolationMethod()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD:
return getInterpolationMethod();
case Wcs111Package.INTERPOLATION_METHODS_TYPE__DEFAULT:
return getDefault();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD:
getInterpolationMethod().clear();
getInterpolationMethod().addAll((Collection)newValue);
return;
case Wcs111Package.INTERPOLATION_METHODS_TYPE__DEFAULT:
setDefault((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD:
getInterpolationMethod().clear();
return;
case Wcs111Package.INTERPOLATION_METHODS_TYPE__DEFAULT:
setDefault(DEFAULT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wcs111Package.INTERPOLATION_METHODS_TYPE__INTERPOLATION_METHOD:
return interpolationMethod != null && !interpolationMethod.isEmpty();
case Wcs111Package.INTERPOLATION_METHODS_TYPE__DEFAULT:
return DEFAULT_EDEFAULT == null ? default_ != null : !DEFAULT_EDEFAULT.equals(default_);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (default: ");
result.append(default_);
result.append(')');
return result.toString();
}
} //InterpolationMethodsTypeImpl