001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: ActionTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs.impl;
007:
008: import net.opengis.wfs.ActionType;
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: import org.eclipse.emf.ecore.impl.EObjectImpl;
017:
018: /**
019: * <!-- begin-user-doc -->
020: * An implementation of the model object '<em><b>Action Type</b></em>'.
021: * <!-- end-user-doc -->
022: * <p>
023: * The following features are implemented:
024: * <ul>
025: * <li>{@link net.opengis.wfs.impl.ActionTypeImpl#getMessage <em>Message</em>}</li>
026: * <li>{@link net.opengis.wfs.impl.ActionTypeImpl#getCode <em>Code</em>}</li>
027: * <li>{@link net.opengis.wfs.impl.ActionTypeImpl#getLocator <em>Locator</em>}</li>
028: * </ul>
029: * </p>
030: *
031: * @generated
032: */
033: public class ActionTypeImpl extends EObjectImpl implements ActionType {
034: /**
035: * The default value of the '{@link #getMessage() <em>Message</em>}' attribute.
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @see #getMessage()
039: * @generated
040: * @ordered
041: */
042: protected static final String MESSAGE_EDEFAULT = null;
043:
044: /**
045: * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute.
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @see #getMessage()
049: * @generated
050: * @ordered
051: */
052: protected String message = MESSAGE_EDEFAULT;
053:
054: /**
055: * The default value of the '{@link #getCode() <em>Code</em>}' attribute.
056: * <!-- begin-user-doc -->
057: * <!-- end-user-doc -->
058: * @see #getCode()
059: * @generated
060: * @ordered
061: */
062: protected static final String CODE_EDEFAULT = null;
063:
064: /**
065: * The cached value of the '{@link #getCode() <em>Code</em>}' attribute.
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @see #getCode()
069: * @generated
070: * @ordered
071: */
072: protected String code = CODE_EDEFAULT;
073:
074: /**
075: * The default value of the '{@link #getLocator() <em>Locator</em>}' attribute.
076: * <!-- begin-user-doc -->
077: * <!-- end-user-doc -->
078: * @see #getLocator()
079: * @generated
080: * @ordered
081: */
082: protected static final String LOCATOR_EDEFAULT = null;
083:
084: /**
085: * The cached value of the '{@link #getLocator() <em>Locator</em>}' attribute.
086: * <!-- begin-user-doc -->
087: * <!-- end-user-doc -->
088: * @see #getLocator()
089: * @generated
090: * @ordered
091: */
092: protected String locator = LOCATOR_EDEFAULT;
093:
094: /**
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @generated
098: */
099: protected ActionTypeImpl() {
100: super ();
101: }
102:
103: /**
104: * <!-- begin-user-doc -->
105: * <!-- end-user-doc -->
106: * @generated
107: */
108: protected EClass eStaticClass() {
109: return WfsPackage.Literals.ACTION_TYPE;
110: }
111:
112: /**
113: * <!-- begin-user-doc -->
114: * <!-- end-user-doc -->
115: * @generated
116: */
117: public String getMessage() {
118: return message;
119: }
120:
121: /**
122: * <!-- begin-user-doc -->
123: * <!-- end-user-doc -->
124: * @generated
125: */
126: public void setMessage(String newMessage) {
127: String oldMessage = message;
128: message = newMessage;
129: if (eNotificationRequired())
130: eNotify(new ENotificationImpl(this , Notification.SET,
131: WfsPackage.ACTION_TYPE__MESSAGE, oldMessage,
132: message));
133: }
134:
135: /**
136: * <!-- begin-user-doc -->
137: * <!-- end-user-doc -->
138: * @generated
139: */
140: public String getCode() {
141: return code;
142: }
143:
144: /**
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @generated
148: */
149: public void setCode(String newCode) {
150: String oldCode = code;
151: code = newCode;
152: if (eNotificationRequired())
153: eNotify(new ENotificationImpl(this , Notification.SET,
154: WfsPackage.ACTION_TYPE__CODE, oldCode, code));
155: }
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: public String getLocator() {
163: return locator;
164: }
165:
166: /**
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @generated
170: */
171: public void setLocator(String newLocator) {
172: String oldLocator = locator;
173: locator = newLocator;
174: if (eNotificationRequired())
175: eNotify(new ENotificationImpl(this , Notification.SET,
176: WfsPackage.ACTION_TYPE__LOCATOR, oldLocator,
177: locator));
178: }
179:
180: /**
181: * <!-- begin-user-doc -->
182: * <!-- end-user-doc -->
183: * @generated
184: */
185: public Object eGet(int featureID, boolean resolve, boolean coreType) {
186: switch (featureID) {
187: case WfsPackage.ACTION_TYPE__MESSAGE:
188: return getMessage();
189: case WfsPackage.ACTION_TYPE__CODE:
190: return getCode();
191: case WfsPackage.ACTION_TYPE__LOCATOR:
192: return getLocator();
193: }
194: return super .eGet(featureID, resolve, coreType);
195: }
196:
197: /**
198: * <!-- begin-user-doc -->
199: * <!-- end-user-doc -->
200: * @generated
201: */
202: public void eSet(int featureID, Object newValue) {
203: switch (featureID) {
204: case WfsPackage.ACTION_TYPE__MESSAGE:
205: setMessage((String) newValue);
206: return;
207: case WfsPackage.ACTION_TYPE__CODE:
208: setCode((String) newValue);
209: return;
210: case WfsPackage.ACTION_TYPE__LOCATOR:
211: setLocator((String) newValue);
212: return;
213: }
214: super .eSet(featureID, newValue);
215: }
216:
217: /**
218: * <!-- begin-user-doc -->
219: * <!-- end-user-doc -->
220: * @generated
221: */
222: public void eUnset(int featureID) {
223: switch (featureID) {
224: case WfsPackage.ACTION_TYPE__MESSAGE:
225: setMessage(MESSAGE_EDEFAULT);
226: return;
227: case WfsPackage.ACTION_TYPE__CODE:
228: setCode(CODE_EDEFAULT);
229: return;
230: case WfsPackage.ACTION_TYPE__LOCATOR:
231: setLocator(LOCATOR_EDEFAULT);
232: return;
233: }
234: super .eUnset(featureID);
235: }
236:
237: /**
238: * <!-- begin-user-doc -->
239: * <!-- end-user-doc -->
240: * @generated
241: */
242: public boolean eIsSet(int featureID) {
243: switch (featureID) {
244: case WfsPackage.ACTION_TYPE__MESSAGE:
245: return MESSAGE_EDEFAULT == null ? message != null
246: : !MESSAGE_EDEFAULT.equals(message);
247: case WfsPackage.ACTION_TYPE__CODE:
248: return CODE_EDEFAULT == null ? code != null
249: : !CODE_EDEFAULT.equals(code);
250: case WfsPackage.ACTION_TYPE__LOCATOR:
251: return LOCATOR_EDEFAULT == null ? locator != null
252: : !LOCATOR_EDEFAULT.equals(locator);
253: }
254: return super .eIsSet(featureID);
255: }
256:
257: /**
258: * <!-- begin-user-doc -->
259: * <!-- end-user-doc -->
260: * @generated
261: */
262: public String toString() {
263: if (eIsProxy())
264: return super .toString();
265:
266: StringBuffer result = new StringBuffer(super .toString());
267: result.append(" (message: ");
268: result.append(message);
269: result.append(", code: ");
270: result.append(code);
271: result.append(", locator: ");
272: result.append(locator);
273: result.append(')');
274: return result.toString();
275: }
276:
277: } //ActionTypeImpl
|