/**
*
*
*
* $Id$
*/
package net.opengis.wcs11.impl;
import net.opengis.wcs11.CoverageDomainType;
import net.opengis.wcs11.SpatialDomainType;
import net.opengis.wcs11.TimeSequenceType;
import net.opengis.wcs11.Wcs111Package;
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;
/**
*
* An implementation of the model object 'Coverage Domain Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wcs11.impl.CoverageDomainTypeImpl#getSpatialDomain Spatial Domain}
* - {@link net.opengis.wcs11.impl.CoverageDomainTypeImpl#getTemporalDomain Temporal Domain}
*
*
*
* @generated
*/
public class CoverageDomainTypeImpl extends EObjectImpl implements CoverageDomainType {
/**
* The cached value of the '{@link #getSpatialDomain() Spatial Domain}' containment reference.
*
*
* @see #getSpatialDomain()
* @generated
* @ordered
*/
protected SpatialDomainType spatialDomain;
/**
* The cached value of the '{@link #getTemporalDomain() Temporal Domain}' containment reference.
*
*
* @see #getTemporalDomain()
* @generated
* @ordered
*/
protected TimeSequenceType temporalDomain;
/**
*
*
* @generated
*/
protected CoverageDomainTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wcs111Package.Literals.COVERAGE_DOMAIN_TYPE;
}
/**
*
*
* @generated
*/
public SpatialDomainType getSpatialDomain() {
return spatialDomain;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetSpatialDomain(SpatialDomainType newSpatialDomain, NotificationChain msgs) {
SpatialDomainType oldSpatialDomain = spatialDomain;
spatialDomain = newSpatialDomain;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN, oldSpatialDomain, newSpatialDomain);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setSpatialDomain(SpatialDomainType newSpatialDomain) {
if (newSpatialDomain != spatialDomain) {
NotificationChain msgs = null;
if (spatialDomain != null)
msgs = ((InternalEObject)spatialDomain).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN, null, msgs);
if (newSpatialDomain != null)
msgs = ((InternalEObject)newSpatialDomain).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN, null, msgs);
msgs = basicSetSpatialDomain(newSpatialDomain, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN, newSpatialDomain, newSpatialDomain));
}
/**
*
*
* @generated
*/
public TimeSequenceType getTemporalDomain() {
return temporalDomain;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetTemporalDomain(TimeSequenceType newTemporalDomain, NotificationChain msgs) {
TimeSequenceType oldTemporalDomain = temporalDomain;
temporalDomain = newTemporalDomain;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN, oldTemporalDomain, newTemporalDomain);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setTemporalDomain(TimeSequenceType newTemporalDomain) {
if (newTemporalDomain != temporalDomain) {
NotificationChain msgs = null;
if (temporalDomain != null)
msgs = ((InternalEObject)temporalDomain).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN, null, msgs);
if (newTemporalDomain != null)
msgs = ((InternalEObject)newTemporalDomain).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN, null, msgs);
msgs = basicSetTemporalDomain(newTemporalDomain, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN, newTemporalDomain, newTemporalDomain));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN:
return basicSetSpatialDomain(null, msgs);
case Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN:
return basicSetTemporalDomain(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN:
return getSpatialDomain();
case Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN:
return getTemporalDomain();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN:
setSpatialDomain((SpatialDomainType)newValue);
return;
case Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN:
setTemporalDomain((TimeSequenceType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN:
setSpatialDomain((SpatialDomainType)null);
return;
case Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN:
setTemporalDomain((TimeSequenceType)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN:
return spatialDomain != null;
case Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN:
return temporalDomain != null;
}
return super.eIsSet(featureID);
}
} //CoverageDomainTypeImpl