001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: OwsFactoryImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import java.util.List;
009:
010: import net.opengis.ows.*;
011:
012: import org.eclipse.emf.ecore.EClass;
013: import org.eclipse.emf.ecore.EDataType;
014: import org.eclipse.emf.ecore.EObject;
015: import org.eclipse.emf.ecore.EPackage;
016:
017: import org.eclipse.emf.ecore.impl.EFactoryImpl;
018:
019: import org.eclipse.emf.ecore.plugin.EcorePlugin;
020:
021: /**
022: * <!-- begin-user-doc -->
023: * An implementation of the model <b>Factory</b>.
024: * <!-- end-user-doc -->
025: * @generated
026: */
027: public class OwsFactoryImpl extends EFactoryImpl implements OwsFactory {
028: /**
029: * Creates the default factory implementation.
030: * <!-- begin-user-doc -->
031: * <!-- end-user-doc -->
032: * @generated
033: */
034: public static OwsFactory init() {
035: try {
036: OwsFactory theOwsFactory = (OwsFactory) EPackage.Registry.INSTANCE
037: .getEFactory("http:///net/opengis/ows.ecore");
038: if (theOwsFactory != null) {
039: return theOwsFactory;
040: }
041: } catch (Exception exception) {
042: EcorePlugin.INSTANCE.log(exception);
043: }
044: return new OwsFactoryImpl();
045: }
046:
047: /**
048: * Creates an instance of the factory.
049: * <!-- begin-user-doc -->
050: * <!-- end-user-doc -->
051: * @generated
052: */
053: public OwsFactoryImpl() {
054: super ();
055: }
056:
057: /**
058: * <!-- begin-user-doc -->
059: * <!-- end-user-doc -->
060: * @generated
061: */
062: public EObject create(EClass eClass) {
063: switch (eClass.getClassifierID()) {
064: case OwsPackage.ACCEPT_FORMATS_TYPE:
065: return createAcceptFormatsType();
066: case OwsPackage.ACCEPT_VERSIONS_TYPE:
067: return createAcceptVersionsType();
068: case OwsPackage.ADDRESS_TYPE:
069: return createAddressType();
070: case OwsPackage.BOUNDING_BOX_TYPE:
071: return createBoundingBoxType();
072: case OwsPackage.CAPABILITIES_BASE_TYPE:
073: return createCapabilitiesBaseType();
074: case OwsPackage.CODE_TYPE:
075: return createCodeType();
076: case OwsPackage.CONTACT_TYPE:
077: return createContactType();
078: case OwsPackage.DCP_TYPE:
079: return createDCPType();
080: case OwsPackage.DESCRIPTION_TYPE:
081: return createDescriptionType();
082: case OwsPackage.DOCUMENT_ROOT:
083: return createDocumentRoot();
084: case OwsPackage.DOMAIN_TYPE:
085: return createDomainType();
086: case OwsPackage.EXCEPTION_REPORT_TYPE:
087: return createExceptionReportType();
088: case OwsPackage.EXCEPTION_TYPE:
089: return createExceptionType();
090: case OwsPackage.GET_CAPABILITIES_TYPE:
091: return createGetCapabilitiesType();
092: case OwsPackage.HTTP_TYPE:
093: return createHTTPType();
094: case OwsPackage.IDENTIFICATION_TYPE:
095: return createIdentificationType();
096: case OwsPackage.KEYWORDS_TYPE:
097: return createKeywordsType();
098: case OwsPackage.METADATA_TYPE:
099: return createMetadataType();
100: case OwsPackage.ONLINE_RESOURCE_TYPE:
101: return createOnlineResourceType();
102: case OwsPackage.OPERATION_TYPE:
103: return createOperationType();
104: case OwsPackage.OPERATIONS_METADATA_TYPE:
105: return createOperationsMetadataType();
106: case OwsPackage.REQUEST_METHOD_TYPE:
107: return createRequestMethodType();
108: case OwsPackage.RESPONSIBLE_PARTY_SUBSET_TYPE:
109: return createResponsiblePartySubsetType();
110: case OwsPackage.RESPONSIBLE_PARTY_TYPE:
111: return createResponsiblePartyType();
112: case OwsPackage.SECTIONS_TYPE:
113: return createSectionsType();
114: case OwsPackage.SERVICE_IDENTIFICATION_TYPE:
115: return createServiceIdentificationType();
116: case OwsPackage.SERVICE_PROVIDER_TYPE:
117: return createServiceProviderType();
118: case OwsPackage.TELEPHONE_TYPE:
119: return createTelephoneType();
120: case OwsPackage.WGS84_BOUNDING_BOX_TYPE:
121: return createWGS84BoundingBoxType();
122: default:
123: throw new IllegalArgumentException("The class '"
124: + eClass.getName() + "' is not a valid classifier");
125: }
126: }
127:
128: /**
129: * <!-- begin-user-doc -->
130: * <!-- end-user-doc -->
131: * @generated
132: */
133: public Object createFromString(EDataType eDataType,
134: String initialValue) {
135: switch (eDataType.getClassifierID()) {
136: case OwsPackage.MIME_TYPE:
137: return createMimeTypeFromString(eDataType, initialValue);
138: case OwsPackage.VERSION_TYPE:
139: return createVersionTypeFromString(eDataType, initialValue);
140: case OwsPackage.POSITION_TYPE:
141: return createPositionTypeFromString(eDataType, initialValue);
142: case OwsPackage.UPDATE_SEQUENCE_TYPE:
143: return createUpdateSequenceTypeFromString(eDataType,
144: initialValue);
145: default:
146: throw new IllegalArgumentException("The datatype '"
147: + eDataType.getName()
148: + "' is not a valid classifier");
149: }
150: }
151:
152: /**
153: * <!-- begin-user-doc -->
154: * <!-- end-user-doc -->
155: * @generated
156: */
157: public String convertToString(EDataType eDataType,
158: Object instanceValue) {
159: switch (eDataType.getClassifierID()) {
160: case OwsPackage.MIME_TYPE:
161: return convertMimeTypeToString(eDataType, instanceValue);
162: case OwsPackage.VERSION_TYPE:
163: return convertVersionTypeToString(eDataType, instanceValue);
164: case OwsPackage.POSITION_TYPE:
165: return convertPositionTypeToString(eDataType, instanceValue);
166: case OwsPackage.UPDATE_SEQUENCE_TYPE:
167: return convertUpdateSequenceTypeToString(eDataType,
168: instanceValue);
169: default:
170: throw new IllegalArgumentException("The datatype '"
171: + eDataType.getName()
172: + "' is not a valid classifier");
173: }
174: }
175:
176: /**
177: * <!-- begin-user-doc -->
178: * <!-- end-user-doc -->
179: * @generated
180: */
181: public AcceptFormatsType createAcceptFormatsType() {
182: AcceptFormatsTypeImpl acceptFormatsType = new AcceptFormatsTypeImpl();
183: return acceptFormatsType;
184: }
185:
186: /**
187: * <!-- begin-user-doc -->
188: * <!-- end-user-doc -->
189: * @generated
190: */
191: public AcceptVersionsType createAcceptVersionsType() {
192: AcceptVersionsTypeImpl acceptVersionsType = new AcceptVersionsTypeImpl();
193: return acceptVersionsType;
194: }
195:
196: /**
197: * <!-- begin-user-doc -->
198: * <!-- end-user-doc -->
199: * @generated
200: */
201: public AddressType createAddressType() {
202: AddressTypeImpl addressType = new AddressTypeImpl();
203: return addressType;
204: }
205:
206: /**
207: * <!-- begin-user-doc -->
208: * <!-- end-user-doc -->
209: * @generated
210: */
211: public BoundingBoxType createBoundingBoxType() {
212: BoundingBoxTypeImpl boundingBoxType = new BoundingBoxTypeImpl();
213: return boundingBoxType;
214: }
215:
216: /**
217: * <!-- begin-user-doc -->
218: * <!-- end-user-doc -->
219: * @generated
220: */
221: public CapabilitiesBaseType createCapabilitiesBaseType() {
222: CapabilitiesBaseTypeImpl capabilitiesBaseType = new CapabilitiesBaseTypeImpl();
223: return capabilitiesBaseType;
224: }
225:
226: /**
227: * <!-- begin-user-doc -->
228: * <!-- end-user-doc -->
229: * @generated
230: */
231: public CodeType createCodeType() {
232: CodeTypeImpl codeType = new CodeTypeImpl();
233: return codeType;
234: }
235:
236: /**
237: * <!-- begin-user-doc -->
238: * <!-- end-user-doc -->
239: * @generated
240: */
241: public ContactType createContactType() {
242: ContactTypeImpl contactType = new ContactTypeImpl();
243: return contactType;
244: }
245:
246: /**
247: * <!-- begin-user-doc -->
248: * <!-- end-user-doc -->
249: * @generated
250: */
251: public DCPType createDCPType() {
252: DCPTypeImpl dcpType = new DCPTypeImpl();
253: return dcpType;
254: }
255:
256: /**
257: * <!-- begin-user-doc -->
258: * <!-- end-user-doc -->
259: * @generated
260: */
261: public DescriptionType createDescriptionType() {
262: DescriptionTypeImpl descriptionType = new DescriptionTypeImpl();
263: return descriptionType;
264: }
265:
266: /**
267: * <!-- begin-user-doc -->
268: * <!-- end-user-doc -->
269: * @generated
270: */
271: public DocumentRoot createDocumentRoot() {
272: DocumentRootImpl documentRoot = new DocumentRootImpl();
273: return documentRoot;
274: }
275:
276: /**
277: * <!-- begin-user-doc -->
278: * <!-- end-user-doc -->
279: * @generated
280: */
281: public DomainType createDomainType() {
282: DomainTypeImpl domainType = new DomainTypeImpl();
283: return domainType;
284: }
285:
286: /**
287: * <!-- begin-user-doc -->
288: * <!-- end-user-doc -->
289: * @generated
290: */
291: public ExceptionReportType createExceptionReportType() {
292: ExceptionReportTypeImpl exceptionReportType = new ExceptionReportTypeImpl();
293: return exceptionReportType;
294: }
295:
296: /**
297: * <!-- begin-user-doc -->
298: * <!-- end-user-doc -->
299: * @generated
300: */
301: public ExceptionType createExceptionType() {
302: ExceptionTypeImpl exceptionType = new ExceptionTypeImpl();
303: return exceptionType;
304: }
305:
306: /**
307: * <!-- begin-user-doc -->
308: * <!-- end-user-doc -->
309: * @generated
310: */
311: public GetCapabilitiesType createGetCapabilitiesType() {
312: GetCapabilitiesTypeImpl getCapabilitiesType = new GetCapabilitiesTypeImpl();
313: return getCapabilitiesType;
314: }
315:
316: /**
317: * <!-- begin-user-doc -->
318: * <!-- end-user-doc -->
319: * @generated
320: */
321: public HTTPType createHTTPType() {
322: HTTPTypeImpl httpType = new HTTPTypeImpl();
323: return httpType;
324: }
325:
326: /**
327: * <!-- begin-user-doc -->
328: * <!-- end-user-doc -->
329: * @generated
330: */
331: public IdentificationType createIdentificationType() {
332: IdentificationTypeImpl identificationType = new IdentificationTypeImpl();
333: return identificationType;
334: }
335:
336: /**
337: * <!-- begin-user-doc -->
338: * <!-- end-user-doc -->
339: * @generated
340: */
341: public KeywordsType createKeywordsType() {
342: KeywordsTypeImpl keywordsType = new KeywordsTypeImpl();
343: return keywordsType;
344: }
345:
346: /**
347: * <!-- begin-user-doc -->
348: * <!-- end-user-doc -->
349: * @generated
350: */
351: public MetadataType createMetadataType() {
352: MetadataTypeImpl metadataType = new MetadataTypeImpl();
353: return metadataType;
354: }
355:
356: /**
357: * <!-- begin-user-doc -->
358: * <!-- end-user-doc -->
359: * @generated
360: */
361: public OnlineResourceType createOnlineResourceType() {
362: OnlineResourceTypeImpl onlineResourceType = new OnlineResourceTypeImpl();
363: return onlineResourceType;
364: }
365:
366: /**
367: * <!-- begin-user-doc -->
368: * <!-- end-user-doc -->
369: * @generated
370: */
371: public OperationType createOperationType() {
372: OperationTypeImpl operationType = new OperationTypeImpl();
373: return operationType;
374: }
375:
376: /**
377: * <!-- begin-user-doc -->
378: * <!-- end-user-doc -->
379: * @generated
380: */
381: public OperationsMetadataType createOperationsMetadataType() {
382: OperationsMetadataTypeImpl operationsMetadataType = new OperationsMetadataTypeImpl();
383: return operationsMetadataType;
384: }
385:
386: /**
387: * <!-- begin-user-doc -->
388: * <!-- end-user-doc -->
389: * @generated
390: */
391: public RequestMethodType createRequestMethodType() {
392: RequestMethodTypeImpl requestMethodType = new RequestMethodTypeImpl();
393: return requestMethodType;
394: }
395:
396: /**
397: * <!-- begin-user-doc -->
398: * <!-- end-user-doc -->
399: * @generated
400: */
401: public ResponsiblePartySubsetType createResponsiblePartySubsetType() {
402: ResponsiblePartySubsetTypeImpl responsiblePartySubsetType = new ResponsiblePartySubsetTypeImpl();
403: return responsiblePartySubsetType;
404: }
405:
406: /**
407: * <!-- begin-user-doc -->
408: * <!-- end-user-doc -->
409: * @generated
410: */
411: public ResponsiblePartyType createResponsiblePartyType() {
412: ResponsiblePartyTypeImpl responsiblePartyType = new ResponsiblePartyTypeImpl();
413: return responsiblePartyType;
414: }
415:
416: /**
417: * <!-- begin-user-doc -->
418: * <!-- end-user-doc -->
419: * @generated
420: */
421: public SectionsType createSectionsType() {
422: SectionsTypeImpl sectionsType = new SectionsTypeImpl();
423: return sectionsType;
424: }
425:
426: /**
427: * <!-- begin-user-doc -->
428: * <!-- end-user-doc -->
429: * @generated
430: */
431: public ServiceIdentificationType createServiceIdentificationType() {
432: ServiceIdentificationTypeImpl serviceIdentificationType = new ServiceIdentificationTypeImpl();
433: return serviceIdentificationType;
434: }
435:
436: /**
437: * <!-- begin-user-doc -->
438: * <!-- end-user-doc -->
439: * @generated
440: */
441: public ServiceProviderType createServiceProviderType() {
442: ServiceProviderTypeImpl serviceProviderType = new ServiceProviderTypeImpl();
443: return serviceProviderType;
444: }
445:
446: /**
447: * <!-- begin-user-doc -->
448: * <!-- end-user-doc -->
449: * @generated
450: */
451: public TelephoneType createTelephoneType() {
452: TelephoneTypeImpl telephoneType = new TelephoneTypeImpl();
453: return telephoneType;
454: }
455:
456: /**
457: * <!-- begin-user-doc -->
458: * <!-- end-user-doc -->
459: * @generated
460: */
461: public WGS84BoundingBoxType createWGS84BoundingBoxType() {
462: WGS84BoundingBoxTypeImpl wgs84BoundingBoxType = new WGS84BoundingBoxTypeImpl();
463: return wgs84BoundingBoxType;
464: }
465:
466: /**
467: * <!-- begin-user-doc -->
468: * <!-- end-user-doc -->
469: * @generated
470: */
471: public String createMimeTypeFromString(EDataType eDataType,
472: String initialValue) {
473: return (String) super .createFromString(eDataType, initialValue);
474: }
475:
476: /**
477: * <!-- begin-user-doc -->
478: * <!-- end-user-doc -->
479: * @generated
480: */
481: public String convertMimeTypeToString(EDataType eDataType,
482: Object instanceValue) {
483: return super .convertToString(eDataType, instanceValue);
484: }
485:
486: /**
487: * <!-- begin-user-doc -->
488: * <!-- end-user-doc -->
489: * @generated
490: */
491: public String createVersionTypeFromString(EDataType eDataType,
492: String initialValue) {
493: return (String) super .createFromString(eDataType, initialValue);
494: }
495:
496: /**
497: * <!-- begin-user-doc -->
498: * <!-- end-user-doc -->
499: * @generated
500: */
501: public String convertVersionTypeToString(EDataType eDataType,
502: Object instanceValue) {
503: return super .convertToString(eDataType, instanceValue);
504: }
505:
506: /**
507: * <!-- begin-user-doc -->
508: * <!-- end-user-doc -->
509: * @generated
510: */
511: public List createPositionTypeFromString(EDataType eDataType,
512: String initialValue) {
513: return (List) super .createFromString(eDataType, initialValue);
514: }
515:
516: /**
517: * <!-- begin-user-doc -->
518: * <!-- end-user-doc -->
519: * @generated
520: */
521: public String convertPositionTypeToString(EDataType eDataType,
522: Object instanceValue) {
523: return super .convertToString(eDataType, instanceValue);
524: }
525:
526: /**
527: * <!-- begin-user-doc -->
528: * <!-- end-user-doc -->
529: * @generated
530: */
531: public String createUpdateSequenceTypeFromString(
532: EDataType eDataType, String initialValue) {
533: return (String) super .createFromString(eDataType, initialValue);
534: }
535:
536: /**
537: * <!-- begin-user-doc -->
538: * <!-- end-user-doc -->
539: * @generated
540: */
541: public String convertUpdateSequenceTypeToString(
542: EDataType eDataType, Object instanceValue) {
543: return super .convertToString(eDataType, instanceValue);
544: }
545:
546: /**
547: * <!-- begin-user-doc -->
548: * <!-- end-user-doc -->
549: * @generated
550: */
551: public OwsPackage getOwsPackage() {
552: return (OwsPackage) getEPackage();
553: }
554:
555: /**
556: * <!-- begin-user-doc -->
557: * <!-- end-user-doc -->
558: * @deprecated
559: * @generated
560: */
561: public static OwsPackage getPackage() {
562: return OwsPackage.eINSTANCE;
563: }
564:
565: } //OwsFactoryImpl
|