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