/**
*
*
*
* $Id$
*/
package net.opengis.ows10.impl;
import net.opengis.ows10.AcceptFormatsType;
import net.opengis.ows10.AcceptVersionsType;
import net.opengis.ows10.GetCapabilitiesType;
import net.opengis.ows10.Ows10Package;
import net.opengis.ows10.SectionsType;
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 'Get Capabilities Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getAcceptVersions Accept Versions}
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getSections Sections}
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getAcceptFormats Accept Formats}
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getUpdateSequence Update Sequence}
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getBaseUrl Base Url}
* - {@link net.opengis.ows10.impl.GetCapabilitiesTypeImpl#getNamespace Namespace}
*
*
*
* @generated
*/
public class GetCapabilitiesTypeImpl extends EObjectImpl implements GetCapabilitiesType {
/**
* The cached value of the '{@link #getAcceptVersions() Accept Versions}' containment reference.
*
*
* @see #getAcceptVersions()
* @generated
* @ordered
*/
protected AcceptVersionsType acceptVersions;
/**
* The cached value of the '{@link #getSections() Sections}' containment reference.
*
*
* @see #getSections()
* @generated
* @ordered
*/
protected SectionsType sections;
/**
* The cached value of the '{@link #getAcceptFormats() Accept Formats}' containment reference.
*
*
* @see #getAcceptFormats()
* @generated
* @ordered
*/
protected AcceptFormatsType acceptFormats;
/**
* The default value of the '{@link #getUpdateSequence() Update Sequence}' attribute.
*
*
* @see #getUpdateSequence()
* @generated
* @ordered
*/
protected static final String UPDATE_SEQUENCE_EDEFAULT = null;
/**
* The cached value of the '{@link #getUpdateSequence() Update Sequence}' attribute.
*
*
* @see #getUpdateSequence()
* @generated
* @ordered
*/
protected String updateSequence = UPDATE_SEQUENCE_EDEFAULT;
/**
* The default value of the '{@link #getBaseUrl() Base Url}' attribute.
*
*
* @see #getBaseUrl()
* @generated
* @ordered
*/
protected static final String BASE_URL_EDEFAULT = null;
/**
* The cached value of the '{@link #getBaseUrl() Base Url}' attribute.
*
*
* @see #getBaseUrl()
* @generated
* @ordered
*/
protected String baseUrl = BASE_URL_EDEFAULT;
/**
* The default value of the '{@link #getNamespace() Namespace}' attribute.
*
*
* @see #getNamespace()
* @generated
* @ordered
*/
protected static final String NAMESPACE_EDEFAULT = null;
/**
* The cached value of the '{@link #getNamespace() Namespace}' attribute.
*
*
* @see #getNamespace()
* @generated
* @ordered
*/
protected String namespace = NAMESPACE_EDEFAULT;
/**
*
*
* @generated
*/
protected GetCapabilitiesTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows10Package.eINSTANCE.getGetCapabilitiesType();
}
/**
*
*
* @generated
*/
public AcceptVersionsType getAcceptVersions() {
return acceptVersions;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetAcceptVersions(AcceptVersionsType newAcceptVersions, NotificationChain msgs) {
AcceptVersionsType oldAcceptVersions = acceptVersions;
acceptVersions = newAcceptVersions;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, oldAcceptVersions, newAcceptVersions);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setAcceptVersions(AcceptVersionsType newAcceptVersions) {
if (newAcceptVersions != acceptVersions) {
NotificationChain msgs = null;
if (acceptVersions != null)
msgs = ((InternalEObject)acceptVersions).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, null, msgs);
if (newAcceptVersions != null)
msgs = ((InternalEObject)newAcceptVersions).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, null, msgs);
msgs = basicSetAcceptVersions(newAcceptVersions, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, newAcceptVersions, newAcceptVersions));
}
/**
*
*
* @generated
*/
public SectionsType getSections() {
return sections;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetSections(SectionsType newSections, NotificationChain msgs) {
SectionsType oldSections = sections;
sections = newSections;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS, oldSections, newSections);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setSections(SectionsType newSections) {
if (newSections != sections) {
NotificationChain msgs = null;
if (sections != null)
msgs = ((InternalEObject)sections).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS, null, msgs);
if (newSections != null)
msgs = ((InternalEObject)newSections).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS, null, msgs);
msgs = basicSetSections(newSections, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS, newSections, newSections));
}
/**
*
*
* @generated
*/
public AcceptFormatsType getAcceptFormats() {
return acceptFormats;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetAcceptFormats(AcceptFormatsType newAcceptFormats, NotificationChain msgs) {
AcceptFormatsType oldAcceptFormats = acceptFormats;
acceptFormats = newAcceptFormats;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS, oldAcceptFormats, newAcceptFormats);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setAcceptFormats(AcceptFormatsType newAcceptFormats) {
if (newAcceptFormats != acceptFormats) {
NotificationChain msgs = null;
if (acceptFormats != null)
msgs = ((InternalEObject)acceptFormats).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS, null, msgs);
if (newAcceptFormats != null)
msgs = ((InternalEObject)newAcceptFormats).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS, null, msgs);
msgs = basicSetAcceptFormats(newAcceptFormats, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS, newAcceptFormats, newAcceptFormats));
}
/**
*
*
* @generated
*/
public String getUpdateSequence() {
return updateSequence;
}
/**
*
*
* @generated
*/
public void setUpdateSequence(String newUpdateSequence) {
String oldUpdateSequence = updateSequence;
updateSequence = newUpdateSequence;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__UPDATE_SEQUENCE, oldUpdateSequence, updateSequence));
}
/**
*
*
* @generated
*/
public String getBaseUrl() {
return baseUrl;
}
/**
*
*
* @generated
*/
public void setBaseUrl(String newBaseUrl) {
String oldBaseUrl = baseUrl;
baseUrl = newBaseUrl;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__BASE_URL, oldBaseUrl, baseUrl));
}
/**
*
*
* @generated
*/
public String getNamespace() {
return namespace;
}
/**
*
*
* @generated
*/
public void setNamespace(String newNamespace) {
String oldNamespace = namespace;
namespace = newNamespace;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.GET_CAPABILITIES_TYPE__NAMESPACE, oldNamespace, namespace));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return basicSetAcceptVersions(null, msgs);
case Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS:
return basicSetSections(null, msgs);
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS:
return basicSetAcceptFormats(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return getAcceptVersions();
case Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS:
return getSections();
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS:
return getAcceptFormats();
case Ows10Package.GET_CAPABILITIES_TYPE__UPDATE_SEQUENCE:
return getUpdateSequence();
case Ows10Package.GET_CAPABILITIES_TYPE__BASE_URL:
return getBaseUrl();
case Ows10Package.GET_CAPABILITIES_TYPE__NAMESPACE:
return getNamespace();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
setAcceptVersions((AcceptVersionsType)newValue);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS:
setSections((SectionsType)newValue);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS:
setAcceptFormats((AcceptFormatsType)newValue);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__UPDATE_SEQUENCE:
setUpdateSequence((String)newValue);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__BASE_URL:
setBaseUrl((String)newValue);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__NAMESPACE:
setNamespace((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
setAcceptVersions((AcceptVersionsType)null);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS:
setSections((SectionsType)null);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS:
setAcceptFormats((AcceptFormatsType)null);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__UPDATE_SEQUENCE:
setUpdateSequence(UPDATE_SEQUENCE_EDEFAULT);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__BASE_URL:
setBaseUrl(BASE_URL_EDEFAULT);
return;
case Ows10Package.GET_CAPABILITIES_TYPE__NAMESPACE:
setNamespace(NAMESPACE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return acceptVersions != null;
case Ows10Package.GET_CAPABILITIES_TYPE__SECTIONS:
return sections != null;
case Ows10Package.GET_CAPABILITIES_TYPE__ACCEPT_FORMATS:
return acceptFormats != null;
case Ows10Package.GET_CAPABILITIES_TYPE__UPDATE_SEQUENCE:
return UPDATE_SEQUENCE_EDEFAULT == null ? updateSequence != null : !UPDATE_SEQUENCE_EDEFAULT.equals(updateSequence);
case Ows10Package.GET_CAPABILITIES_TYPE__BASE_URL:
return BASE_URL_EDEFAULT == null ? baseUrl != null : !BASE_URL_EDEFAULT.equals(baseUrl);
case Ows10Package.GET_CAPABILITIES_TYPE__NAMESPACE:
return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (updateSequence: ");
result.append(updateSequence);
result.append(", baseUrl: ");
result.append(baseUrl);
result.append(", namespace: ");
result.append(namespace);
result.append(')');
return result.toString();
}
} //GetCapabilitiesTypeImpl