|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.cdm
Class Argument

java.lang.Objectorg.greenstone.gatherer.cdm.Argument
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public class Argument
- extends java.lang.Object
- implements java.lang.Comparable, java.io.Serializable
- extends java.lang.Object
This class contains all the details about a single argument that can be passed to this plugin, including option lists if the parameters are restricted.
- Version:
- 2.3
| Field Summary | |
private java.lang.String |
default_value
A default value for parameter-type arguments. |
private java.lang.String |
description
The text description of this argument parsed from the pluginfo output. |
private org.w3c.dom.Element |
element
|
static byte |
ENUM
An element of the argument type enumeration. |
static byte |
FLAG
An element of the argument type enumeration. |
static byte |
HIERARCHY
An element of the argument type enumeration. |
static byte |
INTEGER
An element of the argument type enumeration. |
static byte |
LANGUAGE
An element of the argument type enumeration. |
private java.util.HashMap |
list
If the argument is of type ENUM then this map holds all the various options. |
private int |
maximum
The maximum value an integer based control can have. |
static byte |
METADATA
An element of the argument type enumeration. |
static byte |
METADATUM
An element of the argument type enumeration. |
private int |
minimum
The minimum value an integer based control can have. |
private java.lang.String |
name
The argument flag as it appears in the command. |
private java.lang.String |
owner
The plugin that owns this argument, for the purposes of visualising inheritance. |
private boolean |
required
true if this argument is required for the applicable script to work properly, false otherwise. |
static byte |
STRING
An element of the argument type enumeration. |
private byte |
type
The type of this argument. |
| Constructor Summary | |
Argument()
Default Constructor. |
|
Argument(org.w3c.dom.Element element)
|
|
| Method Summary | |
void |
addOption(java.lang.String name,
java.lang.String desc)
Method to add an element to the option list. |
int |
compareTo(java.lang.Object object)
Method to compare two arguments for ordering. |
Argument |
copy()
|
boolean |
equals(java.lang.Object object)
Method to determine if two arguments are equal. |
java.lang.String |
getDefaultValue()
Method to retrieve the value of default_value. |
java.lang.String |
getDescription()
Method to retrieve this arguments description. |
java.lang.String |
getDescription(java.lang.String key)
Method to retrieve the description of a certain list option value. |
int |
getMaximum()
|
int |
getMinimum()
|
java.lang.String |
getName()
Method to retrieve the value of name. |
java.util.HashMap |
getOptions()
Method to retrieve the option list for this argument. |
java.lang.String |
getOwner()
Retrieve the name of the owner of this argument. |
byte |
getType()
Method to determine the type of this argument. |
java.lang.String |
getValue()
Method to retrieve the value of value. |
java.util.ArrayList |
getValues()
Retrieve the vector of values. |
boolean |
isAssigned()
Method to determine if this argument has been assigned. |
boolean |
isCustomArgument()
|
boolean |
isRequired()
Method to determine of this argument is required for the associated script to work. |
void |
setAssigned(boolean assigned)
Method to allow for the activation of arguments that might never have their setValue() method called. |
void |
setCustomArgument(boolean custom)
|
void |
setDefaultValue(java.lang.String default_value)
Sets the value of default_value. |
void |
setDescription(java.lang.String description)
Set the value of desc. |
void |
setElement(org.w3c.dom.Element element)
|
void |
setMaximum(int maximum)
|
void |
setMinimum(int minimum)
|
void |
setName(java.lang.String name)
Set the value of name. |
void |
setOptions(java.util.HashMap list)
Sets the value of the options list. |
void |
setOwner(java.lang.String owner)
Set the owner of this argument. |
void |
setRequired(boolean required)
Set the value of required. |
void |
setType(byte type)
Set the value of type. |
void |
setType(java.lang.String new_type)
Set the value of type, by matching a type to the given string. |
void |
setValue(java.lang.String value)
Method to set the value of this argument. |
void |
setValues(java.util.ArrayList values)
Set the values vector to the given values. |
java.lang.String |
toString()
Method for translating the data of this class into a string. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
ENUM
public static final byte ENUM
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
FLAG
public static final byte FLAG
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
HIERARCHY
public static final byte HIERARCHY
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
INTEGER
public static final byte INTEGER
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
LANGUAGE
public static final byte LANGUAGE
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
METADATA
public static final byte METADATA
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
METADATUM
public static final byte METADATUM
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
STRING
public static final byte STRING
- An element of the argument type enumeration.
- See Also:
- Constant Field Values
required
private boolean required
- true if this argument is required for the applicable script to work properly, false otherwise.
type
private byte type
- The type of this argument. Initially an int, but bytes are cheaper.
maximum
private int maximum
- The maximum value an integer based control can have.
minimum
private int minimum
- The minimum value an integer based control can have.
element
private org.w3c.dom.Element element
list
private java.util.HashMap list
- If the argument is of type ENUM then this map holds all the various options. Each entry is an <option value> -> <description> mapping.
default_value
private java.lang.String default_value
- A default value for parameter-type arguments. May be a Perl pattern.
description
private java.lang.String description
- The text description of this argument parsed from the pluginfo output.
name
private java.lang.String name
- The argument flag as it appears in the command. Also used as the unique identifier of an argument.
owner
private java.lang.String owner
- The plugin that owns this argument, for the purposes of visualising inheritance.
| Constructor Detail |
Argument
public Argument()
- Default Constructor.
Argument
public Argument(org.w3c.dom.Element element)
| Method Detail |
addOption
public void addOption(java.lang.String name, java.lang.String desc)
- Method to add an element to the option list.
compareTo
public int compareTo(java.lang.Object object)
- Method to compare two arguments for ordering.
- Specified by:
compareToin interfacejava.lang.Comparable
copy
public Argument copy()
equals
public boolean equals(java.lang.Object object)
- Method to determine if two arguments are equal.
getDefaultValue
public java.lang.String getDefaultValue()
- Method to retrieve the value of default_value.
getDescription
public java.lang.String getDescription()
- Method to retrieve this arguments description.
getDescription
public java.lang.String getDescription(java.lang.String key)
- Method to retrieve the description of a certain list option value.
getMaximum
public int getMaximum()
getMinimum
public int getMinimum()
getOptions
public java.util.HashMap getOptions()
- Method to retrieve the option list for this argument.
getName
public java.lang.String getName()
- Method to retrieve the value of name.
getOwner
public java.lang.String getOwner()
- Retrieve the name of the owner of this argument.
getType
public byte getType()
- Method to determine the type of this argument.
getValue
public java.lang.String getValue()
- Method to retrieve the value of value.
getValues
public java.util.ArrayList getValues()
- Retrieve the vector of values.
isAssigned
public boolean isAssigned()
- Method to determine if this argument has been assigned.
isCustomArgument
public boolean isCustomArgument()
isRequired
public boolean isRequired()
- Method to determine of this argument is required for the associated script to work.
setAssigned
public void setAssigned(boolean assigned)
- Method to allow for the activation of arguments that might never have their setValue() method called.
setCustomArgument
public void setCustomArgument(boolean custom)
setDefaultValue
public void setDefaultValue(java.lang.String default_value)
- Sets the value of default_value.
setDescription
public void setDescription(java.lang.String description)
- Set the value of desc.
setElement
public void setElement(org.w3c.dom.Element element)
setMaximum
public void setMaximum(int maximum)
setMinimum
public void setMinimum(int minimum)
setName
public void setName(java.lang.String name)
- Set the value of name.
setOptions
public void setOptions(java.util.HashMap list)
- Sets the value of the options list.
setOwner
public void setOwner(java.lang.String owner)
- Set the owner of this argument.
setRequired
public void setRequired(boolean required)
- Set the value of required.
setType
public void setType(byte type)
- Set the value of type.
setType
public void setType(java.lang.String new_type)
- Set the value of type, by matching a type to the given string.
setValue
public void setValue(java.lang.String value)
- Method to set the value of this argument.
setValues
public void setValues(java.util.ArrayList values)
- Set the values vector to the given values. Currently I just assign the new values, whereas I may later want to implement a deep clone.
toString
public java.lang.String toString()
- Method for translating the data of this class into a string.
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.greenstone.gatherer.cdm.Argument