/**
*
*
*
* $Id$
*/
package net.opengis.ows11.impl;
import net.opengis.ows11.CodeType;
import net.opengis.ows11.Ows11Package;
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 'Code Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows11.impl.CodeTypeImpl#getValue Value}
* - {@link net.opengis.ows11.impl.CodeTypeImpl#getCodeSpace Code Space}
*
*
*
* @generated
*/
public class CodeTypeImpl extends EObjectImpl implements CodeType {
/**
* The default value of the '{@link #getValue() Value}' attribute.
*
*
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValue() Value}' attribute.
*
*
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
* The default value of the '{@link #getCodeSpace() Code Space}' attribute.
*
*
* @see #getCodeSpace()
* @generated
* @ordered
*/
protected static final String CODE_SPACE_EDEFAULT = null;
/**
* The cached value of the '{@link #getCodeSpace() Code Space}' attribute.
*
*
* @see #getCodeSpace()
* @generated
* @ordered
*/
protected String codeSpace = CODE_SPACE_EDEFAULT;
/**
*
*
* @generated
*/
protected CodeTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows11Package.Literals.CODE_TYPE;
}
/**
*
*
* @generated
*/
public String getValue() {
return value;
}
/**
*
*
* @generated
*/
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.CODE_TYPE__VALUE, oldValue, value));
}
/**
*
*
* @generated
*/
public String getCodeSpace() {
return codeSpace;
}
/**
*
*
* @generated
*/
public void setCodeSpace(String newCodeSpace) {
String oldCodeSpace = codeSpace;
codeSpace = newCodeSpace;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.CODE_TYPE__CODE_SPACE, oldCodeSpace, codeSpace));
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows11Package.CODE_TYPE__VALUE:
return getValue();
case Ows11Package.CODE_TYPE__CODE_SPACE:
return getCodeSpace();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows11Package.CODE_TYPE__VALUE:
setValue((String)newValue);
return;
case Ows11Package.CODE_TYPE__CODE_SPACE:
setCodeSpace((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows11Package.CODE_TYPE__VALUE:
setValue(VALUE_EDEFAULT);
return;
case Ows11Package.CODE_TYPE__CODE_SPACE:
setCodeSpace(CODE_SPACE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows11Package.CODE_TYPE__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
case Ows11Package.CODE_TYPE__CODE_SPACE:
return CODE_SPACE_EDEFAULT == null ? codeSpace != null : !CODE_SPACE_EDEFAULT.equals(codeSpace);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (value: ");
result.append(value);
result.append(", codeSpace: ");
result.append(codeSpace);
result.append(')');
return result.toString();
}
} //CodeTypeImpl