/**
*
*
*
* $Id$
*/
package net.opengis.wps10.impl;
import net.opengis.ows11.impl.CapabilitiesBaseTypeImpl;
import net.opengis.wps10.LanguagesType1;
import net.opengis.wps10.ProcessOfferingsType;
import net.opengis.wps10.WPSCapabilitiesType;
import net.opengis.wps10.WSDLType;
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;
/**
*
* An implementation of the model object 'WPS Capabilities Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wps10.impl.WPSCapabilitiesTypeImpl#getProcessOfferings Process Offerings}
* - {@link net.opengis.wps10.impl.WPSCapabilitiesTypeImpl#getLanguages Languages}
* - {@link net.opengis.wps10.impl.WPSCapabilitiesTypeImpl#getWSDL WSDL}
* - {@link net.opengis.wps10.impl.WPSCapabilitiesTypeImpl#getLang Lang}
* - {@link net.opengis.wps10.impl.WPSCapabilitiesTypeImpl#getService Service}
*
*
*
* @generated
*/
public class WPSCapabilitiesTypeImpl extends CapabilitiesBaseTypeImpl implements WPSCapabilitiesType {
/**
* The cached value of the '{@link #getProcessOfferings() Process Offerings}' containment reference.
*
*
* @see #getProcessOfferings()
* @generated
* @ordered
*/
protected ProcessOfferingsType processOfferings;
/**
* The cached value of the '{@link #getLanguages() Languages}' containment reference.
*
*
* @see #getLanguages()
* @generated
* @ordered
*/
protected LanguagesType1 languages;
/**
* The cached value of the '{@link #getWSDL() WSDL}' containment reference.
*
*
* @see #getWSDL()
* @generated
* @ordered
*/
protected WSDLType wSDL;
/**
* The default value of the '{@link #getLang() Lang}' attribute.
*
*
* @see #getLang()
* @generated
* @ordered
*/
protected static final String LANG_EDEFAULT = null;
/**
* The cached value of the '{@link #getLang() Lang}' attribute.
*
*
* @see #getLang()
* @generated
* @ordered
*/
protected String lang = LANG_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;
/**
*
*
* @generated
*/
protected WPSCapabilitiesTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wps10Package.Literals.WPS_CAPABILITIES_TYPE;
}
/**
*
*
* @generated
*/
public ProcessOfferingsType getProcessOfferings() {
return processOfferings;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetProcessOfferings(ProcessOfferingsType newProcessOfferings, NotificationChain msgs) {
ProcessOfferingsType oldProcessOfferings = processOfferings;
processOfferings = newProcessOfferings;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS, oldProcessOfferings, newProcessOfferings);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setProcessOfferings(ProcessOfferingsType newProcessOfferings) {
if (newProcessOfferings != processOfferings) {
NotificationChain msgs = null;
if (processOfferings != null)
msgs = ((InternalEObject)processOfferings).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS, null, msgs);
if (newProcessOfferings != null)
msgs = ((InternalEObject)newProcessOfferings).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS, null, msgs);
msgs = basicSetProcessOfferings(newProcessOfferings, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS, newProcessOfferings, newProcessOfferings));
}
/**
*
*
* @generated
*/
public LanguagesType1 getLanguages() {
return languages;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetLanguages(LanguagesType1 newLanguages, NotificationChain msgs) {
LanguagesType1 oldLanguages = languages;
languages = newLanguages;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES, oldLanguages, newLanguages);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setLanguages(LanguagesType1 newLanguages) {
if (newLanguages != languages) {
NotificationChain msgs = null;
if (languages != null)
msgs = ((InternalEObject)languages).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES, null, msgs);
if (newLanguages != null)
msgs = ((InternalEObject)newLanguages).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES, null, msgs);
msgs = basicSetLanguages(newLanguages, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES, newLanguages, newLanguages));
}
/**
*
*
* @generated
*/
public WSDLType getWSDL() {
return wSDL;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetWSDL(WSDLType newWSDL, NotificationChain msgs) {
WSDLType oldWSDL = wSDL;
wSDL = newWSDL;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__WSDL, oldWSDL, newWSDL);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setWSDL(WSDLType newWSDL) {
if (newWSDL != wSDL) {
NotificationChain msgs = null;
if (wSDL != null)
msgs = ((InternalEObject)wSDL).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__WSDL, null, msgs);
if (newWSDL != null)
msgs = ((InternalEObject)newWSDL).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Wps10Package.WPS_CAPABILITIES_TYPE__WSDL, null, msgs);
msgs = basicSetWSDL(newWSDL, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__WSDL, newWSDL, newWSDL));
}
/**
*
*
* @generated
*/
public String getLang() {
return lang;
}
/**
*
*
* @generated
*/
public void setLang(String newLang) {
String oldLang = lang;
lang = newLang;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__LANG, oldLang, lang));
}
/**
*
*
* @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.WPS_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.WPS_CAPABILITIES_TYPE__SERVICE, oldService, SERVICE_EDEFAULT, oldServiceESet));
}
/**
*
*
* @generated
*/
public boolean isSetService() {
return serviceESet;
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS:
return basicSetProcessOfferings(null, msgs);
case Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES:
return basicSetLanguages(null, msgs);
case Wps10Package.WPS_CAPABILITIES_TYPE__WSDL:
return basicSetWSDL(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS:
return getProcessOfferings();
case Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES:
return getLanguages();
case Wps10Package.WPS_CAPABILITIES_TYPE__WSDL:
return getWSDL();
case Wps10Package.WPS_CAPABILITIES_TYPE__LANG:
return getLang();
case Wps10Package.WPS_CAPABILITIES_TYPE__SERVICE:
return getService();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS:
setProcessOfferings((ProcessOfferingsType)newValue);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES:
setLanguages((LanguagesType1)newValue);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__WSDL:
setWSDL((WSDLType)newValue);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANG:
setLang((String)newValue);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__SERVICE:
setService((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS:
setProcessOfferings((ProcessOfferingsType)null);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES:
setLanguages((LanguagesType1)null);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__WSDL:
setWSDL((WSDLType)null);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANG:
setLang(LANG_EDEFAULT);
return;
case Wps10Package.WPS_CAPABILITIES_TYPE__SERVICE:
unsetService();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wps10Package.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS:
return processOfferings != null;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES:
return languages != null;
case Wps10Package.WPS_CAPABILITIES_TYPE__WSDL:
return wSDL != null;
case Wps10Package.WPS_CAPABILITIES_TYPE__LANG:
return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang);
case Wps10Package.WPS_CAPABILITIES_TYPE__SERVICE:
return isSetService();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (lang: ");
result.append(lang);
result.append(", service: ");
if (serviceESet) result.append(service); else result.append("");
result.append(')');
return result.toString();
}
} //WPSCapabilitiesTypeImpl