01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, Geotools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.wms;
17:
18: import java.net.URL;
19:
20: import org.geotools.data.ows.Specification;
21: import org.geotools.data.wms.request.DescribeLayerRequest;
22: import org.geotools.data.wms.request.GetFeatureInfoRequest;
23: import org.geotools.data.wms.request.GetLegendGraphicRequest;
24: import org.geotools.data.wms.request.GetMapRequest;
25: import org.geotools.data.wms.request.GetStylesRequest;
26: import org.geotools.data.wms.request.PutStylesRequest;
27:
28: public abstract class WMSSpecification extends Specification {
29:
30: /**
31: * Creates a GetMapRequest for this specification, populating it with valid
32: * values.
33: *
34: * @param onlineResource the URL for the GetMapRequest
35: * @return a GetMapRequest that can be configured and used
36: */
37: public abstract GetMapRequest createGetMapRequest(URL onlineResource);
38:
39: /**
40: * Creates a GetFeatureInfoRequest for this specification, populating it
41: * with valid values.
42: *
43: * @param onlineResource the URL to be executed against
44: * @param getMapRequest a previously configured GetMapRequest
45: * @return a GetFeatureInfoRequest that can be configured and used
46: */
47: public abstract GetFeatureInfoRequest createGetFeatureInfoRequest(
48: URL onlineResource, GetMapRequest getMapRequest);
49:
50: /**
51: * Creates a DescribeLayer request which can be used to retrieve
52: * information about specific layers on the Web Map Server.
53: *
54: * @param onlineResource the location where the request can be made
55: * @return a DescribeLayerRequest to be configured and then passed to the Web Map Server
56: * @throws UnsupportedOperationException if the version of the specification doesn't support this request
57: */
58: public abstract DescribeLayerRequest createDescribeLayerRequest(
59: URL onlineResource) throws UnsupportedOperationException;
60:
61: /**
62: * Creates a GetLegendGraphicRequest which can be used to retrieve legend
63: * graphics from the WebMapServer
64: *
65: * @param onlineResource the location where the request can be made
66: * @return a GetLegendGraphicRequest to be configured and passed to the WMS
67: * @throws UnsupportedOperationException if the version of the specification doesn't support this request
68: */
69: public abstract GetLegendGraphicRequest createGetLegendGraphicRequest(
70: URL onlineResource) throws UnsupportedOperationException;
71:
72: /**
73: * Creates a GetStylesRequest which can be used to retrieve styles from
74: * the WMS.
75: *
76: * @param onlineResource The location where the request can be made
77: * @return a configurable request object to be passed to a WMS
78: * @throws UnsupportedOperationException if the version of the specification doesn't support this request
79: */
80: public abstract GetStylesRequest createGetStylesRequest(
81: URL onlineResource) throws UnsupportedOperationException;
82:
83: /**
84: * Creates a PutStyles request which can be configured and the passed to
85: * the WMS to store styles for later use.
86: *
87: * @param onlineResource the location where the request can be made
88: * @return a configureable request object to be passed to the WMS
89: * @throws UnsupportedOperationException if the version of the specification doesn't support this request
90: */
91: public abstract PutStylesRequest createPutStylesRequest(
92: URL onlineResource) throws UnsupportedOperationException;
93: }
|