/**
*
*
*
* $Id$
*/
package net.opengis.ows11.impl;
import java.util.Collection;
import net.opengis.ows11.ExceptionReportType;
import net.opengis.ows11.ExceptionType;
import net.opengis.ows11.Ows11Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
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;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Exception Report Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows11.impl.ExceptionReportTypeImpl#getException Exception}
* - {@link net.opengis.ows11.impl.ExceptionReportTypeImpl#getLang Lang}
* - {@link net.opengis.ows11.impl.ExceptionReportTypeImpl#getVersion Version}
*
*
*
* @generated
*/
public class ExceptionReportTypeImpl extends EObjectImpl implements ExceptionReportType {
/**
* The cached value of the '{@link #getException() Exception}' containment reference list.
*
*
* @see #getException()
* @generated
* @ordered
*/
protected EList exception;
/**
* 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 #getVersion() Version}' attribute.
*
*
* @see #getVersion()
* @generated
* @ordered
*/
protected static final String VERSION_EDEFAULT = null;
/**
* The cached value of the '{@link #getVersion() Version}' attribute.
*
*
* @see #getVersion()
* @generated
* @ordered
*/
protected String version = VERSION_EDEFAULT;
/**
*
*
* @generated
*/
protected ExceptionReportTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows11Package.Literals.EXCEPTION_REPORT_TYPE;
}
/**
*
*
* @generated
*/
public EList getException() {
if (exception == null) {
exception = new EObjectContainmentEList(ExceptionType.class, this, Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION);
}
return exception;
}
/**
*
*
* @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, Ows11Package.EXCEPTION_REPORT_TYPE__LANG, oldLang, lang));
}
/**
*
*
* @generated
*/
public String getVersion() {
return version;
}
/**
*
*
* @generated
*/
public void setVersion(String newVersion) {
String oldVersion = version;
version = newVersion;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.EXCEPTION_REPORT_TYPE__VERSION, oldVersion, version));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION:
return ((InternalEList)getException()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION:
return getException();
case Ows11Package.EXCEPTION_REPORT_TYPE__LANG:
return getLang();
case Ows11Package.EXCEPTION_REPORT_TYPE__VERSION:
return getVersion();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION:
getException().clear();
getException().addAll((Collection)newValue);
return;
case Ows11Package.EXCEPTION_REPORT_TYPE__LANG:
setLang((String)newValue);
return;
case Ows11Package.EXCEPTION_REPORT_TYPE__VERSION:
setVersion((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION:
getException().clear();
return;
case Ows11Package.EXCEPTION_REPORT_TYPE__LANG:
setLang(LANG_EDEFAULT);
return;
case Ows11Package.EXCEPTION_REPORT_TYPE__VERSION:
setVersion(VERSION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows11Package.EXCEPTION_REPORT_TYPE__EXCEPTION:
return exception != null && !exception.isEmpty();
case Ows11Package.EXCEPTION_REPORT_TYPE__LANG:
return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang);
case Ows11Package.EXCEPTION_REPORT_TYPE__VERSION:
return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
}
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(", version: ");
result.append(version);
result.append(')');
return result.toString();
}
} //ExceptionReportTypeImpl