001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: GetCapabilitiesTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs.impl;
007:
008: import net.opengis.wfs.GetCapabilitiesType;
009: import net.opengis.wfs.WfsPackage;
010:
011: import org.eclipse.emf.common.notify.Notification;
012:
013: import org.eclipse.emf.ecore.EClass;
014:
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016:
017: /**
018: * <!-- begin-user-doc -->
019: * An implementation of the model object '<em><b>Get Capabilities Type</b></em>'.
020: * <!-- end-user-doc -->
021: * <p>
022: * The following features are implemented:
023: * <ul>
024: * <li>{@link net.opengis.wfs.impl.GetCapabilitiesTypeImpl#getService <em>Service</em>}</li>
025: * </ul>
026: * </p>
027: *
028: * @generated
029: */
030: public class GetCapabilitiesTypeImpl extends
031: net.opengis.ows.impl.GetCapabilitiesTypeImpl implements
032: GetCapabilitiesType {
033: /**
034: * The default value of the '{@link #getService() <em>Service</em>}' attribute.
035: * <!-- begin-user-doc -->
036: * <!-- end-user-doc -->
037: * @see #getService()
038: * @generated
039: * @ordered
040: */
041: protected static final String SERVICE_EDEFAULT = "WFS";
042:
043: /**
044: * The cached value of the '{@link #getService() <em>Service</em>}' attribute.
045: * <!-- begin-user-doc -->
046: * <!-- end-user-doc -->
047: * @see #getService()
048: * @generated
049: * @ordered
050: */
051: protected String service = SERVICE_EDEFAULT;
052:
053: /**
054: * This is true if the Service attribute has been set.
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @generated
058: * @ordered
059: */
060: protected boolean serviceESet;
061:
062: /**
063: * <!-- begin-user-doc -->
064: * <!-- end-user-doc -->
065: * @generated
066: */
067: protected GetCapabilitiesTypeImpl() {
068: super ();
069: }
070:
071: /**
072: * <!-- begin-user-doc -->
073: * <!-- end-user-doc -->
074: * @generated
075: */
076: protected EClass eStaticClass() {
077: return WfsPackage.Literals.GET_CAPABILITIES_TYPE;
078: }
079:
080: /**
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @generated
084: */
085: public String getService() {
086: return service;
087: }
088:
089: /**
090: * <!-- begin-user-doc -->
091: * <!-- end-user-doc -->
092: * @generated
093: */
094: public void setService(String newService) {
095: String oldService = service;
096: service = newService;
097: boolean oldServiceESet = serviceESet;
098: serviceESet = true;
099: if (eNotificationRequired())
100: eNotify(new ENotificationImpl(this , Notification.SET,
101: WfsPackage.GET_CAPABILITIES_TYPE__SERVICE,
102: oldService, service, !oldServiceESet));
103: }
104:
105: /**
106: * <!-- begin-user-doc -->
107: * <!-- end-user-doc -->
108: * @generated
109: */
110: public void unsetService() {
111: String oldService = service;
112: boolean oldServiceESet = serviceESet;
113: service = SERVICE_EDEFAULT;
114: serviceESet = false;
115: if (eNotificationRequired())
116: eNotify(new ENotificationImpl(this , Notification.UNSET,
117: WfsPackage.GET_CAPABILITIES_TYPE__SERVICE,
118: oldService, SERVICE_EDEFAULT, oldServiceESet));
119: }
120:
121: /**
122: * <!-- begin-user-doc -->
123: * <!-- end-user-doc -->
124: * @generated
125: */
126: public boolean isSetService() {
127: return serviceESet;
128: }
129:
130: /**
131: * <!-- begin-user-doc -->
132: * <!-- end-user-doc -->
133: * @generated
134: */
135: public Object eGet(int featureID, boolean resolve, boolean coreType) {
136: switch (featureID) {
137: case WfsPackage.GET_CAPABILITIES_TYPE__SERVICE:
138: return getService();
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.GET_CAPABILITIES_TYPE__SERVICE:
151: setService((String) newValue);
152: return;
153: }
154: super .eSet(featureID, newValue);
155: }
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: public void eUnset(int featureID) {
163: switch (featureID) {
164: case WfsPackage.GET_CAPABILITIES_TYPE__SERVICE:
165: unsetService();
166: return;
167: }
168: super .eUnset(featureID);
169: }
170:
171: /**
172: * <!-- begin-user-doc -->
173: * <!-- end-user-doc -->
174: * @generated
175: */
176: public boolean eIsSet(int featureID) {
177: switch (featureID) {
178: case WfsPackage.GET_CAPABILITIES_TYPE__SERVICE:
179: return isSetService();
180: }
181: return super .eIsSet(featureID);
182: }
183:
184: /**
185: * <!-- begin-user-doc -->
186: * <!-- end-user-doc -->
187: * @generated
188: */
189: public String toString() {
190: if (eIsProxy())
191: return super .toString();
192:
193: StringBuffer result = new StringBuffer(super .toString());
194: result.append(" (service: ");
195: if (serviceESet)
196: result.append(service);
197: else
198: result.append("<unset>");
199: result.append(')');
200: return result.toString();
201: }
202:
203: } //GetCapabilitiesTypeImpl
|