/**
* <copyright>
* </copyright>
*
* $Id$
*/
package net.opengis.wcs10.impl;
import net.opengis.wcs10.ValueEnumType;
import net.opengis.wcs10.Wcs10Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Value Enum Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link net.opengis.wcs10.impl.ValueEnumTypeImpl#getSemantic <em>Semantic</em>}</li>
* <li>{@link net.opengis.wcs10.impl.ValueEnumTypeImpl#getType <em>Type</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ValueEnumTypeImpl extends ValueEnumBaseTypeImpl implements ValueEnumType {
/**
* The default value of the '{@link #getSemantic() <em>Semantic</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSemantic()
* @generated
* @ordered
*/
protected static final String SEMANTIC_EDEFAULT = null;
/**
* The cached value of the '{@link #getSemantic() <em>Semantic</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSemantic()
* @generated
* @ordered
*/
protected String semantic = SEMANTIC_EDEFAULT;
/**
* The default value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected static final String TYPE_EDEFAULT = null;
/**
* The cached value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected String type = TYPE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ValueEnumTypeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return Wcs10Package.Literals.VALUE_ENUM_TYPE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getSemantic() {
return semantic;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSemantic(String newSemantic) {
String oldSemantic = semantic;
semantic = newSemantic;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.VALUE_ENUM_TYPE__SEMANTIC, oldSemantic, semantic));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getType() {
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setType(String newType) {
String oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.VALUE_ENUM_TYPE__TYPE, oldType, type));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wcs10Package.VALUE_ENUM_TYPE__SEMANTIC:
return getSemantic();
case Wcs10Package.VALUE_ENUM_TYPE__TYPE:
return getType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wcs10Package.VALUE_ENUM_TYPE__SEMANTIC:
setSemantic((String)newValue);
return;
case Wcs10Package.VALUE_ENUM_TYPE__TYPE:
setType((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Wcs10Package.VALUE_ENUM_TYPE__SEMANTIC:
setSemantic(SEMANTIC_EDEFAULT);
return;
case Wcs10Package.VALUE_ENUM_TYPE__TYPE:
setType(TYPE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wcs10Package.VALUE_ENUM_TYPE__SEMANTIC:
return SEMANTIC_EDEFAULT == null ? semantic != null : !SEMANTIC_EDEFAULT.equals(semantic);
case Wcs10Package.VALUE_ENUM_TYPE__TYPE:
return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (semantic: ");
result.append(semantic);
result.append(", type: ");
result.append(type);
result.append(')');
return result.toString();
}
} //ValueEnumTypeImpl