001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: RequestMethodTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import java.util.Collection;
009:
010: import net.opengis.ows.DomainType;
011: import net.opengis.ows.OwsPackage;
012: import net.opengis.ows.RequestMethodType;
013:
014: import org.eclipse.emf.common.notify.NotificationChain;
015:
016: import org.eclipse.emf.common.util.EList;
017:
018: import org.eclipse.emf.ecore.EClass;
019: import org.eclipse.emf.ecore.InternalEObject;
020:
021: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
022: import org.eclipse.emf.ecore.util.InternalEList;
023:
024: /**
025: * <!-- begin-user-doc -->
026: * An implementation of the model object '<em><b>Request Method Type</b></em>'.
027: * <!-- end-user-doc -->
028: * <p>
029: * The following features are implemented:
030: * <ul>
031: * <li>{@link net.opengis.ows.impl.RequestMethodTypeImpl#getConstraint <em>Constraint</em>}</li>
032: * </ul>
033: * </p>
034: *
035: * @generated
036: */
037: public class RequestMethodTypeImpl extends OnlineResourceTypeImpl
038: implements RequestMethodType {
039: /**
040: * The cached value of the '{@link #getConstraint() <em>Constraint</em>}' containment reference list.
041: * <!-- begin-user-doc -->
042: * <!-- end-user-doc -->
043: * @see #getConstraint()
044: * @generated
045: * @ordered
046: */
047: protected EList constraint;
048:
049: /**
050: * <!-- begin-user-doc -->
051: * <!-- end-user-doc -->
052: * @generated
053: */
054: protected RequestMethodTypeImpl() {
055: super ();
056: }
057:
058: /**
059: * <!-- begin-user-doc -->
060: * <!-- end-user-doc -->
061: * @generated
062: */
063: protected EClass eStaticClass() {
064: return OwsPackage.Literals.REQUEST_METHOD_TYPE;
065: }
066:
067: /**
068: * <!-- begin-user-doc -->
069: * <!-- end-user-doc -->
070: * @generated
071: */
072: public EList getConstraint() {
073: if (constraint == null) {
074: constraint = new EObjectContainmentEList(DomainType.class,
075: this , OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT);
076: }
077: return constraint;
078: }
079:
080: /**
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @generated
084: */
085: public NotificationChain eInverseRemove(InternalEObject otherEnd,
086: int featureID, NotificationChain msgs) {
087: switch (featureID) {
088: case OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT:
089: return ((InternalEList) getConstraint()).basicRemove(
090: otherEnd, msgs);
091: }
092: return super .eInverseRemove(otherEnd, featureID, msgs);
093: }
094:
095: /**
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: * @generated
099: */
100: public Object eGet(int featureID, boolean resolve, boolean coreType) {
101: switch (featureID) {
102: case OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT:
103: return getConstraint();
104: }
105: return super .eGet(featureID, resolve, coreType);
106: }
107:
108: /**
109: * <!-- begin-user-doc -->
110: * <!-- end-user-doc -->
111: * @generated
112: */
113: public void eSet(int featureID, Object newValue) {
114: switch (featureID) {
115: case OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT:
116: getConstraint().clear();
117: getConstraint().addAll((Collection) newValue);
118: return;
119: }
120: super .eSet(featureID, newValue);
121: }
122:
123: /**
124: * <!-- begin-user-doc -->
125: * <!-- end-user-doc -->
126: * @generated
127: */
128: public void eUnset(int featureID) {
129: switch (featureID) {
130: case OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT:
131: getConstraint().clear();
132: return;
133: }
134: super .eUnset(featureID);
135: }
136:
137: /**
138: * <!-- begin-user-doc -->
139: * <!-- end-user-doc -->
140: * @generated
141: */
142: public boolean eIsSet(int featureID) {
143: switch (featureID) {
144: case OwsPackage.REQUEST_METHOD_TYPE__CONSTRAINT:
145: return constraint != null && !constraint.isEmpty();
146: }
147: return super .eIsSet(featureID);
148: }
149:
150: } //RequestMethodTypeImpl
|