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