es.unex.sextante.parameters
Class ParameterString

java.lang.Object
  extended by es.unex.sextante.parameters.Parameter
      extended by es.unex.sextante.parameters.ParameterString

public class ParameterString
extends Parameter

A parameter representing a String

Author:
volaya

Constructor Summary
ParameterString()
           
 
Method Summary
static Parameter deserialize(org.kxml2.io.KXmlParser parser)
           
 java.lang.String getCommandLineParameter()
          Returns the value of the parameter as a command-line parameter
 java.lang.Class getParameterClass()
          Returns the class of the value represented by this parameter
 java.lang.String getParameterTypeName()
          Returns the name used to identify the parameter in the parameters set
 boolean getParameterValueAsBoolean()
          Returns the value of the parameter as a boolean value
 double getParameterValueAsDouble()
          Returns the value of the parameter as a double
 int getParameterValueAsInt()
          Returns the value of the parameter as an integer
 java.awt.geom.Point2D getParameterValueAsPoint()
          Returns the value of the parameter as a point
 IRasterLayer getParameterValueAsRasterLayer()
          Returns the value of the parameter as a raster layer
 java.lang.String getParameterValueAsString()
          Returns the value of the parameter as a string
 ITable getParameterValueAsTable()
          Returns the value of the parameter as a table
 IVectorLayer getParameterValueAsVectorLayer()
          Returns the value of the parameter as a vector layer
 boolean isParameterValueCorrect()
          Returns true if the value assigned to this parameter is valid
 boolean setParameterAdditionalInfo(AdditionalInfo additionalInfo)
          Set the additional information for this parameter
 boolean setParameterValue(java.lang.Object value)
          Sets the value of the parameter
 
Methods inherited from class es.unex.sextante.parameters.Parameter
getNewInstance, getParameterAdditionalInfo, getParameterDescription, getParameterName, getParameterValueAsArrayList, getParameterValueAsObject, serialize, setParameterDescription, setParameterName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterString

public ParameterString()
Method Detail

getParameterTypeName

public java.lang.String getParameterTypeName()
Description copied from class: Parameter
Returns the name used to identify the parameter in the parameters set

Specified by:
getParameterTypeName in class Parameter
Returns:
the name of the parameter

getParameterValueAsRasterLayer

public IRasterLayer getParameterValueAsRasterLayer()
                                            throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a raster layer

Specified by:
getParameterValueAsRasterLayer in class Parameter
Returns:
the value of the parameter as a raster layer
Throws:
WrongParameterTypeException - if the parameter cannot be returned as a raster layer

getParameterValueAsTable

public ITable getParameterValueAsTable()
                                throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a table

Specified by:
getParameterValueAsTable in class Parameter
Returns:
the value of the parameter as a table
Throws:
WrongParameterTypeException - if the parameter cannot be returned as a table

getParameterValueAsVectorLayer

public IVectorLayer getParameterValueAsVectorLayer()
                                            throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a vector layer

Specified by:
getParameterValueAsVectorLayer in class Parameter
Returns:
the value of the parameter as a vector layer
Throws:
WrongParameterTypeException - if the parameter cannot be returned as a vector layer

getParameterValueAsInt

public int getParameterValueAsInt()
                           throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as an integer

Specified by:
getParameterValueAsInt in class Parameter
Returns:
the value of the parameter as an integer
Throws:
WrongParameterTypeException - if the value cannot be returned as an integer

getParameterValueAsDouble

public double getParameterValueAsDouble()
                                 throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a double

Specified by:
getParameterValueAsDouble in class Parameter
Returns:
the value of the parameter as a double
Throws:
WrongParameterTypeException - if the parameter cannot be returned as an double

getParameterValueAsBoolean

public boolean getParameterValueAsBoolean()
                                   throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a boolean value

Specified by:
getParameterValueAsBoolean in class Parameter
Returns:
the value of the parameter as a boolean value
Throws:
WrongParameterTypeException - if the value cannot be returned as a boolean value

getParameterValueAsString

public java.lang.String getParameterValueAsString()
                                           throws WrongParameterTypeException,
                                                  NullParameterValueException
Description copied from class: Parameter
Returns the value of the parameter as a string

Specified by:
getParameterValueAsString in class Parameter
Returns:
the value of the parameter as a string
Throws:
WrongParameterTypeException - if the parameter cannot be returned as a string
NullParameterValueException - if the value is null

getParameterValueAsPoint

public java.awt.geom.Point2D getParameterValueAsPoint()
                                               throws WrongParameterTypeException
Description copied from class: Parameter
Returns the value of the parameter as a point

Specified by:
getParameterValueAsPoint in class Parameter
Returns:
the value of the parameter as a point
Throws:
WrongParameterTypeException - if the parameter cannot be returned as a point

setParameterAdditionalInfo

public boolean setParameterAdditionalInfo(AdditionalInfo additionalInfo)
Description copied from class: Parameter
Set the additional information for this parameter

Specified by:
setParameterAdditionalInfo in class Parameter
Parameters:
additionalInfo - the additional info for this parameter
Returns:
true it the passed additional info can be assigned to this parameter
See Also:
AdditionalInfo

setParameterValue

public boolean setParameterValue(java.lang.Object value)
Description copied from class: Parameter
Sets the value of the parameter

Specified by:
setParameterValue in class Parameter
Parameters:
value - the new value of the parameter
Returns:
true if the value is a correct one and could be assigned

getParameterClass

public java.lang.Class getParameterClass()
Description copied from class: Parameter
Returns the class of the value represented by this parameter

Specified by:
getParameterClass in class Parameter
Returns:
the class of the value represented by this parameter

deserialize

public static Parameter deserialize(org.kxml2.io.KXmlParser parser)
                             throws org.xmlpull.v1.XmlPullParserException,
                                    java.io.IOException
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

getCommandLineParameter

public java.lang.String getCommandLineParameter()
Description copied from class: Parameter
Returns the value of the parameter as a command-line parameter

Specified by:
getCommandLineParameter in class Parameter
Returns:
then value of the parameter as a command-line parameter

isParameterValueCorrect

public boolean isParameterValueCorrect()
Description copied from class: Parameter
Returns true if the value assigned to this parameter is valid

Specified by:
isParameterValueCorrect in class Parameter
Returns:
true if the value assigned to this parameter is valid