001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: DCPTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import net.opengis.ows.DCPType;
009: import net.opengis.ows.HTTPType;
010: import net.opengis.ows.OwsPackage;
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: import org.eclipse.emf.ecore.impl.EObjectImpl;
020:
021: /**
022: * <!-- begin-user-doc -->
023: * An implementation of the model object '<em><b>DCP Type</b></em>'.
024: * <!-- end-user-doc -->
025: * <p>
026: * The following features are implemented:
027: * <ul>
028: * <li>{@link net.opengis.ows.impl.DCPTypeImpl#getHTTP <em>HTTP</em>}</li>
029: * </ul>
030: * </p>
031: *
032: * @generated
033: */
034: public class DCPTypeImpl extends EObjectImpl implements DCPType {
035: /**
036: * The cached value of the '{@link #getHTTP() <em>HTTP</em>}' containment reference.
037: * <!-- begin-user-doc -->
038: * <!-- end-user-doc -->
039: * @see #getHTTP()
040: * @generated
041: * @ordered
042: */
043: protected HTTPType hTTP;
044:
045: /**
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @generated
049: */
050: protected DCPTypeImpl() {
051: super ();
052: }
053:
054: /**
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @generated
058: */
059: protected EClass eStaticClass() {
060: return OwsPackage.Literals.DCP_TYPE;
061: }
062:
063: /**
064: * <!-- begin-user-doc -->
065: * <!-- end-user-doc -->
066: * @generated
067: */
068: public HTTPType getHTTP() {
069: return hTTP;
070: }
071:
072: /**
073: * <!-- begin-user-doc -->
074: * <!-- end-user-doc -->
075: * @generated
076: */
077: public NotificationChain basicSetHTTP(HTTPType newHTTP,
078: NotificationChain msgs) {
079: HTTPType oldHTTP = hTTP;
080: hTTP = newHTTP;
081: if (eNotificationRequired()) {
082: ENotificationImpl notification = new ENotificationImpl(
083: this , Notification.SET, OwsPackage.DCP_TYPE__HTTP,
084: oldHTTP, newHTTP);
085: if (msgs == null)
086: msgs = notification;
087: else
088: msgs.add(notification);
089: }
090: return msgs;
091: }
092:
093: /**
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @generated
097: */
098: public void setHTTP(HTTPType newHTTP) {
099: if (newHTTP != hTTP) {
100: NotificationChain msgs = null;
101: if (hTTP != null)
102: msgs = ((InternalEObject) hTTP)
103: .eInverseRemove(this , EOPPOSITE_FEATURE_BASE
104: - OwsPackage.DCP_TYPE__HTTP, null, msgs);
105: if (newHTTP != null)
106: msgs = ((InternalEObject) newHTTP)
107: .eInverseAdd(this , EOPPOSITE_FEATURE_BASE
108: - OwsPackage.DCP_TYPE__HTTP, null, msgs);
109: msgs = basicSetHTTP(newHTTP, msgs);
110: if (msgs != null)
111: msgs.dispatch();
112: } else if (eNotificationRequired())
113: eNotify(new ENotificationImpl(this , Notification.SET,
114: OwsPackage.DCP_TYPE__HTTP, newHTTP, newHTTP));
115: }
116:
117: /**
118: * <!-- begin-user-doc -->
119: * <!-- end-user-doc -->
120: * @generated
121: */
122: public NotificationChain eInverseRemove(InternalEObject otherEnd,
123: int featureID, NotificationChain msgs) {
124: switch (featureID) {
125: case OwsPackage.DCP_TYPE__HTTP:
126: return basicSetHTTP(null, msgs);
127: }
128: return super .eInverseRemove(otherEnd, featureID, msgs);
129: }
130:
131: /**
132: * <!-- begin-user-doc -->
133: * <!-- end-user-doc -->
134: * @generated
135: */
136: public Object eGet(int featureID, boolean resolve, boolean coreType) {
137: switch (featureID) {
138: case OwsPackage.DCP_TYPE__HTTP:
139: return getHTTP();
140: }
141: return super .eGet(featureID, resolve, coreType);
142: }
143:
144: /**
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @generated
148: */
149: public void eSet(int featureID, Object newValue) {
150: switch (featureID) {
151: case OwsPackage.DCP_TYPE__HTTP:
152: setHTTP((HTTPType) newValue);
153: return;
154: }
155: super .eSet(featureID, newValue);
156: }
157:
158: /**
159: * <!-- begin-user-doc -->
160: * <!-- end-user-doc -->
161: * @generated
162: */
163: public void eUnset(int featureID) {
164: switch (featureID) {
165: case OwsPackage.DCP_TYPE__HTTP:
166: setHTTP((HTTPType) null);
167: return;
168: }
169: super .eUnset(featureID);
170: }
171:
172: /**
173: * <!-- begin-user-doc -->
174: * <!-- end-user-doc -->
175: * @generated
176: */
177: public boolean eIsSet(int featureID) {
178: switch (featureID) {
179: case OwsPackage.DCP_TYPE__HTTP:
180: return hTTP != null;
181: }
182: return super .eIsSet(featureID);
183: }
184:
185: } //DCPTypeImpl
|