/** * * * * $Id$ */ package net.opengis.wps.impl; import net.opengis.ows11.impl.CapabilitiesBaseTypeImpl; import net.opengis.wps.LanguagesType1; import net.opengis.wps.ProcessOfferingsType; import net.opengis.wps.WPSCapabilitiesType; import net.opengis.wps.WSDLType; import net.opengis.wps.WpsPackage; 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: *

*

* * @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 #getService() Service}' attribute. * * * @see #getService() * @generated * @ordered */ protected static final Object SERVICE_EDEFAULT = "WPS"; /** * The cached value of the '{@link #getService() Service}' attribute. * * * @see #getService() * @generated * @ordered */ protected Object 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 WpsPackage.eINSTANCE.getWPSCapabilitiesType(); } /** * * * @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, WpsPackage.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 - WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS, null, msgs); if (newProcessOfferings != null) msgs = ((InternalEObject)newProcessOfferings).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WpsPackage.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, WpsPackage.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, WpsPackage.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 - WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES, null, msgs); if (newLanguages != null) msgs = ((InternalEObject)newLanguages).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES, null, msgs); msgs = basicSetLanguages(newLanguages, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WpsPackage.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, WpsPackage.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 - WpsPackage.WPS_CAPABILITIES_TYPE__WSDL, null, msgs); if (newWSDL != null) msgs = ((InternalEObject)newWSDL).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WpsPackage.WPS_CAPABILITIES_TYPE__WSDL, null, msgs); msgs = basicSetWSDL(newWSDL, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WpsPackage.WPS_CAPABILITIES_TYPE__WSDL, newWSDL, newWSDL)); } /** * * * @generated */ public Object getService() { return service; } /** * * * @generated */ public void setService(Object newService) { Object oldService = service; service = newService; boolean oldServiceESet = serviceESet; serviceESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WpsPackage.WPS_CAPABILITIES_TYPE__SERVICE, oldService, service, !oldServiceESet)); } /** * * * @generated */ public void unsetService() { Object oldService = service; boolean oldServiceESet = serviceESet; service = SERVICE_EDEFAULT; serviceESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, WpsPackage.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 WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS: return basicSetProcessOfferings(null, msgs); case WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES: return basicSetLanguages(null, msgs); case WpsPackage.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 WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS: return getProcessOfferings(); case WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES: return getLanguages(); case WpsPackage.WPS_CAPABILITIES_TYPE__WSDL: return getWSDL(); case WpsPackage.WPS_CAPABILITIES_TYPE__SERVICE: return getService(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS: setProcessOfferings((ProcessOfferingsType)newValue); return; case WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES: setLanguages((LanguagesType1)newValue); return; case WpsPackage.WPS_CAPABILITIES_TYPE__WSDL: setWSDL((WSDLType)newValue); return; case WpsPackage.WPS_CAPABILITIES_TYPE__SERVICE: setService(newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ public void eUnset(int featureID) { switch (featureID) { case WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS: setProcessOfferings((ProcessOfferingsType)null); return; case WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES: setLanguages((LanguagesType1)null); return; case WpsPackage.WPS_CAPABILITIES_TYPE__WSDL: setWSDL((WSDLType)null); return; case WpsPackage.WPS_CAPABILITIES_TYPE__SERVICE: unsetService(); return; } super.eUnset(featureID); } /** * * * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case WpsPackage.WPS_CAPABILITIES_TYPE__PROCESS_OFFERINGS: return processOfferings != null; case WpsPackage.WPS_CAPABILITIES_TYPE__LANGUAGES: return languages != null; case WpsPackage.WPS_CAPABILITIES_TYPE__WSDL: return wSDL != null; case WpsPackage.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(" (service: "); if (serviceESet) result.append(service); else result.append(""); result.append(')'); return result.toString(); } } //WPSCapabilitiesTypeImpl