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