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.request;
17:
18: import java.net.URL;
19:
20: import org.geotools.data.ows.AbstractRequest;
21: import org.geotools.data.ows.Layer;
22:
23: /**
24: * Provides functionality for a basic getStyles request
25: *
26: * @author Richard Gould
27: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/request/AbstractGetStylesRequest.java $
28: */
29: public abstract class AbstractGetStylesRequest extends
30: AbstractWMSRequest implements GetStylesRequest {
31:
32: private Layer[] layers;
33:
34: /**
35: * @param onlineResource
36: * @param layers
37: */
38: public AbstractGetStylesRequest(URL onlineResource, Layer[] layers) {
39: super (onlineResource, null);
40: this .layers = layers;
41: }
42:
43: protected void initRequest() {
44: setProperty(REQUEST, "GetStyles");
45: }
46:
47: protected abstract void initVersion();
48:
49: /* (non-Javadoc)
50: * @see org.geotools.data.wms.request.GetStylesRequest#setLayers(java.lang.String)
51: */
52: public void setLayers(String layers) {
53: setProperty(LAYERS, layers);
54: }
55:
56: /* (non-Javadoc)
57: * @see org.geotools.data.wms.request.GetStylesRequest#setSLDver(java.lang.String)
58: */
59: public void setSLDver(String sldVer) {
60: setProperty(SLDVER, sldVer);
61: }
62:
63: /* (non-Javadoc)
64: * @see org.geotools.data.wms.request.GetStylesRequest#getLayers()
65: */
66: public Layer[] getLayers() {
67: return layers;
68: }
69:
70: }
|