/**
*
*
*
* $Id$
*/
package net.opengis.wcs11.impl;
import java.util.Collection;
import net.opengis.ows11.OnlineResourceType;
import net.opengis.wcs11.ContentsType;
import net.opengis.wcs11.CoverageSummaryType;
import net.opengis.wcs11.Wcs111Package;
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.EObjectImpl;
import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Contents Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wcs11.impl.ContentsTypeImpl#getCoverageSummary Coverage Summary}
* - {@link net.opengis.wcs11.impl.ContentsTypeImpl#getSupportedCRS Supported CRS}
* - {@link net.opengis.wcs11.impl.ContentsTypeImpl#getSupportedFormat Supported Format}
* - {@link net.opengis.wcs11.impl.ContentsTypeImpl#getOtherSource Other Source}
*
*
*
* @generated
*/
public class ContentsTypeImpl extends EObjectImpl implements ContentsType {
/**
* The cached value of the '{@link #getCoverageSummary() Coverage Summary}' containment reference list.
*
*
* @see #getCoverageSummary()
* @generated
* @ordered
*/
protected EList coverageSummary;
/**
* The cached value of the '{@link #getSupportedCRS() Supported CRS}' attribute list.
*
*
* @see #getSupportedCRS()
* @generated
* @ordered
*/
protected EList supportedCRS;
/**
* The cached value of the '{@link #getSupportedFormat() Supported Format}' attribute list.
*
*
* @see #getSupportedFormat()
* @generated
* @ordered
*/
protected EList supportedFormat;
/**
* The cached value of the '{@link #getOtherSource() Other Source}' containment reference list.
*
*
* @see #getOtherSource()
* @generated
* @ordered
*/
protected EList otherSource;
/**
*
*
* @generated
*/
protected ContentsTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wcs111Package.Literals.CONTENTS_TYPE;
}
/**
*
*
* @generated
*/
public EList getCoverageSummary() {
if (coverageSummary == null) {
coverageSummary = new EObjectContainmentEList(CoverageSummaryType.class, this, Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY);
}
return coverageSummary;
}
/**
*
*
* @generated
*/
public EList getSupportedCRS() {
if (supportedCRS == null) {
supportedCRS = new EDataTypeEList(String.class, this, Wcs111Package.CONTENTS_TYPE__SUPPORTED_CRS);
}
return supportedCRS;
}
/**
*
*
* @generated
*/
public EList getSupportedFormat() {
if (supportedFormat == null) {
supportedFormat = new EDataTypeEList(String.class, this, Wcs111Package.CONTENTS_TYPE__SUPPORTED_FORMAT);
}
return supportedFormat;
}
/**
*
*
* @generated
*/
public EList getOtherSource() {
if (otherSource == null) {
otherSource = new EObjectContainmentEList(OnlineResourceType.class, this, Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE);
}
return otherSource;
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY:
return ((InternalEList)getCoverageSummary()).basicRemove(otherEnd, msgs);
case Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE:
return ((InternalEList)getOtherSource()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY:
return getCoverageSummary();
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_CRS:
return getSupportedCRS();
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_FORMAT:
return getSupportedFormat();
case Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE:
return getOtherSource();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY:
getCoverageSummary().clear();
getCoverageSummary().addAll((Collection)newValue);
return;
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_CRS:
getSupportedCRS().clear();
getSupportedCRS().addAll((Collection)newValue);
return;
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_FORMAT:
getSupportedFormat().clear();
getSupportedFormat().addAll((Collection)newValue);
return;
case Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE:
getOtherSource().clear();
getOtherSource().addAll((Collection)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY:
getCoverageSummary().clear();
return;
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_CRS:
getSupportedCRS().clear();
return;
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_FORMAT:
getSupportedFormat().clear();
return;
case Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE:
getOtherSource().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wcs111Package.CONTENTS_TYPE__COVERAGE_SUMMARY:
return coverageSummary != null && !coverageSummary.isEmpty();
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_CRS:
return supportedCRS != null && !supportedCRS.isEmpty();
case Wcs111Package.CONTENTS_TYPE__SUPPORTED_FORMAT:
return supportedFormat != null && !supportedFormat.isEmpty();
case Wcs111Package.CONTENTS_TYPE__OTHER_SOURCE:
return otherSource != null && !otherSource.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (supportedCRS: ");
result.append(supportedCRS);
result.append(", supportedFormat: ");
result.append(supportedFormat);
result.append(')');
return result.toString();
}
} //ContentsTypeImpl