|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjwo.landserf.script.LSParameter
public class LSParameter
Stores a parameter option for command line control of a LandSerf process.
| Field Summary | |
|---|---|
static int |
BOOLEAN
Indicates a boolean (flag) parameter. |
static int |
NUMBER
Indicates a numerical parameter . |
static int |
RASTER_PARAM
Indicates a raster map parameter. |
static int |
SPATIAL_PARAM
Indicates a spatial object parameter. |
static int |
STRING
Indicates a string parameter. |
static int |
UNDECLARED
Indicates a parameter with an undeclared type. |
static int |
VECTOR_PARAM
Indicates a vector map parameter. |
static int |
VOID
Indicates a void return type. |
| Constructor Summary | |
|---|---|
LSParameter(String key,
String desc)
Creates a compulsory string parameter used for a landScript method. |
|
LSParameter(String key,
String desc,
int type)
Creates a compulsory parameter used for a landScript method. |
|
LSParameter(String key,
String desc,
int type,
String defaultVal)
Creates a parameter used for a landScript method. |
|
LSParameter(String key,
String desc,
String defaultVal)
Creates an optional string parameter with default value used for a landScript method. |
|
| Method Summary | |
|---|---|
String |
getDefault()
Reports the default value for this parameter, or null if it is a required parameter. |
String |
getDesc()
Describes the parameter. |
String |
getKey()
Reports the parameter name (key). |
int |
getType()
Reports the type of parameter. |
static String |
getTypeAsString(int type)
Reports the type of the given parameter id as a string message. |
Object |
getValue()
Reports the parameter value. |
boolean |
isRequired()
Reports whether or not the parameter is required. |
boolean |
setValue(SpatialObject value)
Sets the parameter value. |
boolean |
setValue(String value)
Sets the parameter value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VOID
public static final int STRING
public static final int NUMBER
public static final int BOOLEAN
public static final int SPATIAL_PARAM
public static final int RASTER_PARAM
public static final int VECTOR_PARAM
public static final int UNDECLARED
| Constructor Detail |
|---|
public LSParameter(String key,
String desc)
key - Parameter key (name used to identify parameter).desc - Description of the parameter.
public LSParameter(String key,
String desc,
String defaultVal)
key - Parameter key (name used to identify parameter).desc - Description of the parameter.defaultVal - Default value for the parameter. If null, parameter assumed to be compulsory.
public LSParameter(String key,
String desc,
int type)
key - Parameter key (name used to identify parameter).desc - Description of the parameter.type - Type of parameter (e.g. STRING, NUMBER, RASTER_PARAM, VECTOR_PARAM, SPATIAL_PARAM).
public LSParameter(String key,
String desc,
int type,
String defaultVal)
key - Parameter key (name used on command line).desc - Description of the parameter.type - Type of parameter (one of STRING, NUMBER, BOOLEAN, RASTER_PARAM, VECTOR_PARAM or SPATIAL_PARAM).defaultVal - Default value for the parameter, or string value "null" if not used, or null if compulsory.| Method Detail |
|---|
public String getDesc()
public String getKey()
public boolean isRequired()
public String getDefault()
public int getType()
public static String getTypeAsString(int type)
type - Type of parameter. Should be one of VOID,
NUMBER, SPATIAL_PARAM etc.
public boolean setValue(String value)
getType(). To store spatial objects, use SetValue(SpatialObject).
String objects.
Double objects.
Boolean objects.
value - String representation of the parameter value.
public boolean setValue(SpatialObject value)
getType(). To set scalar values, use setValue(String).
RasterMaps.
VectorMaps.
SpatialObjects.
value - Spatial object representation of the parameter value.
public Object getValue()
getType().
String objects.
Double objects.
Boolean objects.
RasterMaps.
VectorMaps.
SpatialObjects.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||