org.geotools.data.wms.gce
Class WMSParameterValue

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.parameter.AbstractParameter
          extended byorg.geotools.parameter.Parameter
              extended byorg.geotools.data.wms.gce.WMSParameterValue
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, org.opengis.parameter.GeneralParameterValue, org.opengis.parameter.ParameterValue, java.io.Serializable

public class WMSParameterValue
extends Parameter

Author:
rgould TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
See Also:
Serialized Form

Constructor Summary
WMSParameterValue(java.lang.Object value, DefaultParameterDescriptor descriptor)
           
 
Method Summary
 boolean booleanValue()
          Returns the boolean value of an operation parameter.
 java.lang.Object clone()
          Returns a copy of this parameter value or group.
 double doubleValue()
          Returns the numeric value of the coordinate operation parameter with its associated unit of measure.
 double doubleValue(javax.units.Unit arg0)
          Returns the numeric value of the coordinate operation parameter in the specified unit of measure.
 double[] doubleValueList()
          Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated unit of measure.
 double[] doubleValueList(javax.units.Unit arg0)
          Returns an ordered sequence of numeric values in the specified unit of measure.
 javax.units.Unit getUnit()
          Returns the unit of measure of the parameter value.
 java.lang.Object getValue()
          Returns the parameter value as an object.
 int intValue()
          Returns the positive integer value of an operation parameter, usually used for a count.
 int[] intValueList()
          Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts.
 void setValue(boolean arg0)
          Set the parameter value as a boolean.
 void setValue(double arg0)
          Set the parameter value as a floating point.
 void setValue(double[] arg0, javax.units.Unit arg1)
          Set the parameter value as an array of floating point and their associated unit.
 void setValue(double arg0, javax.units.Unit arg1)
          Set the parameter value as a floating point and its associated unit.
 void setValue(int arg0)
          Set the parameter value as an integer.
 void setValue(java.lang.Object arg0)
          Set the parameter value as an object.
 java.lang.String stringValue()
          Returns the string value of an operation parameter.
 java.net.URI valueFile()
          Returns a reference to a file or a part of a file containing one or more parameter values.
 
Methods inherited from class org.geotools.parameter.Parameter
ensureValidValue, equals, hashCode
 
Methods inherited from class org.geotools.parameter.AbstractParameter
formatWKT, getDescriptor, toString, write
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.parameter.GeneralParameterValue
getDescriptor
 

Constructor Detail

WMSParameterValue

public WMSParameterValue(java.lang.Object value,
                         DefaultParameterDescriptor descriptor)
Parameters:
value -
descriptor -
Method Detail

getUnit

public javax.units.Unit getUnit()
Description copied from class: Parameter
Returns the unit of measure of the parameter value. If the parameter value has no unit (for example because it is a String type), then this method returns . Note that "no unit" doesn't means "dimensionless".

Specified by:
getUnit in interface org.opengis.parameter.ParameterValue
Overrides:
getUnit in class Parameter
Returns:
The unit of measure, or if none.
See Also:
Parameter.doubleValue(), Parameter.doubleValueList(), Parameter.getValue()

doubleValue

public double doubleValue(javax.units.Unit arg0)
                   throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns the numeric value of the coordinate operation parameter in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.

Specified by:
doubleValue in interface org.opengis.parameter.ParameterValue
Overrides:
doubleValue in class Parameter
Parameters:
arg0 - The unit of measure for the value to be returned.
Returns:
The numeric value represented by this parameter after conversion to type and conversion to .
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not a numeric type.
See Also:
Parameter.getUnit(), Parameter.setValue(double,Unit), Parameter.doubleValueList(Unit)

doubleValue

public double doubleValue()
                   throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns the numeric value of the coordinate operation parameter with its associated unit of measure.

Specified by:
doubleValue in interface org.opengis.parameter.ParameterValue
Overrides:
doubleValue in class Parameter
Returns:
The numeric value represented by this parameter after conversion to type .
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not a numeric type.
See Also:
Parameter.getUnit(), Parameter.setValue(double), Parameter.doubleValueList()

intValue

public int intValue()
             throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns the positive integer value of an operation parameter, usually used for a count. An integer value does not have an associated unit of measure.

Specified by:
intValue in interface org.opengis.parameter.ParameterValue
Overrides:
intValue in class Parameter
Returns:
The numeric value represented by this parameter after conversion to type .
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not an integer type.
See Also:
Parameter.setValue(int), Parameter.intValueList()

booleanValue

public boolean booleanValue()
                     throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns the boolean value of an operation parameter. A boolean value does not have an associated unit of measure.

