001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: VersionedUpdateElementTypeImpl.java 7988 2007-12-12 20:29:15Z aaime $
006: */package net.opengis.wfsv.impl;
007:
008: import net.opengis.wfs.impl.UpdateElementTypeImpl;
009:
010: import net.opengis.wfsv.VersionedUpdateElementType;
011: import net.opengis.wfsv.WfsvPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014:
015: import org.eclipse.emf.ecore.EClass;
016:
017: import org.eclipse.emf.ecore.impl.ENotificationImpl;
018:
019: /**
020: * <!-- begin-user-doc -->
021: * An implementation of the model object '<em><b>Versioned Update Element Type</b></em>'.
022: * <!-- end-user-doc -->
023: * <p>
024: * The following features are implemented:
025: * <ul>
026: * <li>{@link net.opengis.wfsv.impl.VersionedUpdateElementTypeImpl#getFeatureVersion <em>Feature Version</em>}</li>
027: * </ul>
028: * </p>
029: *
030: * @generated
031: */
032: public class VersionedUpdateElementTypeImpl extends
033: UpdateElementTypeImpl implements VersionedUpdateElementType {
034: /**
035: * The default value of the '{@link #getFeatureVersion() <em>Feature Version</em>}' attribute.
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @see #getFeatureVersion()
039: * @generated
040: * @ordered
041: */
042: protected static final String FEATURE_VERSION_EDEFAULT = null;
043:
044: /**
045: * The cached value of the '{@link #getFeatureVersion() <em>Feature Version</em>}' attribute.
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @see #getFeatureVersion()
049: * @generated
050: * @ordered
051: */
052: protected String featureVersion = FEATURE_VERSION_EDEFAULT;
053:
054: /**
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @generated
058: */
059: protected VersionedUpdateElementTypeImpl() {
060: super ();
061: }
062:
063: /**
064: * <!-- begin-user-doc -->
065: * <!-- end-user-doc -->
066: * @generated
067: */
068: protected EClass eStaticClass() {
069: return WfsvPackage.Literals.VERSIONED_UPDATE_ELEMENT_TYPE;
070: }
071:
072: /**
073: * <!-- begin-user-doc -->
074: * <!-- end-user-doc -->
075: * @generated
076: */
077: public String getFeatureVersion() {
078: return featureVersion;
079: }
080:
081: /**
082: * <!-- begin-user-doc -->
083: * <!-- end-user-doc -->
084: * @generated
085: */
086: public void setFeatureVersion(String newFeatureVersion) {
087: String oldFeatureVersion = featureVersion;
088: featureVersion = newFeatureVersion;
089: if (eNotificationRequired())
090: eNotify(new ENotificationImpl(
091: this ,
092: Notification.SET,
093: WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE__FEATURE_VERSION,
094: oldFeatureVersion, featureVersion));
095: }
096:
097: /**
098: * <!-- begin-user-doc -->
099: * <!-- end-user-doc -->
100: * @generated
101: */
102: public Object eGet(int featureID, boolean resolve, boolean coreType) {
103: switch (featureID) {
104: case WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE__FEATURE_VERSION:
105: return getFeatureVersion();
106: }
107: return super .eGet(featureID, resolve, coreType);
108: }
109:
110: /**
111: * <!-- begin-user-doc -->
112: * <!-- end-user-doc -->
113: * @generated
114: */
115: public void eSet(int featureID, Object newValue) {
116: switch (featureID) {
117: case WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE__FEATURE_VERSION:
118: setFeatureVersion((String) newValue);
119: return;
120: }
121: super .eSet(featureID, newValue);
122: }
123:
124: /**
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @generated
128: */
129: public void eUnset(int featureID) {
130: switch (featureID) {
131: case WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE__FEATURE_VERSION:
132: setFeatureVersion(FEATURE_VERSION_EDEFAULT);
133: return;
134: }
135: super .eUnset(featureID);
136: }
137:
138: /**
139: * <!-- begin-user-doc -->
140: * <!-- end-user-doc -->
141: * @generated
142: */
143: public boolean eIsSet(int featureID) {
144: switch (featureID) {
145: case WfsvPackage.VERSIONED_UPDATE_ELEMENT_TYPE__FEATURE_VERSION:
146: return FEATURE_VERSION_EDEFAULT == null ? featureVersion != null
147: : !FEATURE_VERSION_EDEFAULT.equals(featureVersion);
148: }
149: return super .eIsSet(featureID);
150: }
151:
152: /**
153: * <!-- begin-user-doc -->
154: * <!-- end-user-doc -->
155: * @generated
156: */
157: public String toString() {
158: if (eIsProxy())
159: return super .toString();
160:
161: StringBuffer result = new StringBuffer(super .toString());
162: result.append(" (featureVersion: ");
163: result.append(featureVersion);
164: result.append(')');
165: return result.toString();
166: }
167:
168: } //VersionedUpdateElementTypeImpl
|