/**
*
*
*
* $Id$
*/
package net.opengis.fes20.impl;
import net.opengis.fes20.Fes20Package;
import net.opengis.fes20.GeometryOperandsType;
import net.opengis.fes20.SpatialCapabilitiesType;
import net.opengis.fes20.SpatialOperatorsType;
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 'Spatial Capabilities Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.fes20.impl.SpatialCapabilitiesTypeImpl#getGeometryOperands Geometry Operands}
* - {@link net.opengis.fes20.impl.SpatialCapabilitiesTypeImpl#getSpatialOperators Spatial Operators}
*
*
*
* @generated
*/
public class SpatialCapabilitiesTypeImpl extends EObjectImpl implements SpatialCapabilitiesType {
/**
* The cached value of the '{@link #getGeometryOperands() Geometry Operands}' containment reference.
*
*
* @see #getGeometryOperands()
* @generated
* @ordered
*/
protected GeometryOperandsType geometryOperands;
/**
* The cached value of the '{@link #getSpatialOperators() Spatial Operators}' containment reference.
*
*
* @see #getSpatialOperators()
* @generated
* @ordered
*/
protected SpatialOperatorsType spatialOperators;
/**
*
*
* @generated
*/
protected SpatialCapabilitiesTypeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Fes20Package.Literals.SPATIAL_CAPABILITIES_TYPE;
}
/**
*
*
* @generated
*/
public GeometryOperandsType getGeometryOperands() {
return geometryOperands;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetGeometryOperands(GeometryOperandsType newGeometryOperands, NotificationChain msgs) {
GeometryOperandsType oldGeometryOperands = geometryOperands;
geometryOperands = newGeometryOperands;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS, oldGeometryOperands, newGeometryOperands);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setGeometryOperands(GeometryOperandsType newGeometryOperands) {
if (newGeometryOperands != geometryOperands) {
NotificationChain msgs = null;
if (geometryOperands != null)
msgs = ((InternalEObject)geometryOperands).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS, null, msgs);
if (newGeometryOperands != null)
msgs = ((InternalEObject)newGeometryOperands).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS, null, msgs);
msgs = basicSetGeometryOperands(newGeometryOperands, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS, newGeometryOperands, newGeometryOperands));
}
/**
*
*
* @generated
*/
public SpatialOperatorsType getSpatialOperators() {
return spatialOperators;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetSpatialOperators(SpatialOperatorsType newSpatialOperators, NotificationChain msgs) {
SpatialOperatorsType oldSpatialOperators = spatialOperators;
spatialOperators = newSpatialOperators;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS, oldSpatialOperators, newSpatialOperators);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setSpatialOperators(SpatialOperatorsType newSpatialOperators) {
if (newSpatialOperators != spatialOperators) {
NotificationChain msgs = null;
if (spatialOperators != null)
msgs = ((InternalEObject)spatialOperators).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS, null, msgs);
if (newSpatialOperators != null)
msgs = ((InternalEObject)newSpatialOperators).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS, null, msgs);
msgs = basicSetSpatialOperators(newSpatialOperators, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS, newSpatialOperators, newSpatialOperators));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS:
return basicSetGeometryOperands(null, msgs);
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS:
return basicSetSpatialOperators(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS:
return getGeometryOperands();
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS:
return getSpatialOperators();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS:
setGeometryOperands((GeometryOperandsType)newValue);
return;
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS:
setSpatialOperators((SpatialOperatorsType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS:
setGeometryOperands((GeometryOperandsType)null);
return;
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS:
setSpatialOperators((SpatialOperatorsType)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__GEOMETRY_OPERANDS:
return geometryOperands != null;
case Fes20Package.SPATIAL_CAPABILITIES_TYPE__SPATIAL_OPERATORS:
return spatialOperators != null;
}
return super.eIsSet(featureID);
}
} //SpatialCapabilitiesTypeImpl