/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.wfs.impl; import net.opengis.wfs.MetadataURLType; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Metadata URL Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getValue <em>Value</em>}</li> * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getFormat <em>Format</em>}</li> * <li>{@link net.opengis.wfs.impl.MetadataURLTypeImpl#getType <em>Type</em>}</li> * </ul> * </p> * * @generated */ public class MetadataURLTypeImpl extends EObjectImpl implements MetadataURLType { /** * The default value of the '{@link #getValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getValue() * @generated * @ordered */ protected static final String VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getValue() * @generated * @ordered */ protected String value = VALUE_EDEFAULT; /** * The default value of the '{@link #getFormat() <em>Format</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getFormat() * @generated * @ordered */ protected static final String FORMAT_EDEFAULT = null; /** * The cached value of the '{@link #getFormat() <em>Format</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getFormat() * @generated * @ordered */ protected String format = FORMAT_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 MetadataURLTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return WfsPackage.Literals.METADATA_URL_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setValue(String newValue) { String oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WfsPackage.METADATA_URL_TYPE__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getFormat() { return format; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setFormat(String newFormat) { String oldFormat = format; format = newFormat; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WfsPackage.METADATA_URL_TYPE__FORMAT, oldFormat, format)); } /** * <!-- 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, WfsPackage.METADATA_URL_TYPE__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case WfsPackage.METADATA_URL_TYPE__VALUE: return getValue(); case WfsPackage.METADATA_URL_TYPE__FORMAT: return getFormat(); case WfsPackage.METADATA_URL_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 WfsPackage.METADATA_URL_TYPE__VALUE: setValue((String)newValue); return; case WfsPackage.METADATA_URL_TYPE__FORMAT: setFormat((String)newValue); return; case WfsPackage.METADATA_URL_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 WfsPackage.METADATA_URL_TYPE__VALUE: setValue(VALUE_EDEFAULT); return; case WfsPackage.METADATA_URL_TYPE__FORMAT: setFormat(FORMAT_EDEFAULT); return; case WfsPackage.METADATA_URL_TYPE__TYPE: setType(TYPE_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case WfsPackage.METADATA_URL_TYPE__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); case WfsPackage.METADATA_URL_TYPE__FORMAT: return FORMAT_EDEFAULT == null ? format != null : !FORMAT_EDEFAULT.equals(format); case WfsPackage.METADATA_URL_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(" (value: "); result.append(value); result.append(", format: "); result.append(format); result.append(", type: "); result.append(type); result.append(')'); return result.toString(); } } //MetadataURLTypeImpl