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.gce;
017:
018: import java.net.URI;
019:
020: import javax.units.Unit;
021:
022: import org.geotools.parameter.Parameter;
023: import org.geotools.parameter.DefaultParameterDescriptor;
024: import org.opengis.parameter.InvalidParameterTypeException;
025: import org.opengis.parameter.InvalidParameterValueException;
026:
027: /**
028: * @author rgould
029: *
030: * TODO To change the template for this generated type comment go to
031: * Window - Preferences - Java - Code Style - Code Templates
032: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/gce/WMSParameterValue.java $
033: */
034: public class WMSParameterValue extends Parameter {
035: private Object value;
036: private DefaultParameterDescriptor descriptor;
037:
038: /**
039: * @param value
040: * @param descriptor
041: */
042: public WMSParameterValue(Object value,
043: DefaultParameterDescriptor descriptor) {
044: super (descriptor);
045: this .value = value;
046: this .descriptor = descriptor;
047: }
048:
049: /* (non-Javadoc)
050: * @see org.opengis.parameter.ParameterValue#getUnit()
051: */
052: public Unit getUnit() {
053: // TODO Auto-generated method stub
054: return null;
055: }
056:
057: /* (non-Javadoc)
058: * @see org.opengis.parameter.ParameterValue#doubleValue(javax.units.Unit)
059: */
060: public double doubleValue(Unit arg0)
061: throws InvalidParameterTypeException {
062: // TODO Auto-generated method stub
063: return 0;
064: }
065:
066: /* (non-Javadoc)
067: * @see org.opengis.parameter.ParameterValue#doubleValue()
068: */
069: public double doubleValue() throws InvalidParameterTypeException {
070: // TODO Auto-generated method stub
071: return 0;
072: }
073:
074: /* (non-Javadoc)
075: * @see org.opengis.parameter.ParameterValue#intValue()
076: */
077: public int intValue() throws InvalidParameterTypeException {
078: // TODO Auto-generated method stub
079: return 0;
080: }
081:
082: public boolean booleanValue() throws InvalidParameterTypeException {
083: return ((Boolean) value).booleanValue();
084: }
085:
086: /* (non-Javadoc)
087: * @see org.opengis.parameter.ParameterValue#stringValue()
088: */
089: public String stringValue() throws InvalidParameterTypeException {
090: // TODO Auto-generated method stub
091: return (String) value;
092: }
093:
094: /* (non-Javadoc)
095: * @see org.opengis.parameter.ParameterValue#doubleValueList(javax.units.Unit)
096: */
097: public double[] doubleValueList(Unit arg0)
098: throws InvalidParameterTypeException {
099: // TODO Auto-generated method stub
100: return null;
101: }
102:
103: /* (non-Javadoc)
104: * @see org.opengis.parameter.ParameterValue#doubleValueList()
105: */
106: public double[] doubleValueList()
107: throws InvalidParameterTypeException {
108: // TODO Auto-generated method stub
109: return null;
110: }
111:
112: /* (non-Javadoc)
113: * @see org.opengis.parameter.ParameterValue#intValueList()
114: */
115: public int[] intValueList() throws InvalidParameterTypeException {
116: // TODO Auto-generated method stub
117: return null;
118: }
119:
120: /* (non-Javadoc)
121: * @see org.opengis.parameter.ParameterValue#valueFile()
122: */
123: public URI valueFile() throws InvalidParameterTypeException {
124: // TODO Auto-generated method stub
125: return null;
126: }
127:
128: /* (non-Javadoc)
129: * @see org.opengis.parameter.ParameterValue#getValue()
130: */
131: public Object getValue() {
132: // TODO Auto-generated method stub
133: return value;
134: }
135:
136: /* (non-Javadoc)
137: * @see org.opengis.parameter.ParameterValue#setValue(double[], javax.units.Unit)
138: */
139: public void setValue(double[] arg0, Unit arg1)
140: throws InvalidParameterValueException {
141: // TODO Auto-generated method stub
142: }
143:
144: /* (non-Javadoc)
145: * @see org.opengis.parameter.ParameterValue#setValue(double, javax.units.Unit)
146: */
147: public void setValue(double arg0, Unit arg1)
148: throws InvalidParameterValueException {
149: // TODO Auto-generated method stub
150: }
151:
152: /* (non-Javadoc)
153: * @see org.opengis.parameter.ParameterValue#setValue(double)
154: */
155: public void setValue(double arg0)
156: throws InvalidParameterValueException {
157: // TODO Auto-generated method stub
158: }
159:
160: /* (non-Javadoc)
161: * @see org.opengis.parameter.ParameterValue#setValue(int)
162: */
163: public void setValue(int arg0)
164: throws InvalidParameterValueException {
165: // TODO Auto-generated method stub
166: }
167:
168: /* (non-Javadoc)
169: * @see org.opengis.parameter.ParameterValue#setValue(boolean)
170: */
171: public void setValue(boolean arg0)
172: throws InvalidParameterValueException {
173: value = new Boolean(arg0);
174: }
175:
176: /* (non-Javadoc)
177: * @see org.opengis.parameter.ParameterValue#setValue(java.lang.Object)
178: */
179: public void setValue(Object arg0)
180: throws InvalidParameterValueException {
181: value = arg0;
182: }
183:
184: /* (non-Javadoc)
185: * @see java.lang.Object#clone()
186: */
187: public Object clone() {
188: // TODO Auto-generated method stub
189: return new WMSParameterValue(new String((String) value),
190: descriptor);
191: }
192: }
|