|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.unex.sextante.parameters.Parameter
public abstract class Parameter
A parameter in a ParametersSet
, needed to run a
GeoAlgorithm
Constructor Summary | |
---|---|
Parameter()
|
Method Summary | |
---|---|
static Parameter |
deserialize(org.kxml2.io.KXmlParser parser)
Creates an instance of a parameter from an XML string |
abstract java.lang.String |
getCommandLineParameter()
Returns the value of the parameter as a command-line parameter |
Parameter |
getNewInstance()
Returns a copy of this parameter |
AdditionalInfo |
getParameterAdditionalInfo()
Returns the additional information of this parameter |
abstract java.lang.Class |
getParameterClass()
Returns the class of the value represented by this parameter |
java.lang.String |
getParameterDescription()
Returns the description of the parameter |
java.lang.String |
getParameterName()
Returns the name of the parameter |
abstract java.lang.String |
getParameterTypeName()
Returns the name used to identify the parameter in the parameters set |
java.util.ArrayList |
getParameterValueAsArrayList()
Returns the value of the parameter as an array list. |
abstract boolean |
getParameterValueAsBoolean()
Returns the value of the parameter as a boolean value |
abstract double |
getParameterValueAsDouble()
Returns the value of the parameter as a double |
abstract int |
getParameterValueAsInt()
Returns the value of the parameter as an integer |
java.lang.Object |
getParameterValueAsObject()
Returns the value of the parameter, not casting it to any particular type |
abstract java.awt.geom.Point2D |
getParameterValueAsPoint()
Returns the value of the parameter as a point |
abstract IRasterLayer |
getParameterValueAsRasterLayer()
Returns the value of the parameter as a raster layer |
abstract java.lang.String |
getParameterValueAsString()
Returns the value of the parameter as a string |
abstract ITable |
getParameterValueAsTable()
Returns the value of the parameter as a table |
abstract IVectorLayer |
getParameterValueAsVectorLayer()
Returns the value of the parameter as a vector layer |
abstract boolean |
isParameterValueCorrect()
Returns true if the value assigned to this parameter is valid |
void |
serialize(org.kxml2.io.KXmlSerializer serializer,
java.lang.String sCoords)
Serializes the description of this parameter (not its value) |
abstract boolean |
setParameterAdditionalInfo(AdditionalInfo additionalInfo)
Set the additional information for this parameter |
void |
setParameterDescription(java.lang.String sDescription)
Sets a new description of the parameter |
void |
setParameterName(java.lang.String sName)
Sets a new name for this parameter |
abstract boolean |
setParameterValue(java.lang.Object value)
Sets the value of the parameter |
java.lang.String |
toString()
Returns a text description of the parameter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Parameter()
Method Detail |
---|
public abstract java.lang.String getParameterTypeName()
public abstract boolean setParameterValue(java.lang.Object value)
value
- the new value of the parameter
public abstract boolean setParameterAdditionalInfo(AdditionalInfo additionalInfo)
additionalInfo
- the additional info for this parameter
AdditionalInfo
public abstract int getParameterValueAsInt() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the value cannot be
returned as an integer
NullParameterValueException
- if the parameter is nullpublic abstract double getParameterValueAsDouble() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the parameter cannot be
returned as an double
NullParameterValueException
- if the value is nullpublic abstract boolean getParameterValueAsBoolean() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the value cannot be
returned as a boolean value
NullParameterValueException
- if the parameter is nullpublic abstract java.lang.String getParameterValueAsString() throws WrongParameterTypeException, NullParameterValueException, NullParameterAdditionalInfoException
WrongParameterTypeException
- if the parameter cannot be
returned as a string
NullParameterValueException
- if the value is null
NullParameterAdditionalInfoException
- if the additional info
of the parameter is nullpublic abstract IVectorLayer getParameterValueAsVectorLayer() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the parameter cannot be
returned as a vector layer
NullParameterValueException
- if the value is null and it is
a mandatory vector layer
NullParameterAdditionalInfoException
- if the additional info
of the parameter is nullpublic abstract IRasterLayer getParameterValueAsRasterLayer() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the parameter cannot be
returned as a raster layer
NullParameterValueException
- if the value is null and it is
a mandatory raster layer
NullParameterAdditionalInfoException
- if the additional info
of the parameter is nullpublic abstract ITable getParameterValueAsTable() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the parameter cannot be
returned as a table
NullParameterValueException
- if the value is null and it is
a mandatory table
NullParameterAdditionalInfoException
- if the additional info
of the parameter is nullpublic abstract java.awt.geom.Point2D getParameterValueAsPoint() throws WrongParameterTypeException, NullParameterValueException
WrongParameterTypeException
- if the parameter cannot be
returned as a point
NullParameterValueException
- if the parameter is nullpublic abstract java.lang.Class getParameterClass()
public abstract java.lang.String getCommandLineParameter()
public AdditionalInfo getParameterAdditionalInfo() throws NullParameterAdditionalInfoException
NullParameterAdditionalInfoException
- if there is no
additional informationpublic java.lang.String getParameterName()
public java.lang.String getParameterDescription()
public void setParameterDescription(java.lang.String sDescription)
sDescription
- the description of the parameterpublic void setParameterName(java.lang.String sName)
sName
- the name of the parameterpublic java.lang.Object getParameterValueAsObject()
public java.util.ArrayList getParameterValueAsArrayList() throws NullParameterValueException
NullParameterValueException
public java.lang.String toString()
toString
in class java.lang.Object
getParameterTypeName()
public static Parameter deserialize(org.kxml2.io.KXmlParser parser) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
parser
- a parser to take the parameter data from
org.xmlpull.v1.XmlPullParserException
java.io.IOException
public void serialize(org.kxml2.io.KXmlSerializer serializer, java.lang.String sCoords) throws java.io.IOException, NullParameterAdditionalInfoException
serializer
- a serializersCoords
- The coords for representing it if it is
part of a model
java.io.IOException
NullParameterAdditionalInfoException
public Parameter getNewInstance()
public abstract boolean isParameterValueCorrect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |