es.unex.sextante.parameters
Class ParameterVectorLayer

java.lang.Object
  extended by es.unex.sextante.parameters.Parameter
      extended by es.unex.sextante.parameters.ParameterDataObject
          extended by es.unex.sextante.parameters.ParameterVectorLayer

public class ParameterVectorLayer
extends ParameterDataObject

A parameter representing a vector layer

Author:
volaya

Constructor Summary
ParameterVectorLayer()
           
 
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
 IRasterLayer getParameterValueAsRasterLayer()
          Returns the value of the parameter as a raster layer
 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.ParameterDataObject
getParameterValueAsBoolean, getParameterValueAsDouble, getParameterValueAsInt, getParameterValueAsPoint, getParameterValueAsString
 
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

ParameterVectorLayer

public ParameterVectorLayer()
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 ParameterDataObject
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 NullParameterValueException
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:
NullParameterValueException - if the value is null and it is a mandatory vector layer

setParameterAdditionalInfo

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

Specified by:
setParameterAdditionalInfo in class ParameterDataObject
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 ParameterDataObject
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