Specified by:
booleanValue in interface org.opengis.parameter.ParameterValue
Overrides:
booleanValue in class Parameter
Returns:
The boolean value represented by this parameter.
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not a boolean type.
See Also:
Parameter.setValue(boolean)

stringValue

public java.lang.String stringValue()
                             throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns the string value of an operation parameter. A string value does not have an associated unit of measure.

Specified by:
stringValue in interface org.opengis.parameter.ParameterValue
Overrides:
stringValue in class Parameter
Returns:
The string value represented by this parameter.
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not a string.
See Also:
Parameter.getValue(), Parameter.setValue(Object)

doubleValueList

public double[] doubleValueList(javax.units.Unit arg0)
                         throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns an ordered sequence of numeric values in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.

Specified by:
doubleValueList in interface org.opengis.parameter.ParameterValue
Overrides:
doubleValueList in class Parameter
Parameters:
arg0 - The unit of measure for the value to be returned.
Returns:
The sequence of values represented by this parameter after conversion to type and conversion to .
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not an array of s.
See Also:
Parameter.getUnit(), Parameter.setValue(double[],Unit), Parameter.doubleValue(Unit)

doubleValueList

public double[] doubleValueList()
                         throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated unit of measure.

Specified by:
doubleValueList in interface org.opengis.parameter.ParameterValue
Overrides:
doubleValueList in class Parameter
Returns:
The sequence of values represented by this parameter.
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not an array of s.
See Also:
Parameter.getUnit(), Parameter.setValue(Object), Parameter.doubleValue()

intValueList

public int[] intValueList()
                   throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts. These integer values do not have an associated unit of measure.

Specified by:
intValueList in interface org.opengis.parameter.ParameterValue
Overrides:
intValueList in class Parameter
Returns:
The sequence of values represented by this parameter.
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not an array of s.
See Also:
Parameter.setValue(Object), Parameter.intValue()

valueFile

public java.net.URI valueFile()
                       throws org.opengis.parameter.InvalidParameterTypeException
Description copied from class: Parameter
Returns a reference to a file or a part of a file containing one or more parameter values. When referencing a part of a file, that file must contain multiple identified parts, such as an XML encoded document. Furthermore, the referenced file or part of a file can reference another part of the same or different files, as allowed in XML documents.

Specified by:
valueFile in interface org.opengis.parameter.ParameterValue
Overrides:
valueFile in class Parameter
Returns:
The reference to a file containing parameter values.
Throws:
org.opengis.parameter.InvalidParameterTypeException - if the value is not a reference to a file or an URI.
See Also:
Parameter.getValue(), Parameter.setValue(Object)

getValue

public java.lang.Object getValue()
Description copied from class: Parameter
Returns the parameter value as an object. The object type is typically a Double, Integer, Boolean, String, URI, or .

Specified by:
getValue in interface org.opengis.parameter.ParameterValue
Overrides:
getValue in class Parameter
Returns:
The parameter value as an object.
See Also:
Parameter.setValue(Object)

setValue

public void setValue(double[] arg0,
                     javax.units.Unit arg1)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as an array of floating point and their associated unit.

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter values.
arg1 - The unit for the specified value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).

setValue

public void setValue(double arg0,
                     javax.units.Unit arg1)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as a floating point and its associated unit.

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter value.
arg1 - The unit for the specified value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).
See Also:
Parameter.setValue(double), Parameter.doubleValue(Unit)

setValue

public void setValue(double arg0)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as a floating point. The unit, if any, stay unchanged.

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).
See Also:
Parameter.setValue(double,Unit), Parameter.doubleValue()

setValue

public void setValue(int arg0)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as an integer.

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the integer type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).
See Also:
Parameter.intValue()

setValue

public void setValue(boolean arg0)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as a boolean.

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the boolean type is inappropriate for this parameter.
See Also:
Parameter.booleanValue()

setValue

public void setValue(java.lang.Object arg0)
              throws org.opengis.parameter.InvalidParameterValueException
Description copied from class: Parameter
Set the parameter value as an object. The object type is typically a Double, Integer, Boolean, String, URI, or .

Specified by:
setValue in interface org.opengis.parameter.ParameterValue
Overrides:
setValue in class Parameter
Parameters:
arg0 - The parameter value.
Throws:
org.opengis.parameter.InvalidParameterValueException - if the type of is inappropriate for this parameter, or if the value is illegal for some other reason (for example the value is numeric and out of range).
See Also:
Parameter.getValue()

clone

public java.lang.Object clone()
Description copied from class: AbstractParameter
Returns a copy of this parameter value or group.

Specified by:
clone in interface org.opengis.parameter.ParameterValue
Overrides:
clone in class AbstractParameter


Copyright © GeoTools. All Rights Reserved.