001: //=============================================================================
002: //=== Copyright (C) 2001-2007 Food and Agriculture Organization of the
003: //=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
004: //=== and United Nations Environment Programme (UNEP)
005: //===
006: //=== This program is free software; you can redistribute it and/or modify
007: //=== it under the terms of the GNU General Public License as published by
008: //=== the Free Software Foundation; either version 2 of the License, or (at
009: //=== your option) any later version.
010: //===
011: //=== This program is distributed in the hope that it will be useful, but
012: //=== WITHOUT ANY WARRANTY; without even the implied warranty of
013: //=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: //=== General Public License for more details.
015: //===
016: //=== You should have received a copy of the GNU General Public License
017: //=== along with this program; if not, write to the Free Software
018: //=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
019: //===
020: //=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
021: //=== Rome - Italy. email: geonetwork@osgeo.org
022: //==============================================================================
023:
024: package org.wfp.vam.intermap.kernel.map.mapServices.wms.schema.impl;
025:
026: import org.wfp.vam.intermap.kernel.map.mapServices.wms.schema.type.*;
027:
028: import org.jdom.Element;
029: import org.jdom.JDOMException;
030:
031: /**
032: * @author ETj
033: */
034: public class WMSFactory {
035:
036: /**
037: * Method parseDimension
038: */
039: public static WMSDimension parseDimension(Element edim) {
040: return WMSDimensionImpl.parse(edim);
041: }
042:
043: /**
044: * Method parseDCPType
045: */
046: public static WMSDCPType parseDCPType(Element eDCP) {
047: return WMSDCPTypeImpl.parse(eDCP);
048: }
049:
050: /**
051: * Method parseOperationType
052: */
053: public static WMSOperationType parseOperationType(Element eOpType) {
054: return WMSOperationTypeImpl.parse(eOpType);
055: }
056:
057: /**
058: * Method parseRequest
059: */
060: public static WMSRequest parseRequest(Element eRequest) {
061: return WMSRequestImpl.parse(eRequest);
062: }
063:
064: /**
065: * Method parseMetadataURL
066: */
067: public static WMSMetadataURL parseMetadataURL(Element emdu) {
068: return WMSMetadataURLImpl.parse(emdu);
069: }
070:
071: /**
072: * Method parseBoundingBox
073: */
074: public static WMSBoundingBox parseBoundingBox(Element ebb) {
075: return WMSBoundingBoxImpl.parse(ebb);
076: }
077:
078: /**
079: * Method parseGeoBBox111
080: */
081: public static WMSEX_GeographicBoundingBox parseGeoBBox111(
082: Element egbb) {
083: return WMSEX_GeographicBoundingBoxImpl.parse111(egbb);
084: }
085:
086: /**
087: * Method parseGeoBBox
088: */
089: public static WMSEX_GeographicBoundingBox parseGeoBBox(Element egbb) {
090: return WMSEX_GeographicBoundingBoxImpl.parse(egbb);
091: }
092:
093: /**
094: * Method parseCapability
095: */
096: public static WMSCapability parseCapability(Element capability) {
097: return WMSCapabilityImpl.parse(capability);
098: }
099:
100: /**
101: * Method parseCapabilities
102: */
103: public static WMSCapabilities parseCapabilities(Element capabilities) {
104: try {
105: return WMSCapabilitiesImpl.parse(capabilities);
106: } catch (JDOMException e) {
107: System.out.println(e);
108: return null;
109: }
110: }
111:
112: /**
113: * Method parseLegendURL
114: */
115: public static WMSLegendURL parseLegendURL(Element eLegendUrl) {
116: return WMSLegendURLImpl.parse(eLegendUrl);
117: }
118:
119: /**
120: * Method parseStyle
121: * @return a WMSStyle
122: */
123: public static WMSStyle parseStyle(Element eStyle) {
124: return WMSStyleImpl.parse(eStyle);
125: }
126:
127: /**
128: * Method parseWMSService
129: */
130: public static WMSService parseService(Element service) {
131: return WMSServiceImpl.parse(service);
132: }
133:
134: /**
135: * Method parseOnlineResource
136: */
137: public static WMSOnlineResource parseOnlineResource(
138: Element onlineResource) {
139: return WMSOnlineResourceImpl.parse(onlineResource);
140: }
141:
142: static public WMSLayer createLayer() {
143: return WMSLayerImpl.newInstance();
144: }
145:
146: static public WMSLayer parseLayer(Element eLayer) {
147: return WMSLayerImpl.parse(eLayer);
148: }
149:
150: }
|