001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: ServiceIdentificationTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import net.opengis.ows.CodeType;
009: import net.opengis.ows.OwsPackage;
010: import net.opengis.ows.ServiceIdentificationType;
011:
012: import org.eclipse.emf.common.notify.Notification;
013: import org.eclipse.emf.common.notify.NotificationChain;
014:
015: import org.eclipse.emf.ecore.EClass;
016: import org.eclipse.emf.ecore.InternalEObject;
017:
018: import org.eclipse.emf.ecore.impl.ENotificationImpl;
019:
020: /**
021: * <!-- begin-user-doc -->
022: * An implementation of the model object '<em><b>Service Identification Type</b></em>'.
023: * <!-- end-user-doc -->
024: * <p>
025: * The following features are implemented:
026: * <ul>
027: * <li>{@link net.opengis.ows.impl.ServiceIdentificationTypeImpl#getServiceType <em>Service Type</em>}</li>
028: * <li>{@link net.opengis.ows.impl.ServiceIdentificationTypeImpl#getServiceTypeVersion <em>Service Type Version</em>}</li>
029: * <li>{@link net.opengis.ows.impl.ServiceIdentificationTypeImpl#getFees <em>Fees</em>}</li>
030: * <li>{@link net.opengis.ows.impl.ServiceIdentificationTypeImpl#getAccessConstraints <em>Access Constraints</em>}</li>
031: * </ul>
032: * </p>
033: *
034: * @generated
035: */
036: public class ServiceIdentificationTypeImpl extends DescriptionTypeImpl
037: implements ServiceIdentificationType {
038: /**
039: * The cached value of the '{@link #getServiceType() <em>Service Type</em>}' containment reference.
040: * <!-- begin-user-doc -->
041: * <!-- end-user-doc -->
042: * @see #getServiceType()
043: * @generated
044: * @ordered
045: */
046: protected CodeType serviceType;
047:
048: /**
049: * The default value of the '{@link #getServiceTypeVersion() <em>Service Type Version</em>}' attribute.
050: * <!-- begin-user-doc -->
051: * <!-- end-user-doc -->
052: * @see #getServiceTypeVersion()
053: * @generated
054: * @ordered
055: */
056: protected static final String SERVICE_TYPE_VERSION_EDEFAULT = null;
057:
058: /**
059: * The cached value of the '{@link #getServiceTypeVersion() <em>Service Type Version</em>}' attribute.
060: * <!-- begin-user-doc -->
061: * <!-- end-user-doc -->
062: * @see #getServiceTypeVersion()
063: * @generated
064: * @ordered
065: */
066: protected String serviceTypeVersion = SERVICE_TYPE_VERSION_EDEFAULT;
067:
068: /**
069: * The default value of the '{@link #getFees() <em>Fees</em>}' attribute.
070: * <!-- begin-user-doc -->
071: * <!-- end-user-doc -->
072: * @see #getFees()
073: * @generated
074: * @ordered
075: */
076: protected static final String FEES_EDEFAULT = null;
077:
078: /**
079: * The cached value of the '{@link #getFees() <em>Fees</em>}' attribute.
080: * <!-- begin-user-doc -->
081: * <!-- end-user-doc -->
082: * @see #getFees()
083: * @generated
084: * @ordered
085: */
086: protected String fees = FEES_EDEFAULT;
087:
088: /**
089: * The default value of the '{@link #getAccessConstraints() <em>Access Constraints</em>}' attribute.
090: * <!-- begin-user-doc -->
091: * <!-- end-user-doc -->
092: * @see #getAccessConstraints()
093: * @generated
094: * @ordered
095: */
096: protected static final String ACCESS_CONSTRAINTS_EDEFAULT = null;
097:
098: /**
099: * The cached value of the '{@link #getAccessConstraints() <em>Access Constraints</em>}' attribute.
100: * <!-- begin-user-doc -->
101: * <!-- end-user-doc -->
102: * @see #getAccessConstraints()
103: * @generated
104: * @ordered
105: */
106: protected String accessConstraints = ACCESS_CONSTRAINTS_EDEFAULT;
107:
108: /**
109: * <!-- begin-user-doc -->
110: * <!-- end-user-doc -->
111: * @generated
112: */
113: protected ServiceIdentificationTypeImpl() {
114: super ();
115: }
116:
117: /**
118: * <!-- begin-user-doc -->
119: * <!-- end-user-doc -->
120: * @generated
121: */
122: protected EClass eStaticClass() {
123: return OwsPackage.Literals.SERVICE_IDENTIFICATION_TYPE;
124: }
125:
126: /**
127: * <!-- begin-user-doc -->
128: * <!-- end-user-doc -->
129: * @generated
130: */
131: public CodeType getServiceType() {
132: return serviceType;
133: }
134:
135: /**
136: * <!-- begin-user-doc -->
137: * <!-- end-user-doc -->
138: * @generated
139: */
140: public NotificationChain basicSetServiceType(
141: CodeType newServiceType, NotificationChain msgs) {
142: CodeType oldServiceType = serviceType;
143: serviceType = newServiceType;
144: if (eNotificationRequired()) {
145: ENotificationImpl notification = new ENotificationImpl(
146: this ,
147: Notification.SET,
148: OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE,
149: oldServiceType, newServiceType);
150: if (msgs == null)
151: msgs = notification;
152: else
153: msgs.add(notification);
154: }
155: return msgs;
156: }
157:
158: /**
159: * <!-- begin-user-doc -->
160: * <!-- end-user-doc -->
161: * @generated
162: */
163: public void setServiceType(CodeType newServiceType) {
164: if (newServiceType != serviceType) {
165: NotificationChain msgs = null;
166: if (serviceType != null)
167: msgs = ((InternalEObject) serviceType)
168: .eInverseRemove(
169: this ,
170: EOPPOSITE_FEATURE_BASE
171: - OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE,
172: null, msgs);
173: if (newServiceType != null)
174: msgs = ((InternalEObject) newServiceType)
175: .eInverseAdd(
176: this ,
177: EOPPOSITE_FEATURE_BASE
178: - OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE,
179: null, msgs);
180: msgs = basicSetServiceType(newServiceType, msgs);
181: if (msgs != null)
182: msgs.dispatch();
183: } else if (eNotificationRequired())
184: eNotify(new ENotificationImpl(
185: this ,
186: Notification.SET,
187: OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE,
188: newServiceType, newServiceType));
189: }
190:
191: /**
192: * <!-- begin-user-doc -->
193: * <!-- end-user-doc -->
194: * @generated
195: */
196: public String getServiceTypeVersion() {
197: return serviceTypeVersion;
198: }
199:
200: /**
201: * <!-- begin-user-doc -->
202: * <!-- end-user-doc -->
203: * @generated
204: */
205: public void setServiceTypeVersion(String newServiceTypeVersion) {
206: String oldServiceTypeVersion = serviceTypeVersion;
207: serviceTypeVersion = newServiceTypeVersion;
208: if (eNotificationRequired())
209: eNotify(new ENotificationImpl(
210: this ,
211: Notification.SET,
212: OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE_VERSION,
213: oldServiceTypeVersion, serviceTypeVersion));
214: }
215:
216: /**
217: * <!-- begin-user-doc -->
218: * <!-- end-user-doc -->
219: * @generated
220: */
221: public String getFees() {
222: return fees;
223: }
224:
225: /**
226: * <!-- begin-user-doc -->
227: * <!-- end-user-doc -->
228: * @generated
229: */
230: public void setFees(String newFees) {
231: String oldFees = fees;
232: fees = newFees;
233: if (eNotificationRequired())
234: eNotify(new ENotificationImpl(this , Notification.SET,
235: OwsPackage.SERVICE_IDENTIFICATION_TYPE__FEES,
236: oldFees, fees));
237: }
238:
239: /**
240: * <!-- begin-user-doc -->
241: * <!-- end-user-doc -->
242: * @generated
243: */
244: public String getAccessConstraints() {
245: return accessConstraints;
246: }
247:
248: /**
249: * <!-- begin-user-doc -->
250: * <!-- end-user-doc -->
251: * @generated
252: */
253: public void setAccessConstraints(String newAccessConstraints) {
254: String oldAccessConstraints = accessConstraints;
255: accessConstraints = newAccessConstraints;
256: if (eNotificationRequired())
257: eNotify(new ENotificationImpl(
258: this ,
259: Notification.SET,
260: OwsPackage.SERVICE_IDENTIFICATION_TYPE__ACCESS_CONSTRAINTS,
261: oldAccessConstraints, accessConstraints));
262: }
263:
264: /**
265: * <!-- begin-user-doc -->
266: * <!-- end-user-doc -->
267: * @generated
268: */
269: public NotificationChain eInverseRemove(InternalEObject otherEnd,
270: int featureID, NotificationChain msgs) {
271: switch (featureID) {
272: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE:
273: return basicSetServiceType(null, msgs);
274: }
275: return super .eInverseRemove(otherEnd, featureID, msgs);
276: }
277:
278: /**
279: * <!-- begin-user-doc -->
280: * <!-- end-user-doc -->
281: * @generated
282: */
283: public Object eGet(int featureID, boolean resolve, boolean coreType) {
284: switch (featureID) {
285: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE:
286: return getServiceType();
287: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE_VERSION:
288: return getServiceTypeVersion();
289: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__FEES:
290: return getFees();
291: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__ACCESS_CONSTRAINTS:
292: return getAccessConstraints();
293: }
294: return super .eGet(featureID, resolve, coreType);
295: }
296:
297: /**
298: * <!-- begin-user-doc -->
299: * <!-- end-user-doc -->
300: * @generated
301: */
302: public void eSet(int featureID, Object newValue) {
303: switch (featureID) {
304: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE:
305: setServiceType((CodeType) newValue);
306: return;
307: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE_VERSION:
308: setServiceTypeVersion((String) newValue);
309: return;
310: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__FEES:
311: setFees((String) newValue);
312: return;
313: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__ACCESS_CONSTRAINTS:
314: setAccessConstraints((String) newValue);
315: return;
316: }
317: super .eSet(featureID, newValue);
318: }
319:
320: /**
321: * <!-- begin-user-doc -->
322: * <!-- end-user-doc -->
323: * @generated
324: */
325: public void eUnset(int featureID) {
326: switch (featureID) {
327: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE:
328: setServiceType((CodeType) null);
329: return;
330: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE_VERSION:
331: setServiceTypeVersion(SERVICE_TYPE_VERSION_EDEFAULT);
332: return;
333: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__FEES:
334: setFees(FEES_EDEFAULT);
335: return;
336: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__ACCESS_CONSTRAINTS:
337: setAccessConstraints(ACCESS_CONSTRAINTS_EDEFAULT);
338: return;
339: }
340: super .eUnset(featureID);
341: }
342:
343: /**
344: * <!-- begin-user-doc -->
345: * <!-- end-user-doc -->
346: * @generated
347: */
348: public boolean eIsSet(int featureID) {
349: switch (featureID) {
350: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE:
351: return serviceType != null;
352: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE_VERSION:
353: return SERVICE_TYPE_VERSION_EDEFAULT == null ? serviceTypeVersion != null
354: : !SERVICE_TYPE_VERSION_EDEFAULT
355: .equals(serviceTypeVersion);
356: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__FEES:
357: return FEES_EDEFAULT == null ? fees != null
358: : !FEES_EDEFAULT.equals(fees);
359: case OwsPackage.SERVICE_IDENTIFICATION_TYPE__ACCESS_CONSTRAINTS:
360: return ACCESS_CONSTRAINTS_EDEFAULT == null ? accessConstraints != null
361: : !ACCESS_CONSTRAINTS_EDEFAULT
362: .equals(accessConstraints);
363: }
364: return super .eIsSet(featureID);
365: }
366:
367: /**
368: * <!-- begin-user-doc -->
369: * <!-- end-user-doc -->
370: * @generated
371: */
372: public String toString() {
373: if (eIsProxy())
374: return super .toString();
375:
376: StringBuffer result = new StringBuffer(super .toString());
377: result.append(" (serviceTypeVersion: ");
378: result.append(serviceTypeVersion);
379: result.append(", fees: ");
380: result.append(fees);
381: result.append(", accessConstraints: ");
382: result.append(accessConstraints);
383: result.append(')');
384: return result.toString();
385: }
386:
387: } //ServiceIdentificationTypeImpl
|