001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, Geotools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.data.wms.request;
017:
018: import java.net.URL;
019:
020: import org.geotools.data.ows.AbstractRequest;
021:
022: /**
023: * Provides functionality for a basic GetLegendGraphic request
024: *
025: * @author Richard Gould
026: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/request/AbstractGetLegendGraphicRequest.java $
027: */
028: public abstract class AbstractGetLegendGraphicRequest extends
029: AbstractWMSRequest implements GetLegendGraphicRequest {
030:
031: /**
032: * @param onlineResource
033: */
034: public AbstractGetLegendGraphicRequest(URL onlineResource) {
035: super (onlineResource, null);
036: }
037:
038: protected void initRequest() {
039: setProperty(REQUEST, "GetLegendGraphic");
040: }
041:
042: protected abstract void initVersion();
043:
044: /* (non-Javadoc)
045: * @see org.geotools.data.wms.request.GetLegendGraphic#setLayer(java.lang.String)
046: */
047: public void setLayer(String layer) {
048: setProperty(LAYER, layer);
049: }
050:
051: /* (non-Javadoc)
052: * @see org.geotools.data.wms.request.GetLegendGraphic#setStyle(java.lang.String)
053: */
054: public void setStyle(String style) {
055: setProperty(STYLE, style);
056: }
057:
058: /* (non-Javadoc)
059: * @see org.geotools.data.wms.request.GetLegendGraphic#setFeatureType(java.lang.String)
060: */
061: public void setFeatureType(String featureType) {
062: setProperty(FEATURETYPE, featureType);
063: }
064:
065: /* (non-Javadoc)
066: * @see org.geotools.data.wms.request.GetLegendGraphic#setRule(java.lang.String)
067: */
068: public void setRule(String rule) {
069: setProperty(RULE, rule);
070: }
071:
072: /* (non-Javadoc)
073: * @see org.geotools.data.wms.request.GetLegendGraphic#setScale(java.lang.String)
074: */
075: public void setScale(String scale) {
076: setProperty(SCALE, scale);
077: }
078:
079: /* (non-Javadoc)
080: * @see org.geotools.data.wms.request.GetLegendGraphic#setSLD(java.lang.String)
081: */
082: public void setSLD(String sld) {
083: setProperty(SLD, sld);
084: }
085:
086: /* (non-Javadoc)
087: * @see org.geotools.data.wms.request.GetLegendGraphic#setSLDBody(java.lang.String)
088: */
089: public void setSLDBody(String sldBody) {
090: setProperty(SLD_BODY, sldBody);
091: }
092:
093: /* (non-Javadoc)
094: * @see org.geotools.data.wms.request.GetLegendGraphic#setFormat(java.lang.String)
095: */
096: public void setFormat(String format) {
097: setProperty(FORMAT, format);
098: }
099:
100: /* (non-Javadoc)
101: * @see org.geotools.data.wms.request.GetLegendGraphic#setWidth(java.lang.String)
102: */
103: public void setWidth(String width) {
104: setProperty(WIDTH, width);
105: }
106:
107: /* (non-Javadoc)
108: * @see org.geotools.data.wms.request.GetLegendGraphic#setHeight(java.lang.String)
109: */
110: public void setHeight(String height) {
111: setProperty(HEIGHT, height);
112:
113: }
114:
115: /* (non-Javadoc)
116: * @see org.geotools.data.wms.request.GetLegendGraphic#setExceptions(java.lang.String)
117: */
118: public void setExceptions(String exceptions) {
119: setProperty(EXCEPTIONS, exceptions);
120: }
121: }
|