/**
*
*
*
* $Id$
*/
package net.opengis.wps10.impl;
import net.opengis.ows11.AcceptVersionsType;
import net.opengis.wps10.GetCapabilitiesType;
import net.opengis.wps10.Wps10Package;
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.wps10.impl.GetCapabilitiesTypeImpl#getAcceptVersions Accept Versions}
* - {@link net.opengis.wps10.impl.GetCapabilitiesTypeImpl#getLanguage Language}
* - {@link net.opengis.wps10.impl.GetCapabilitiesTypeImpl#getService Service}
* - {@link net.opengis.wps10.impl.GetCapabilitiesTypeImpl#getBaseUrl Base Url}
*
*
*
* @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 default value of the '{@link #getLanguage() Language}' attribute.
*
*
* @see #getLanguage()
* @generated
* @ordered
*/
protected static final String LANGUAGE_EDEFAULT = null;
/**
* The cached value of the '{@link #getLanguage() Language}' attribute.
*
*
* @see #getLanguage()
* @generated
* @ordered
*/
protected String language = LANGUAGE_EDEFAULT;
/**
* The default value of the '{@link #getService() Service}' attribute.
*
*
* @see #getService()
* @generated
* @ordered
*/
protected static final String SERVICE_EDEFAULT = "WPS";
/**
* The cached value of the '{@link #getService() Service}' attribute.
*
*
* @see #getService()
* @generated
* @ordered
*/
protected String service = SERVICE_EDEFAULT;
/**
* This is true if the Service attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean serviceESet;
/**
* 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;
/**
*
*
* @generated
*/
protected GetCapabilitiesTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wps10Package.Literals.GET_CAPABILITIES_TYPE;
}
/**
*
*
* @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, Wps10Package.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 - Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, null, msgs);
if (newAcceptVersions != null)
msgs = ((InternalEObject)newAcceptVersions).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.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, Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS, newAcceptVersions, newAcceptVersions));
}
/**
*
*
* @generated
*/
public String getLanguage() {
return language;
}
/**
*
*
* @generated
*/
public void setLanguage(String newLanguage) {
String oldLanguage = language;
language = newLanguage;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.GET_CAPABILITIES_TYPE__LANGUAGE, oldLanguage, language));
}
/**
*
*
* @generated
*/
public String getService() {
return service;
}
/**
*
*
* @generated
*/
public void setService(String newService) {
String oldService = service;
service = newService;
boolean oldServiceESet = serviceESet;
serviceESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.GET_CAPABILITIES_TYPE__SERVICE, oldService, service, !oldServiceESet));
}
/**
*
*
* @generated
*/
public void unsetService() {
String oldService = service;
boolean oldServiceESet = serviceESet;
service = SERVICE_EDEFAULT;
serviceESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wps10Package.GET_CAPABILITIES_TYPE__SERVICE, oldService, SERVICE_EDEFAULT, oldServiceESet));
}
/**
*
*
* @generated
*/
public boolean isSetService() {
return serviceESet;
}
/**
*
*
* @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, Wps10Package.GET_CAPABILITIES_TYPE__BASE_URL, oldBaseUrl, baseUrl));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return basicSetAcceptVersions(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return getAcceptVersions();
case Wps10Package.GET_CAPABILITIES_TYPE__LANGUAGE:
return getLanguage();
case Wps10Package.GET_CAPABILITIES_TYPE__SERVICE:
return getService();
case Wps10Package.GET_CAPABILITIES_TYPE__BASE_URL:
return getBaseUrl();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
setAcceptVersions((AcceptVersionsType)newValue);
return;
case Wps10Package.GET_CAPABILITIES_TYPE__LANGUAGE:
setLanguage((String)newValue);
return;
case Wps10Package.GET_CAPABILITIES_TYPE__SERVICE:
setService((String)newValue);
return;
case Wps10Package.GET_CAPABILITIES_TYPE__BASE_URL:
setBaseUrl((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
setAcceptVersions((AcceptVersionsType)null);
return;
case Wps10Package.GET_CAPABILITIES_TYPE__LANGUAGE:
setLanguage(LANGUAGE_EDEFAULT);
return;
case Wps10Package.GET_CAPABILITIES_TYPE__SERVICE:
unsetService();
return;
case Wps10Package.GET_CAPABILITIES_TYPE__BASE_URL:
setBaseUrl(BASE_URL_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wps10Package.GET_CAPABILITIES_TYPE__ACCEPT_VERSIONS:
return acceptVersions != null;
case Wps10Package.GET_CAPABILITIES_TYPE__LANGUAGE:
return LANGUAGE_EDEFAULT == null ? language != null : !LANGUAGE_EDEFAULT.equals(language);
case Wps10Package.GET_CAPABILITIES_TYPE__SERVICE:
return isSetService();
case Wps10Package.GET_CAPABILITIES_TYPE__BASE_URL:
return BASE_URL_EDEFAULT == null ? baseUrl != null : !BASE_URL_EDEFAULT.equals(baseUrl);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (language: ");
result.append(language);
result.append(", service: ");
if (serviceESet) result.append(service); else result.append("");
result.append(", baseUrl: ");
result.append(baseUrl);
result.append(')');
return result.toString();
}
} //GetCapabilitiesTypeImpl