001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: OperationsTypeImpl.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.OperationType;
011: import net.opengis.wfs.OperationsType;
012: import net.opengis.wfs.WfsPackage;
013:
014: import org.eclipse.emf.common.util.EList;
015:
016: import org.eclipse.emf.ecore.EClass;
017:
018: import org.eclipse.emf.ecore.impl.EObjectImpl;
019:
020: import org.eclipse.emf.ecore.util.EDataTypeEList;
021:
022: /**
023: * <!-- begin-user-doc -->
024: * An implementation of the model object '<em><b>Operations Type</b></em>'.
025: * <!-- end-user-doc -->
026: * <p>
027: * The following features are implemented:
028: * <ul>
029: * <li>{@link net.opengis.wfs.impl.OperationsTypeImpl#getOperation <em>Operation</em>}</li>
030: * </ul>
031: * </p>
032: *
033: * @generated
034: */
035: public class OperationsTypeImpl extends EObjectImpl implements
036: OperationsType {
037: /**
038: * The cached value of the '{@link #getOperation() <em>Operation</em>}' attribute list.
039: * <!-- begin-user-doc -->
040: * <!-- end-user-doc -->
041: * @see #getOperation()
042: * @generated
043: * @ordered
044: */
045: protected EList operation;
046:
047: /**
048: * <!-- begin-user-doc -->
049: * <!-- end-user-doc -->
050: * @generated
051: */
052: protected OperationsTypeImpl() {
053: super ();
054: }
055:
056: /**
057: * <!-- begin-user-doc -->
058: * <!-- end-user-doc -->
059: * @generated
060: */
061: protected EClass eStaticClass() {
062: return WfsPackage.Literals.OPERATIONS_TYPE;
063: }
064:
065: /**
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @generated
069: */
070: public EList getOperation() {
071: if (operation == null) {
072: operation = new EDataTypeEList(OperationType.class, this ,
073: WfsPackage.OPERATIONS_TYPE__OPERATION);
074: }
075: return operation;
076: }
077:
078: /**
079: * <!-- begin-user-doc -->
080: * <!-- end-user-doc -->
081: * @generated
082: */
083: public Object eGet(int featureID, boolean resolve, boolean coreType) {
084: switch (featureID) {
085: case WfsPackage.OPERATIONS_TYPE__OPERATION:
086: return getOperation();
087: }
088: return super .eGet(featureID, resolve, coreType);
089: }
090:
091: /**
092: * <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: * @generated
095: */
096: public void eSet(int featureID, Object newValue) {
097: switch (featureID) {
098: case WfsPackage.OPERATIONS_TYPE__OPERATION:
099: getOperation().clear();
100: getOperation().addAll((Collection) newValue);
101: return;
102: }
103: super .eSet(featureID, newValue);
104: }
105:
106: /**
107: * <!-- begin-user-doc -->
108: * <!-- end-user-doc -->
109: * @generated
110: */
111: public void eUnset(int featureID) {
112: switch (featureID) {
113: case WfsPackage.OPERATIONS_TYPE__OPERATION:
114: getOperation().clear();
115: return;
116: }
117: super .eUnset(featureID);
118: }
119:
120: /**
121: * <!-- begin-user-doc -->
122: * <!-- end-user-doc -->
123: * @generated
124: */
125: public boolean eIsSet(int featureID) {
126: switch (featureID) {
127: case WfsPackage.OPERATIONS_TYPE__OPERATION:
128: return operation != null && !operation.isEmpty();
129: }
130: return super .eIsSet(featureID);
131: }
132:
133: /**
134: * <!-- begin-user-doc -->
135: * <!-- end-user-doc -->
136: * @generated
137: */
138: public String toString() {
139: if (eIsProxy())
140: return super .toString();
141:
142: StringBuffer result = new StringBuffer(super .toString());
143: result.append(" (operation: ");
144: result.append(operation);
145: result.append(')');
146: return result.toString();
147: }
148:
149: } //OperationsTypeImpl
|