001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: FeaturesNotLockedTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs.impl;
007:
008: import java.util.Collection;
009:
010: import net.opengis.wfs.FeaturesNotLockedType;
011: import net.opengis.wfs.WfsPackage;
012:
013: import org.eclipse.emf.common.notify.NotificationChain;
014:
015: import org.eclipse.emf.common.util.EList;
016:
017: import org.eclipse.emf.ecore.EClass;
018: import org.eclipse.emf.ecore.InternalEObject;
019:
020: import org.eclipse.emf.ecore.impl.EObjectImpl;
021:
022: import org.eclipse.emf.ecore.util.BasicFeatureMap;
023: import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
024: import org.eclipse.emf.ecore.util.FeatureMap;
025: import org.eclipse.emf.ecore.util.InternalEList;
026:
027: import org.opengis.filter.identity.FeatureId;
028:
029: /**
030: * <!-- begin-user-doc -->
031: * An implementation of the model object '<em><b>Features Not Locked Type</b></em>'.
032: * <!-- end-user-doc -->
033: * <p>
034: * The following features are implemented:
035: * <ul>
036: * <li>{@link net.opengis.wfs.impl.FeaturesNotLockedTypeImpl#getGroup <em>Group</em>}</li>
037: * <li>{@link net.opengis.wfs.impl.FeaturesNotLockedTypeImpl#getFeatureId <em>Feature Id</em>}</li>
038: * </ul>
039: * </p>
040: *
041: * @generated
042: */
043: public class FeaturesNotLockedTypeImpl extends EObjectImpl implements
044: FeaturesNotLockedType {
045: /**
046: * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
047: * <!-- begin-user-doc -->
048: * <!-- end-user-doc -->
049: * @see #getGroup()
050: * @generated
051: * @ordered
052: */
053: protected FeatureMap group;
054:
055: /**
056: * The cached value of the '{@link #getFeatureId() <em>Feature Id</em>}' attribute list.
057: * <!-- begin-user-doc -->
058: * <!-- end-user-doc -->
059: * @see #getFeatureId()
060: * @generated
061: * @ordered
062: */
063: protected EList featureId;
064:
065: /**
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @generated
069: */
070: protected FeaturesNotLockedTypeImpl() {
071: super ();
072: }
073:
074: /**
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @generated
078: */
079: protected EClass eStaticClass() {
080: return WfsPackage.Literals.FEATURES_NOT_LOCKED_TYPE;
081: }
082:
083: /**
084: * <!-- begin-user-doc -->
085: * <!-- end-user-doc -->
086: * @generated
087: */
088: public FeatureMap getGroup() {
089: if (group == null) {
090: group = new BasicFeatureMap(this ,
091: WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP);
092: }
093: return group;
094: }
095:
096: /**
097: * <!-- begin-user-doc -->
098: * <!-- end-user-doc -->
099: * @generated
100: */
101: public EList getFeatureId() {
102: if (featureId == null) {
103: featureId = new EDataTypeUniqueEList(FeatureId.class, this ,
104: WfsPackage.FEATURES_NOT_LOCKED_TYPE__FEATURE_ID);
105: }
106: return featureId;
107: }
108:
109: /**
110: * <!-- begin-user-doc -->
111: * <!-- end-user-doc -->
112: * @generated
113: */
114: public NotificationChain eInverseRemove(InternalEObject otherEnd,
115: int featureID, NotificationChain msgs) {
116: switch (featureID) {
117: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP:
118: return ((InternalEList) getGroup()).basicRemove(otherEnd,
119: msgs);
120: }
121: return super .eInverseRemove(otherEnd, featureID, msgs);
122: }
123:
124: /**
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @generated
128: */
129: public Object eGet(int featureID, boolean resolve, boolean coreType) {
130: switch (featureID) {
131: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP:
132: if (coreType)
133: return getGroup();
134: return ((FeatureMap.Internal) getGroup()).getWrapper();
135: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__FEATURE_ID:
136: return getFeatureId();
137: }
138: return super .eGet(featureID, resolve, coreType);
139: }
140:
141: /**
142: * <!-- begin-user-doc -->
143: * <!-- end-user-doc -->
144: * @generated
145: */
146: public void eSet(int featureID, Object newValue) {
147: switch (featureID) {
148: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP:
149: ((FeatureMap.Internal) getGroup()).set(newValue);
150: return;
151: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__FEATURE_ID:
152: getFeatureId().clear();
153: getFeatureId().addAll((Collection) newValue);
154: return;
155: }
156: super .eSet(featureID, newValue);
157: }
158:
159: /**
160: * <!-- begin-user-doc -->
161: * <!-- end-user-doc -->
162: * @generated
163: */
164: public void eUnset(int featureID) {
165: switch (featureID) {
166: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP:
167: getGroup().clear();
168: return;
169: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__FEATURE_ID:
170: getFeatureId().clear();
171: return;
172: }
173: super .eUnset(featureID);
174: }
175:
176: /**
177: * <!-- begin-user-doc -->
178: * <!-- end-user-doc -->
179: * @generated
180: */
181: public boolean eIsSet(int featureID) {
182: switch (featureID) {
183: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__GROUP:
184: return group != null && !group.isEmpty();
185: case WfsPackage.FEATURES_NOT_LOCKED_TYPE__FEATURE_ID:
186: return featureId != null && !featureId.isEmpty();
187: }
188: return super .eIsSet(featureID);
189: }
190:
191: /**
192: * <!-- begin-user-doc -->
193: * <!-- end-user-doc -->
194: * @generated
195: */
196: public String toString() {
197: if (eIsProxy())
198: return super .toString();
199:
200: StringBuffer result = new StringBuffer(super .toString());
201: result.append(" (group: ");
202: result.append(group);
203: result.append(", featureId: ");
204: result.append(featureId);
205: result.append(')');
206: return result.toString();
207: }
208:
209: } //FeaturesNotLockedTypeImpl
|