/**
*
*
*
* $Id$
*/
package net.opengis.wps10.impl;
import net.opengis.wps10.ResponseBaseType;
import net.opengis.wps10.Wps10Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
*
* An implementation of the model object 'Response Base Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wps10.impl.ResponseBaseTypeImpl#getLang Lang}
* - {@link net.opengis.wps10.impl.ResponseBaseTypeImpl#getService Service}
* - {@link net.opengis.wps10.impl.ResponseBaseTypeImpl#getVersion Version}
*
*
*
* @generated
*/
public class ResponseBaseTypeImpl extends EObjectImpl implements ResponseBaseType {
/**
* 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;
/**
* The default value of the '{@link #getVersion() Version}' attribute.
*
*
* @see #getVersion()
* @generated
* @ordered
*/
protected static final String VERSION_EDEFAULT = "1.0.0";
/**
* The cached value of the '{@link #getVersion() Version}' attribute.
*
*
* @see #getVersion()
* @generated
* @ordered
*/
protected String version = VERSION_EDEFAULT;
/**
* This is true if the Version attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean versionESet;
/**
*
*
* @generated
*/
protected ResponseBaseTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Wps10Package.Literals.RESPONSE_BASE_TYPE;
}
/**
*
*
* @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.RESPONSE_BASE_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.RESPONSE_BASE_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.RESPONSE_BASE_TYPE__SERVICE, oldService, SERVICE_EDEFAULT, oldServiceESet));
}
/**
*
*
* @generated
*/
public boolean isSetService() {
return serviceESet;
}
/**
*
*
* @generated
*/
public String getVersion() {
return version;
}
/**
*
*
* @generated
*/
public void setVersion(String newVersion) {
String oldVersion = version;
version = newVersion;
boolean oldVersionESet = versionESet;
versionESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wps10Package.RESPONSE_BASE_TYPE__VERSION, oldVersion, version, !oldVersionESet));
}
/**
*
*
* @generated
*/
public void unsetVersion() {
String oldVersion = version;
boolean oldVersionESet = versionESet;
version = VERSION_EDEFAULT;
versionESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wps10Package.RESPONSE_BASE_TYPE__VERSION, oldVersion, VERSION_EDEFAULT, oldVersionESet));
}
/**
*
*
* @generated
*/
public boolean isSetVersion() {
return versionESet;
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wps10Package.RESPONSE_BASE_TYPE__LANG:
return getLang();
case Wps10Package.RESPONSE_BASE_TYPE__SERVICE:
return getService();
case Wps10Package.RESPONSE_BASE_TYPE__VERSION:
return getVersion();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wps10Package.RESPONSE_BASE_TYPE__LANG:
setLang((String)newValue);
return;
case Wps10Package.RESPONSE_BASE_TYPE__SERVICE:
setService((String)newValue);
return;
case Wps10Package.RESPONSE_BASE_TYPE__VERSION:
setVersion((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wps10Package.RESPONSE_BASE_TYPE__LANG:
setLang(LANG_EDEFAULT);
return;
case Wps10Package.RESPONSE_BASE_TYPE__SERVICE:
unsetService();
return;
case Wps10Package.RESPONSE_BASE_TYPE__VERSION:
unsetVersion();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wps10Package.RESPONSE_BASE_TYPE__LANG:
return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang);
case Wps10Package.RESPONSE_BASE_TYPE__SERVICE:
return isSetService();
case Wps10Package.RESPONSE_BASE_TYPE__VERSION:
return isSetVersion();
}
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(", version: ");
if (versionESet) result.append(version); else result.append("");
result.append(')');
return result.toString();
}
} //ResponseBaseTypeImpl