/** * * * * $Id$ */ package net.opengis.ows10.impl; import java.util.Collection; import net.opengis.ows10.HTTPType; import net.opengis.ows10.Ows10Package; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.BasicFeatureMap; import org.eclipse.emf.ecore.util.FeatureMap; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'HTTP Type'. * *

* The following features are implemented: *

*

* * @generated */ public class HTTPTypeImpl extends EObjectImpl implements HTTPType { /** * The cached value of the '{@link #getGroup() Group}' attribute list. * * * @see #getGroup() * @generated * @ordered */ protected FeatureMap group; /** * * * @generated */ protected HTTPTypeImpl() { super(); } /** * * * @generated */ protected EClass eStaticClass() { return Ows10Package.eINSTANCE.getHTTPType(); } /** * * * @generated */ public FeatureMap getGroup() { if (group == null) { group = new BasicFeatureMap(this, Ows10Package.HTTP_TYPE__GROUP); } return group; } /** * * * @generated */ public EList getGet() { return getGroup().list(Ows10Package.eINSTANCE.getHTTPType_Get()); } /** * * * @generated */ public EList getPost() { return getGroup().list(Ows10Package.eINSTANCE.getHTTPType_Post()); } /** * * * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Ows10Package.HTTP_TYPE__GROUP: return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs); case Ows10Package.HTTP_TYPE__GET: return ((InternalEList)getGet()).basicRemove(otherEnd, msgs); case Ows10Package.HTTP_TYPE__POST: return ((InternalEList)getPost()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Ows10Package.HTTP_TYPE__GROUP: if (coreType) return getGroup(); return ((FeatureMap.Internal)getGroup()).getWrapper(); case Ows10Package.HTTP_TYPE__GET: return getGet(); case Ows10Package.HTTP_TYPE__POST: return getPost(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case Ows10Package.HTTP_TYPE__GROUP: ((FeatureMap.Internal)getGroup()).set(newValue); return; case Ows10Package.HTTP_TYPE__GET: getGet().clear(); getGet().addAll((Collection)newValue); return; case Ows10Package.HTTP_TYPE__POST: getPost().clear(); getPost().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ public void eUnset(int featureID) { switch (featureID) { case Ows10Package.HTTP_TYPE__GROUP: getGroup().clear(); return; case Ows10Package.HTTP_TYPE__GET: getGet().clear(); return; case Ows10Package.HTTP_TYPE__POST: getPost().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case Ows10Package.HTTP_TYPE__GROUP: return group != null && !group.isEmpty(); case Ows10Package.HTTP_TYPE__GET: return !getGet().isEmpty(); case Ows10Package.HTTP_TYPE__POST: return !getPost().isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (group: "); result.append(group); result.append(')'); return result.toString(); } } //HTTPTypeImpl