Class ParameterTable
java.lang.Object
gov.nih.mipav.model.scripting.parameters.ParameterTable
A lookup table containing Parameters keyed by a label/name. Can be filled by the parser with Parameters for a script
action execution, or filled by a scriptable dialog and used to record the parameters in a script.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe parameter table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all parameters from the table.booleancontainsParameter(String paramLabel) Checks to see if there is an entry in the parameter table for a particular label.Converts all of the parameters in the table into a comma delimited list of parameters, suitable for inclusion in a script.entrySet()Returns the set of parameter entries.booleangetBoolean(String paramLabel) Return the boolean value of one of the parameters from the table.doubleReturn the double value of one of the parameters from the table.Return the file value of one of the parameters from the table.floatReturn the float value of one of the parameters from the table.Return the model image assigned to one of the image parameters from the table.getImageParameter(String paramLabel) Return one of the image parameters from the table.intReturn the integer value of one of the parameters from the table.Return the one of the parameters from the table (cast as a ParameterList).longReturn the long value of one of the parameters from the table.getParameter(String paramLabel) Return the Object value of one of the parameters from the table.Get an array containing all of the parameters in the parameter table.shortReturn the signed short value of one of the parameters from the table.Return the string value of one of the parameters from the table.shortReturn the unsigned short value of one of the parameters from the table.protected ParametergetWithOverride(String paramLabel, int paramType) Returns a parameter from the table, possibly overriding it with a value stored in the global VariableTable.keySet()Returns the set of parameter names.voidAdd a parameter to a table.voidAdd a parameter to the table.voidRemove a parameter from the table.intsize()Returns the number of parameters contained in the table.
-
Field Details
-
paramTable
The parameter table. The keys are parameter labels/names, the values are various Parameter subclasses.
-
-
Constructor Details
-
ParameterTable
public ParameterTable()
-
-
Method Details
-
clear
public void clear()Removes all parameters from the table. -
containsParameter
Checks to see if there is an entry in the parameter table for a particular label. It also checks to see if a value for the parameter has been set in the global VariableTable.- Parameters:
paramLabel- The label/name of the variable parameter to check for.- Returns:
Trueif there is an entry in the table with the given label,falseotherwise.
-
convertToString
Converts all of the parameters in the table into a comma delimited list of parameters, suitable for inclusion in a script. No command line overriding is performed.- Returns:
- The information on the parameters in the table in string form.
-
convertToDPString
-
getBoolean
Return the boolean value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the boolean parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getDouble
Return the double value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the double parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getFile
Return the file value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the double parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getFloat
Return the float value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the float parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getImage
Return the model image assigned to one of the image parameters from the table. No overriding from the VariableTable is allowed.- Parameters:
paramLabel- The label/name of the image variable parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getImageParameter
Return one of the image parameters from the table. No overriding from the VariableTable is allowed.- Parameters:
paramLabel- The label/name of the image variable parameter to retrieve.- Returns:
- The requested parameter.
- Throws:
ParameterException- DOCUMENT ME!
-
getInt
Return the integer value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the integer parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getList
Return the one of the parameters from the table (cast as a ParameterList).- Parameters:
paramLabel- The label/name of the list parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getLong
Return the long value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the long parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getParameter
Return the Object value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the long parameter to retrieve.- Returns:
- The requested parameter.
- Throws:
ParameterException- DOCUMENT ME!
-
getParameters
Get an array containing all of the parameters in the parameter table. No command line overriding is performed.- Returns:
- The parameters in the table, in no particular order.
-
getShort
Return the signed short value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the signed short parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getString
Return the string value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the string parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
getUShort
Return the unsigned short value of one of the parameters from the table.- Parameters:
paramLabel- The label/name of the unsigned short parameter to retrieve.- Returns:
- The requested parameter's value.
- Throws:
ParameterException- DOCUMENT ME!
-
put
Add a parameter to a table.- Parameters:
param- The parameter to add.
-
put
Add a parameter to the table.- Parameters:
paramLabel- The label/name of the parameter to add (does not have to beparam.getLabel().param- The parameter to add.
-
remove
Remove a parameter from the table.- Parameters:
paramLabel- The label/name of the parameter to remove.
-
size
public int size()Returns the number of parameters contained in the table.- Returns:
- The number of parameters in the table.
-
getWithOverride
Returns a parameter from the table, possibly overriding it with a value stored in the global VariableTable.- Parameters:
paramLabel- The label of the parameter to return.paramType- The type of the parameter we want returned, or -1 to use type from table.- Returns:
- The requested parameter from the table.
- Throws:
ParameterException- DOCUMENT ME!
-
keySet
Returns the set of parameter names. -
entrySet
Returns the set of parameter entries.
-