/** * * * * $Id$ */ package net.opengis.wfs.impl; import javax.xml.namespace.QName; import net.opengis.wfs.PropertyType; import net.opengis.wfs.WfsPackage; 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 'Property Type'. * *

* The following features are implemented: *

*

* * @generated */ public class PropertyTypeImpl extends EObjectImpl implements PropertyType { /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final QName NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected QName name = NAME_EDEFAULT; /** * The default value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected static final Object VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected Object value = VALUE_EDEFAULT; /** * * * @generated */ protected PropertyTypeImpl() { super(); } /** * * * @generated */ protected EClass eStaticClass() { return WfsPackage.Literals.PROPERTY_TYPE; } /** * * * @generated */ public QName getName() { return name; } /** * * * @generated */ public void setName(QName newName) { QName oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WfsPackage.PROPERTY_TYPE__NAME, oldName, name)); } /** * * * @generated */ public Object getValue() { return value; } /** * * * @generated */ public void setValue(Object newValue) { Object oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WfsPackage.PROPERTY_TYPE__VALUE, oldValue, value)); } /** * * * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case WfsPackage.PROPERTY_TYPE__NAME: return getName(); case WfsPackage.PROPERTY_TYPE__VALUE: return getValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case WfsPackage.PROPERTY_TYPE__NAME: setName((QName)newValue); return; case WfsPackage.PROPERTY_TYPE__VALUE: setValue(newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ public void eUnset(int featureID) { switch (featureID) { case WfsPackage.PROPERTY_TYPE__NAME: setName(NAME_EDEFAULT); return; case WfsPackage.PROPERTY_TYPE__VALUE: setValue(VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case WfsPackage.PROPERTY_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case WfsPackage.PROPERTY_TYPE__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); } return super.eIsSet(featureID); } /** * * * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(", value: "); result.append(value); result.append(')'); return result.toString(); } } //PropertyTypeImpl