001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: GetLogTypeImpl.java 7988 2007-12-12 20:29:15Z aaime $
006: */package net.opengis.wfsv.impl;
007:
008: import java.math.BigInteger;
009:
010: import java.util.Collection;
011:
012: import net.opengis.wfs.ResultTypeType;
013:
014: import net.opengis.wfs.impl.BaseRequestTypeImpl;
015:
016: import net.opengis.wfsv.DifferenceQueryType;
017: import net.opengis.wfsv.GetLogType;
018: import net.opengis.wfsv.WfsvPackage;
019:
020: import org.eclipse.emf.common.notify.Notification;
021: import org.eclipse.emf.common.notify.NotificationChain;
022:
023: import org.eclipse.emf.common.util.EList;
024:
025: import org.eclipse.emf.ecore.EClass;
026: import org.eclipse.emf.ecore.InternalEObject;
027:
028: import org.eclipse.emf.ecore.impl.ENotificationImpl;
029:
030: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
031: import org.eclipse.emf.ecore.util.InternalEList;
032:
033: /**
034: * <!-- begin-user-doc -->
035: * An implementation of the model object '<em><b>Get Log Type</b></em>'.
036: * <!-- end-user-doc -->
037: * <p>
038: * The following features are implemented:
039: * <ul>
040: * <li>{@link net.opengis.wfsv.impl.GetLogTypeImpl#getDifferenceQuery <em>Difference Query</em>}</li>
041: * <li>{@link net.opengis.wfsv.impl.GetLogTypeImpl#getMaxFeatures <em>Max Features</em>}</li>
042: * <li>{@link net.opengis.wfsv.impl.GetLogTypeImpl#getOutputFormat <em>Output Format</em>}</li>
043: * <li>{@link net.opengis.wfsv.impl.GetLogTypeImpl#getResultType <em>Result Type</em>}</li>
044: * </ul>
045: * </p>
046: *
047: * @generated
048: */
049: public class GetLogTypeImpl extends BaseRequestTypeImpl implements
050: GetLogType {
051: /**
052: * The cached value of the '{@link #getDifferenceQuery() <em>Difference Query</em>}' containment reference list.
053: * <!-- begin-user-doc -->
054: * <!-- end-user-doc -->
055: * @see #getDifferenceQuery()
056: * @generated
057: * @ordered
058: */
059: protected EList differenceQuery;
060:
061: /**
062: * The default value of the '{@link #getMaxFeatures() <em>Max Features</em>}' attribute.
063: * <!-- begin-user-doc -->
064: * <!-- end-user-doc -->
065: * @see #getMaxFeatures()
066: * @generated
067: * @ordered
068: */
069: protected static final BigInteger MAX_FEATURES_EDEFAULT = null;
070:
071: /**
072: * The cached value of the '{@link #getMaxFeatures() <em>Max Features</em>}' attribute.
073: * <!-- begin-user-doc -->
074: * <!-- end-user-doc -->
075: * @see #getMaxFeatures()
076: * @generated
077: * @ordered
078: */
079: protected BigInteger maxFeatures = MAX_FEATURES_EDEFAULT;
080:
081: /**
082: * The default value of the '{@link #getOutputFormat() <em>Output Format</em>}' attribute.
083: * <!-- begin-user-doc -->
084: * <!-- end-user-doc -->
085: * @see #getOutputFormat()
086: * @generated
087: * @ordered
088: */
089: protected static final String OUTPUT_FORMAT_EDEFAULT = "text/xml; subtype=gml/3.1.1";
090:
091: /**
092: * The cached value of the '{@link #getOutputFormat() <em>Output Format</em>}' attribute.
093: * <!-- begin-user-doc -->
094: * <!-- end-user-doc -->
095: * @see #getOutputFormat()
096: * @generated
097: * @ordered
098: */
099: protected String outputFormat = OUTPUT_FORMAT_EDEFAULT;
100:
101: /**
102: * This is true if the Output Format attribute has been set.
103: * <!-- begin-user-doc -->
104: * <!-- end-user-doc -->
105: * @generated
106: * @ordered
107: */
108: protected boolean outputFormatESet;
109:
110: /**
111: * The default value of the '{@link #getResultType() <em>Result Type</em>}' attribute.
112: * <!-- begin-user-doc -->
113: * <!-- end-user-doc -->
114: * @see #getResultType()
115: * @generated
116: * @ordered
117: */
118: protected static final ResultTypeType RESULT_TYPE_EDEFAULT = ResultTypeType.RESULTS_LITERAL;
119:
120: /**
121: * The cached value of the '{@link #getResultType() <em>Result Type</em>}' attribute.
122: * <!-- begin-user-doc -->
123: * <!-- end-user-doc -->
124: * @see #getResultType()
125: * @generated
126: * @ordered
127: */
128: protected ResultTypeType resultType = RESULT_TYPE_EDEFAULT;
129:
130: /**
131: * This is true if the Result Type attribute has been set.
132: * <!-- begin-user-doc -->
133: * <!-- end-user-doc -->
134: * @generated
135: * @ordered
136: */
137: protected boolean resultTypeESet;
138:
139: /**
140: * <!-- begin-user-doc -->
141: * <!-- end-user-doc -->
142: * @generated
143: */
144: protected GetLogTypeImpl() {
145: super ();
146: }
147:
148: /**
149: * <!-- begin-user-doc -->
150: * <!-- end-user-doc -->
151: * @generated
152: */
153: protected EClass eStaticClass() {
154: return WfsvPackage.Literals.GET_LOG_TYPE;
155: }
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: public EList getDifferenceQuery() {
163: if (differenceQuery == null) {
164: differenceQuery = new EObjectContainmentEList(
165: DifferenceQueryType.class, this ,
166: WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY);
167: }
168: return differenceQuery;
169: }
170:
171: /**
172: * <!-- begin-user-doc -->
173: * <!-- end-user-doc -->
174: * @generated
175: */
176: public BigInteger getMaxFeatures() {
177: return maxFeatures;
178: }
179:
180: /**
181: * <!-- begin-user-doc -->
182: * <!-- end-user-doc -->
183: * @generated
184: */
185: public void setMaxFeatures(BigInteger newMaxFeatures) {
186: BigInteger oldMaxFeatures = maxFeatures;
187: maxFeatures = newMaxFeatures;
188: if (eNotificationRequired())
189: eNotify(new ENotificationImpl(this , Notification.SET,
190: WfsvPackage.GET_LOG_TYPE__MAX_FEATURES,
191: oldMaxFeatures, maxFeatures));
192: }
193:
194: /**
195: * <!-- begin-user-doc -->
196: * <!-- end-user-doc -->
197: * @generated
198: */
199: public String getOutputFormat() {
200: return outputFormat;
201: }
202:
203: /**
204: * <!-- begin-user-doc -->
205: * <!-- end-user-doc -->
206: * @generated
207: */
208: public void setOutputFormat(String newOutputFormat) {
209: String oldOutputFormat = outputFormat;
210: outputFormat = newOutputFormat;
211: boolean oldOutputFormatESet = outputFormatESet;
212: outputFormatESet = true;
213: if (eNotificationRequired())
214: eNotify(new ENotificationImpl(this , Notification.SET,
215: WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT,
216: oldOutputFormat, outputFormat, !oldOutputFormatESet));
217: }
218:
219: /**
220: * <!-- begin-user-doc -->
221: * <!-- end-user-doc -->
222: * @generated
223: */
224: public void unsetOutputFormat() {
225: String oldOutputFormat = outputFormat;
226: boolean oldOutputFormatESet = outputFormatESet;
227: outputFormat = OUTPUT_FORMAT_EDEFAULT;
228: outputFormatESet = false;
229: if (eNotificationRequired())
230: eNotify(new ENotificationImpl(this , Notification.UNSET,
231: WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT,
232: oldOutputFormat, OUTPUT_FORMAT_EDEFAULT,
233: oldOutputFormatESet));
234: }
235:
236: /**
237: * <!-- begin-user-doc -->
238: * <!-- end-user-doc -->
239: * @generated
240: */
241: public boolean isSetOutputFormat() {
242: return outputFormatESet;
243: }
244:
245: /**
246: * <!-- begin-user-doc -->
247: * <!-- end-user-doc -->
248: * @generated
249: */
250: public ResultTypeType getResultType() {
251: return resultType;
252: }
253:
254: /**
255: * <!-- begin-user-doc -->
256: * <!-- end-user-doc -->
257: * @generated
258: */
259: public void setResultType(ResultTypeType newResultType) {
260: ResultTypeType oldResultType = resultType;
261: resultType = newResultType == null ? RESULT_TYPE_EDEFAULT
262: : newResultType;
263: boolean oldResultTypeESet = resultTypeESet;
264: resultTypeESet = true;
265: if (eNotificationRequired())
266: eNotify(new ENotificationImpl(this , Notification.SET,
267: WfsvPackage.GET_LOG_TYPE__RESULT_TYPE,
268: oldResultType, resultType, !oldResultTypeESet));
269: }
270:
271: /**
272: * <!-- begin-user-doc -->
273: * <!-- end-user-doc -->
274: * @generated
275: */
276: public void unsetResultType() {
277: ResultTypeType oldResultType = resultType;
278: boolean oldResultTypeESet = resultTypeESet;
279: resultType = RESULT_TYPE_EDEFAULT;
280: resultTypeESet = false;
281: if (eNotificationRequired())
282: eNotify(new ENotificationImpl(this , Notification.UNSET,
283: WfsvPackage.GET_LOG_TYPE__RESULT_TYPE,
284: oldResultType, RESULT_TYPE_EDEFAULT,
285: oldResultTypeESet));
286: }
287:
288: /**
289: * <!-- begin-user-doc -->
290: * <!-- end-user-doc -->
291: * @generated
292: */
293: public boolean isSetResultType() {
294: return resultTypeESet;
295: }
296:
297: /**
298: * <!-- begin-user-doc -->
299: * <!-- end-user-doc -->
300: * @generated
301: */
302: public NotificationChain eInverseRemove(InternalEObject otherEnd,
303: int featureID, NotificationChain msgs) {
304: switch (featureID) {
305: case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
306: return ((InternalEList) getDifferenceQuery()).basicRemove(
307: otherEnd, msgs);
308: }
309: return super .eInverseRemove(otherEnd, featureID, msgs);
310: }
311:
312: /**
313: * <!-- begin-user-doc -->
314: * <!-- end-user-doc -->
315: * @generated
316: */
317: public Object eGet(int featureID, boolean resolve, boolean coreType) {
318: switch (featureID) {
319: case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
320: return getDifferenceQuery();
321: case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
322: return getMaxFeatures();
323: case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
324: return getOutputFormat();
325: case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
326: return getResultType();
327: }
328: return super .eGet(featureID, resolve, coreType);
329: }
330:
331: /**
332: * <!-- begin-user-doc -->
333: * <!-- end-user-doc -->
334: * @generated
335: */
336: public void eSet(int featureID, Object newValue) {
337: switch (featureID) {
338: case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
339: getDifferenceQuery().clear();
340: getDifferenceQuery().addAll((Collection) newValue);
341: return;
342: case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
343: setMaxFeatures((BigInteger) newValue);
344: return;
345: case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
346: setOutputFormat((String) newValue);
347: return;
348: case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
349: setResultType((ResultTypeType) newValue);
350: return;
351: }
352: super .eSet(featureID, newValue);
353: }
354:
355: /**
356: * <!-- begin-user-doc -->
357: * <!-- end-user-doc -->
358: * @generated
359: */
360: public void eUnset(int featureID) {
361: switch (featureID) {
362: case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
363: getDifferenceQuery().clear();
364: return;
365: case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
366: setMaxFeatures(MAX_FEATURES_EDEFAULT);
367: return;
368: case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
369: unsetOutputFormat();
370: return;
371: case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
372: unsetResultType();
373: return;
374: }
375: super .eUnset(featureID);
376: }
377:
378: /**
379: * <!-- begin-user-doc -->
380: * <!-- end-user-doc -->
381: * @generated
382: */
383: public boolean eIsSet(int featureID) {
384: switch (featureID) {
385: case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
386: return differenceQuery != null
387: && !differenceQuery.isEmpty();
388: case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
389: return MAX_FEATURES_EDEFAULT == null ? maxFeatures != null
390: : !MAX_FEATURES_EDEFAULT.equals(maxFeatures);
391: case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
392: return isSetOutputFormat();
393: case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
394: return isSetResultType();
395: }
396: return super .eIsSet(featureID);
397: }
398:
399: /**
400: * <!-- begin-user-doc -->
401: * <!-- end-user-doc -->
402: * @generated
403: */
404: public String toString() {
405: if (eIsProxy())
406: return super .toString();
407:
408: StringBuffer result = new StringBuffer(super .toString());
409: result.append(" (maxFeatures: ");
410: result.append(maxFeatures);
411: result.append(", outputFormat: ");
412: if (outputFormatESet)
413: result.append(outputFormat);
414: else
415: result.append("<unset>");
416: result.append(", resultType: ");
417: if (resultTypeESet)
418: result.append(resultType);
419: else
420: result.append("<unset>");
421: result.append(')');
422: return result.toString();
423: }
424:
425: } //GetLogTypeImpl
|