/**
*
*
*
* $Id$
*/
package net.opengis.wcs11.impl;
import java.util.Collection;
import net.opengis.ows11.DomainMetadataType;
import net.opengis.ows11.MetadataType;
import net.opengis.ows11.impl.DescriptionTypeImpl;
import net.opengis.wcs11.AvailableKeysType;
import net.opengis.wcs11.AxisType;
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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Axis Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getAvailableKeys Available Keys}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getMeaning Meaning}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getDataType Data Type}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getUOM UOM}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getReferenceSystem Reference System}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getMetadata Metadata}
* - {@link net.opengis.wcs11.impl.AxisTypeImpl#getIdentifier Identifier}
*
*
*
* @generated
*/
public class AxisTypeImpl extends DescriptionTypeImpl implements AxisType {
/**
* The cached value of the '{@link #getAvailableKeys() Available Keys}' containment reference.
*
*
* @see #getAvailableKeys()
* @generated
* @ordered
*/
protected AvailableKeysType availableKeys;
/**
* The cached value of the '{@link #getMeaning() Meaning}' containment reference.
*
*
* @see #getMeaning()
* @generated
* @ordered
*/
protected DomainMetadataType meaning;
/**
* The cached value of the '{@link #getDataType() Data Type}' containment reference.
*
*
* @see #getDataType()
* @generated
* @ordered
*/
protected DomainMetadataType dataType;
/**
* The cached value of the '{@link #getUOM() UOM}' containment reference.
*
*
* @see #getUOM()
* @generated
* @ordered
*/
protected DomainMetadataType uOM;
/**
* The cached value of the '{@link #getReferenceSystem() Reference System}' containment reference.
*
*
* @see #getReferenceSystem()
* @generated
* @ordered
*/
protected DomainMetadataType referenceSystem;
/**
* The cached value of the '{@link #getMetadata() Metadata}' containment reference list.
*
*
* @see #getMetadata()
* @generated
* @ordered
*/
protected EList metadata;
/**
* The default value of the '{@link #getIdentifier() Identifier}' attribute.
*
*
* @see #getIdentifier()
* @generated
* @ordered
*/
protected static final String IDENTIFIER_EDEFAULT = null;
/**
* The cached value of the '{@link #getIdentifier() Identifier}' attribute.
*
*
* @see #getIdentifier()
* @generated
* @ordered
*/
protected String identifier = IDENTIFIER_EDEFAULT;
/**
*
*
* @generated
*/
protected AxisTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wcs111Package.Literals.AXIS_TYPE;
}
/**
*
*
* @generated
*/
public AvailableKeysType getAvailableKeys() {
return availableKeys;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetAvailableKeys(AvailableKeysType newAvailableKeys, NotificationChain msgs) {
AvailableKeysType oldAvailableKeys = availableKeys;
availableKeys = newAvailableKeys;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS, oldAvailableKeys, newAvailableKeys);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setAvailableKeys(AvailableKeysType newAvailableKeys) {
if (newAvailableKeys != availableKeys) {
NotificationChain msgs = null;
if (availableKeys != null)
msgs = ((InternalEObject)availableKeys).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS, null, msgs);
if (newAvailableKeys != null)
msgs = ((InternalEObject)newAvailableKeys).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS, null, msgs);
msgs = basicSetAvailableKeys(newAvailableKeys, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS, newAvailableKeys, newAvailableKeys));
}
/**
*
*
* @generated
*/
public DomainMetadataType getMeaning() {
return meaning;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetMeaning(DomainMetadataType newMeaning, NotificationChain msgs) {
DomainMetadataType oldMeaning = meaning;
meaning = newMeaning;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__MEANING, oldMeaning, newMeaning);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setMeaning(DomainMetadataType newMeaning) {
if (newMeaning != meaning) {
NotificationChain msgs = null;
if (meaning != null)
msgs = ((InternalEObject)meaning).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__MEANING, null, msgs);
if (newMeaning != null)
msgs = ((InternalEObject)newMeaning).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__MEANING, null, msgs);
msgs = basicSetMeaning(newMeaning, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__MEANING, newMeaning, newMeaning));
}
/**
*
*
* @generated
*/
public DomainMetadataType getDataType() {
return dataType;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetDataType(DomainMetadataType newDataType, NotificationChain msgs) {
DomainMetadataType oldDataType = dataType;
dataType = newDataType;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__DATA_TYPE, oldDataType, newDataType);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setDataType(DomainMetadataType newDataType) {
if (newDataType != dataType) {
NotificationChain msgs = null;
if (dataType != null)
msgs = ((InternalEObject)dataType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__DATA_TYPE, null, msgs);
if (newDataType != null)
msgs = ((InternalEObject)newDataType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__DATA_TYPE, null, msgs);
msgs = basicSetDataType(newDataType, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__DATA_TYPE, newDataType, newDataType));
}
/**
*
*
* @generated
*/
public DomainMetadataType getUOM() {
return uOM;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetUOM(DomainMetadataType newUOM, NotificationChain msgs) {
DomainMetadataType oldUOM = uOM;
uOM = newUOM;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__UOM, oldUOM, newUOM);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setUOM(DomainMetadataType newUOM) {
if (newUOM != uOM) {
NotificationChain msgs = null;
if (uOM != null)
msgs = ((InternalEObject)uOM).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__UOM, null, msgs);
if (newUOM != null)
msgs = ((InternalEObject)newUOM).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__UOM, null, msgs);
msgs = basicSetUOM(newUOM, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__UOM, newUOM, newUOM));
}
/**
*
*
* @generated
*/
public DomainMetadataType getReferenceSystem() {
return referenceSystem;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetReferenceSystem(DomainMetadataType newReferenceSystem, NotificationChain msgs) {
DomainMetadataType oldReferenceSystem = referenceSystem;
referenceSystem = newReferenceSystem;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM, oldReferenceSystem, newReferenceSystem);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setReferenceSystem(DomainMetadataType newReferenceSystem) {
if (newReferenceSystem != referenceSystem) {
NotificationChain msgs = null;
if (referenceSystem != null)
msgs = ((InternalEObject)referenceSystem).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM, null, msgs);
if (newReferenceSystem != null)
msgs = ((InternalEObject)newReferenceSystem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM, null, msgs);
msgs = basicSetReferenceSystem(newReferenceSystem, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM, newReferenceSystem, newReferenceSystem));
}
/**
*
*
* @generated
*/
public EList getMetadata() {
if (metadata == null) {
metadata = new EObjectContainmentEList(MetadataType.class, this, Wcs111Package.AXIS_TYPE__METADATA);
}
return metadata;
}
/**
*
*
* @generated
*/
public String getIdentifier() {
return identifier;
}
/**
*
*
* @generated
*/
public void setIdentifier(String newIdentifier) {
String oldIdentifier = identifier;
identifier = newIdentifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs111Package.AXIS_TYPE__IDENTIFIER, oldIdentifier, identifier));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS:
return basicSetAvailableKeys(null, msgs);
case Wcs111Package.AXIS_TYPE__MEANING:
return basicSetMeaning(null, msgs);
case Wcs111Package.AXIS_TYPE__DATA_TYPE:
return basicSetDataType(null, msgs);
case Wcs111Package.AXIS_TYPE__UOM:
return basicSetUOM(null, msgs);
case Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM:
return basicSetReferenceSystem(null, msgs);
case Wcs111Package.AXIS_TYPE__METADATA:
return ((InternalEList)getMetadata()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS:
return getAvailableKeys();
case Wcs111Package.AXIS_TYPE__MEANING:
return getMeaning();
case Wcs111Package.AXIS_TYPE__DATA_TYPE:
return getDataType();
case Wcs111Package.AXIS_TYPE__UOM:
return getUOM();
case Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM:
return getReferenceSystem();
case Wcs111Package.AXIS_TYPE__METADATA:
return getMetadata();
case Wcs111Package.AXIS_TYPE__IDENTIFIER:
return getIdentifier();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS:
setAvailableKeys((AvailableKeysType)newValue);
return;
case Wcs111Package.AXIS_TYPE__MEANING:
setMeaning((DomainMetadataType)newValue);
return;
case Wcs111Package.AXIS_TYPE__DATA_TYPE:
setDataType((DomainMetadataType)newValue);
return;
case Wcs111Package.AXIS_TYPE__UOM:
setUOM((DomainMetadataType)newValue);
return;
case Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM:
setReferenceSystem((DomainMetadataType)newValue);
return;
case Wcs111Package.AXIS_TYPE__METADATA:
getMetadata().clear();
getMetadata().addAll((Collection)newValue);
return;
case Wcs111Package.AXIS_TYPE__IDENTIFIER:
setIdentifier((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS:
setAvailableKeys((AvailableKeysType)null);
return;
case Wcs111Package.AXIS_TYPE__MEANING:
setMeaning((DomainMetadataType)null);
return;
case Wcs111Package.AXIS_TYPE__DATA_TYPE:
setDataType((DomainMetadataType)null);
return;
case Wcs111Package.AXIS_TYPE__UOM:
setUOM((DomainMetadataType)null);
return;
case Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM:
setReferenceSystem((DomainMetadataType)null);
return;
case Wcs111Package.AXIS_TYPE__METADATA:
getMetadata().clear();
return;
case Wcs111Package.AXIS_TYPE__IDENTIFIER:
setIdentifier(IDENTIFIER_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wcs111Package.AXIS_TYPE__AVAILABLE_KEYS:
return availableKeys != null;
case Wcs111Package.AXIS_TYPE__MEANING:
return meaning != null;
case Wcs111Package.AXIS_TYPE__DATA_TYPE:
return dataType != null;
case Wcs111Package.AXIS_TYPE__UOM:
return uOM != null;
case Wcs111Package.AXIS_TYPE__REFERENCE_SYSTEM:
return referenceSystem != null;
case Wcs111Package.AXIS_TYPE__METADATA:
return metadata != null && !metadata.isEmpty();
case Wcs111Package.AXIS_TYPE__IDENTIFIER:
return IDENTIFIER_EDEFAULT == null ? identifier != null : !IDENTIFIER_EDEFAULT.equals(identifier);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (identifier: ");
result.append(identifier);
result.append(')');
return result.toString();
}
} //AxisTypeImpl