/**
*
*
*
* $Id$
*/
package net.opengis.fes20.impl;
import net.opengis.fes20.AbstractIdType;
import net.opengis.fes20.ComparisonOpsType;
import net.opengis.fes20.ExtensionOpsType;
import net.opengis.fes20.Fes20Package;
import net.opengis.fes20.FunctionType;
import net.opengis.fes20.LogicOpsType;
import net.opengis.fes20.SpatialOpsType;
import net.opengis.fes20.TemporalOpsType;
import net.opengis.fes20.UnaryLogicOpType;
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.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Unary Logic Op Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getComparisonOpsGroup Comparison Ops Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getComparisonOps Comparison Ops}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getSpatialOpsGroup Spatial Ops Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getSpatialOps Spatial Ops}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getTemporalOpsGroup Temporal Ops Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getTemporalOps Temporal Ops}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getLogicOpsGroup Logic Ops Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getLogicOps Logic Ops}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getExtensionOpsGroup Extension Ops Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getExtensionOps Extension Ops}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getFunction Function}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getIdGroup Id Group}
* - {@link net.opengis.fes20.impl.UnaryLogicOpTypeImpl#getId Id}
*
*
*
* @generated
*/
public class UnaryLogicOpTypeImpl extends LogicOpsTypeImpl implements UnaryLogicOpType {
/**
* The cached value of the '{@link #getComparisonOpsGroup() Comparison Ops Group}' attribute list.
*
*
* @see #getComparisonOpsGroup()
* @generated
* @ordered
*/
protected FeatureMap comparisonOpsGroup;
/**
* The cached value of the '{@link #getSpatialOpsGroup() Spatial Ops Group}' attribute list.
*
*
* @see #getSpatialOpsGroup()
* @generated
* @ordered
*/
protected FeatureMap spatialOpsGroup;
/**
* The cached value of the '{@link #getTemporalOpsGroup() Temporal Ops Group}' attribute list.
*
*
* @see #getTemporalOpsGroup()
* @generated
* @ordered
*/
protected FeatureMap temporalOpsGroup;
/**
* The cached value of the '{@link #getLogicOpsGroup() Logic Ops Group}' attribute list.
*
*
* @see #getLogicOpsGroup()
* @generated
* @ordered
*/
protected FeatureMap logicOpsGroup;
/**
* The cached value of the '{@link #getExtensionOpsGroup() Extension Ops Group}' attribute list.
*
*
* @see #getExtensionOpsGroup()
* @generated
* @ordered
*/
protected FeatureMap extensionOpsGroup;
/**
* The cached value of the '{@link #getFunction() Function}' containment reference.
*
*
* @see #getFunction()
* @generated
* @ordered
*/
protected FunctionType function;
/**
* The cached value of the '{@link #getIdGroup() Id Group}' attribute list.
*
*
* @see #getIdGroup()
* @generated
* @ordered
*/
protected FeatureMap idGroup;
/**
*
*
* @generated
*/
protected UnaryLogicOpTypeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Fes20Package.Literals.UNARY_LOGIC_OP_TYPE;
}
/**
*
*
* @generated
*/
public FeatureMap getComparisonOpsGroup() {
if (comparisonOpsGroup == null) {
comparisonOpsGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP);
}
return comparisonOpsGroup;
}
/**
*
*
* @generated
*/
public ComparisonOpsType getComparisonOps() {
return (ComparisonOpsType)getComparisonOpsGroup().get(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetComparisonOps(ComparisonOpsType newComparisonOps, NotificationChain msgs) {
return ((FeatureMap.Internal)getComparisonOpsGroup()).basicAdd(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS, newComparisonOps, msgs);
}
/**
*
*
* @generated
*/
public FeatureMap getSpatialOpsGroup() {
if (spatialOpsGroup == null) {
spatialOpsGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP);
}
return spatialOpsGroup;
}
/**
*
*
* @generated
*/
public SpatialOpsType getSpatialOps() {
return (SpatialOpsType)getSpatialOpsGroup().get(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetSpatialOps(SpatialOpsType newSpatialOps, NotificationChain msgs) {
return ((FeatureMap.Internal)getSpatialOpsGroup()).basicAdd(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS, newSpatialOps, msgs);
}
/**
*
*
* @generated
*/
public FeatureMap getTemporalOpsGroup() {
if (temporalOpsGroup == null) {
temporalOpsGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP);
}
return temporalOpsGroup;
}
/**
*
*
* @generated
*/
public TemporalOpsType getTemporalOps() {
return (TemporalOpsType)getTemporalOpsGroup().get(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetTemporalOps(TemporalOpsType newTemporalOps, NotificationChain msgs) {
return ((FeatureMap.Internal)getTemporalOpsGroup()).basicAdd(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS, newTemporalOps, msgs);
}
/**
*
*
* @generated
*/
public FeatureMap getLogicOpsGroup() {
if (logicOpsGroup == null) {
logicOpsGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP);
}
return logicOpsGroup;
}
/**
*
*
* @generated
*/
public LogicOpsType getLogicOps() {
return (LogicOpsType)getLogicOpsGroup().get(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__LOGIC_OPS, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetLogicOps(LogicOpsType newLogicOps, NotificationChain msgs) {
return ((FeatureMap.Internal)getLogicOpsGroup()).basicAdd(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__LOGIC_OPS, newLogicOps, msgs);
}
/**
*
*
* @generated
*/
public FeatureMap getExtensionOpsGroup() {
if (extensionOpsGroup == null) {
extensionOpsGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP);
}
return extensionOpsGroup;
}
/**
*
*
* @generated
*/
public ExtensionOpsType getExtensionOps() {
return (ExtensionOpsType)getExtensionOpsGroup().get(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetExtensionOps(ExtensionOpsType newExtensionOps, NotificationChain msgs) {
return ((FeatureMap.Internal)getExtensionOpsGroup()).basicAdd(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS, newExtensionOps, msgs);
}
/**
*
*
* @generated
*/
public FunctionType getFunction() {
return function;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetFunction(FunctionType newFunction, NotificationChain msgs) {
FunctionType oldFunction = function;
function = newFunction;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION, oldFunction, newFunction);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setFunction(FunctionType newFunction) {
if (newFunction != function) {
NotificationChain msgs = null;
if (function != null)
msgs = ((InternalEObject)function).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION, null, msgs);
if (newFunction != null)
msgs = ((InternalEObject)newFunction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION, null, msgs);
msgs = basicSetFunction(newFunction, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION, newFunction, newFunction));
}
/**
*
*
* @generated
*/
public FeatureMap getIdGroup() {
if (idGroup == null) {
idGroup = new BasicFeatureMap(this, Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP);
}
return idGroup;
}
/**
*
*
* @generated
*/
public EList getId() {
return getIdGroup().list(Fes20Package.Literals.UNARY_LOGIC_OP_TYPE__ID);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP:
return ((InternalEList>)getComparisonOpsGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS:
return basicSetComparisonOps(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP:
return ((InternalEList>)getSpatialOpsGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS:
return basicSetSpatialOps(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP:
return ((InternalEList>)getTemporalOpsGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS:
return basicSetTemporalOps(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP:
return ((InternalEList>)getLogicOpsGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS:
return basicSetLogicOps(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP:
return ((InternalEList>)getExtensionOpsGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS:
return basicSetExtensionOps(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION:
return basicSetFunction(null, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP:
return ((InternalEList>)getIdGroup()).basicRemove(otherEnd, msgs);
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID:
return ((InternalEList>)getId()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP:
if (coreType) return getComparisonOpsGroup();
return ((FeatureMap.Internal)getComparisonOpsGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS:
return getComparisonOps();
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP:
if (coreType) return getSpatialOpsGroup();
return ((FeatureMap.Internal)getSpatialOpsGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS:
return getSpatialOps();
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP:
if (coreType) return getTemporalOpsGroup();
return ((FeatureMap.Internal)getTemporalOpsGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS:
return getTemporalOps();
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP:
if (coreType) return getLogicOpsGroup();
return ((FeatureMap.Internal)getLogicOpsGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS:
return getLogicOps();
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP:
if (coreType) return getExtensionOpsGroup();
return ((FeatureMap.Internal)getExtensionOpsGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS:
return getExtensionOps();
case Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION:
return getFunction();
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP:
if (coreType) return getIdGroup();
return ((FeatureMap.Internal)getIdGroup()).getWrapper();
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID:
return getId();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP:
((FeatureMap.Internal)getComparisonOpsGroup()).set(newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP:
((FeatureMap.Internal)getSpatialOpsGroup()).set(newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP:
((FeatureMap.Internal)getTemporalOpsGroup()).set(newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP:
((FeatureMap.Internal)getLogicOpsGroup()).set(newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP:
((FeatureMap.Internal)getExtensionOpsGroup()).set(newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION:
setFunction((FunctionType)newValue);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP:
((FeatureMap.Internal)getIdGroup()).set(newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP:
getComparisonOpsGroup().clear();
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP:
getSpatialOpsGroup().clear();
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP:
getTemporalOpsGroup().clear();
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP:
getLogicOpsGroup().clear();
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP:
getExtensionOpsGroup().clear();
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION:
setFunction((FunctionType)null);
return;
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP:
getIdGroup().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS_GROUP:
return comparisonOpsGroup != null && !comparisonOpsGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__COMPARISON_OPS:
return getComparisonOps() != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS_GROUP:
return spatialOpsGroup != null && !spatialOpsGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__SPATIAL_OPS:
return getSpatialOps() != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS_GROUP:
return temporalOpsGroup != null && !temporalOpsGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__TEMPORAL_OPS:
return getTemporalOps() != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS_GROUP:
return logicOpsGroup != null && !logicOpsGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__LOGIC_OPS:
return getLogicOps() != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS_GROUP:
return extensionOpsGroup != null && !extensionOpsGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__EXTENSION_OPS:
return getExtensionOps() != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__FUNCTION:
return function != null;
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID_GROUP:
return idGroup != null && !idGroup.isEmpty();
case Fes20Package.UNARY_LOGIC_OP_TYPE__ID:
return !getId().isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (comparisonOpsGroup: ");
result.append(comparisonOpsGroup);
result.append(", spatialOpsGroup: ");
result.append(spatialOpsGroup);
result.append(", temporalOpsGroup: ");
result.append(temporalOpsGroup);
result.append(", logicOpsGroup: ");
result.append(logicOpsGroup);
result.append(", extensionOpsGroup: ");
result.append(extensionOpsGroup);
result.append(", idGroup: ");
result.append(idGroup);
result.append(')');
return result.toString();
}
} //UnaryLogicOpTypeImpl