/** * * * * $Id$ */ package net.opengis.ows11.impl; import java.util.Collection; import net.opengis.ows11.ExceptionType; import net.opengis.ows11.Ows11Package; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EDataTypeEList; /** * * An implementation of the model object 'Exception Type'. * *

* The following features are implemented: *

*

* * @generated */ public class ExceptionTypeImpl extends EObjectImpl implements ExceptionType { /** * The cached value of the '{@link #getExceptionText() Exception Text}' attribute list. * * * @see #getExceptionText() * @generated * @ordered */ protected EList exceptionText; /** * The default value of the '{@link #getExceptionCode() Exception Code}' attribute. * * * @see #getExceptionCode() * @generated * @ordered */ protected static final String EXCEPTION_CODE_EDEFAULT = null; /** * The cached value of the '{@link #getExceptionCode() Exception Code}' attribute. * * * @see #getExceptionCode() * @generated * @ordered */ protected String exceptionCode = EXCEPTION_CODE_EDEFAULT; /** * The default value of the '{@link #getLocator() Locator}' attribute. * * * @see #getLocator() * @generated * @ordered */ protected static final String LOCATOR_EDEFAULT = null; /** * The cached value of the '{@link #getLocator() Locator}' attribute. * * * @see #getLocator() * @generated * @ordered */ protected String locator = LOCATOR_EDEFAULT; /** * * * @generated */ protected ExceptionTypeImpl() { super(); } /** * * * @generated */ protected EClass eStaticClass() { return Ows11Package.Literals.EXCEPTION_TYPE; } /** * * * @generated */ public EList getExceptionText() { if (exceptionText == null) { exceptionText = new EDataTypeEList(String.class, this, Ows11Package.EXCEPTION_TYPE__EXCEPTION_TEXT); } return exceptionText; } /** * * * @generated */ public String getExceptionCode() { return exceptionCode; } /** * * * @generated */ public void setExceptionCode(String newExceptionCode) { String oldExceptionCode = exceptionCode; exceptionCode = newExceptionCode; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.EXCEPTION_TYPE__EXCEPTION_CODE, oldExceptionCode, exceptionCode)); } /** * * * @generated */ public String getLocator() { return locator; } /** * * * @generated */ public void setLocator(String newLocator) { String oldLocator = locator; locator = newLocator; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.EXCEPTION_TYPE__LOCATOR, oldLocator, locator)); } /** * * * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Ows11Package.EXCEPTION_TYPE__EXCEPTION_TEXT: return getExceptionText(); case Ows11Package.EXCEPTION_TYPE__EXCEPTION_CODE: return getExceptionCode(); case Ows11Package.EXCEPTION_TYPE__LOCATOR: return getLocator(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Ows11Package.EXCEPTION_TYPE__EXCEPTION_TEXT: getExceptionText().clear(); getExceptionText().addAll((Collection)newValue); return; case Ows11Package.EXCEPTION_TYPE__EXCEPTION_CODE: setExceptionCode((String)newValue); return; case Ows11Package.EXCEPTION_TYPE__LOCATOR: setLocator((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ public void eUnset(int featureID) { switch (featureID) { case Ows11Package.EXCEPTION_TYPE__EXCEPTION_TEXT: getExceptionText().clear(); return; case Ows11Package.EXCEPTION_TYPE__EXCEPTION_CODE: setExceptionCode(EXCEPTION_CODE_EDEFAULT); return; case Ows11Package.EXCEPTION_TYPE__LOCATOR: setLocator(LOCATOR_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Ows11Package.EXCEPTION_TYPE__EXCEPTION_TEXT: return exceptionText != null && !exceptionText.isEmpty(); case Ows11Package.EXCEPTION_TYPE__EXCEPTION_CODE: return EXCEPTION_CODE_EDEFAULT == null ? exceptionCode != null : !EXCEPTION_CODE_EDEFAULT.equals(exceptionCode); case Ows11Package.EXCEPTION_TYPE__LOCATOR: return LOCATOR_EDEFAULT == null ? locator != null : !LOCATOR_EDEFAULT.equals(locator); } return super.eIsSet(featureID); } /** * * * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (exceptionText: "); result.append(exceptionText); result.append(", exceptionCode: "); result.append(exceptionCode); result.append(", locator: "); result.append(locator); result.append(')'); return result.toString(); } } //ExceptionTypeImpl