|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.plugins.executor.ParameterDefinition
public class ParameterDefinition
Represents a parameter definition for the external program. A name and type is required. All other settings are optional. Supported values for type is:
Field Summary | |
---|---|
private String |
defaultValue
|
private String |
description
|
private static URL |
dtdFile
|
private boolean |
multiple
|
private String |
name
|
private Map<String,String> |
options
|
private boolean |
required
|
private String |
type
|
Constructor Summary | |
---|---|
ParameterDefinition()
Create a new empty parameter definition. |
Method Summary | |
---|---|
String |
getDefaultValue()
Get the default value for this parameter. |
String |
getDescription()
Get a description/help text about this parameter. |
String |
getName()
Get the name of the parameter. |
String |
getOption(String key)
Get the value for an option. |
Set<String> |
getOptions()
Get the names of other options that are defined for this parmeter. |
String |
getType()
Get the type of the parameter. |
boolean |
isMultiple()
Can this parameter have multiple values or only one? |
boolean |
isRequired()
Is this parameter a required parameter or not? |
static List<ParameterDefinition> |
parseXml(String xml,
boolean validate)
Parse an XML document containing parameter definitions. |
void |
setDefaultValue(String defaultValue)
Set the default value for this parameter. |
void |
setDescription(String description)
Set a description/help text for this parmeter. |
void |
setMultiple(boolean multiple)
Set if this parameter can have multiple values or only one. |
void |
setName(String name)
Set the name of the parameter. |
void |
setOption(String key,
String value)
Set the value for an option. |
void |
setRequired(boolean required)
Set if this parameter should be a required or optional parameter. |
void |
setType(String type)
Set the type of the parameter. |
PluginParameter<?> |
toPluginParameter(DbControl dc,
BioAssaySet source)
Convert this parameter definition to a PluginParameter object. |
String |
toXmlFragment(boolean compact)
Render this parameter definition as an XML fragment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final URL dtdFile
private String type
private String name
private boolean required
private boolean multiple
private String defaultValue
private String description
private Map<String,String> options
Constructor Detail |
---|
public ParameterDefinition()
Method Detail |
---|
public static List<ParameterDefinition> parseXml(String xml, boolean validate)
xml
- The xml as a string (with or without a DOCTYPE declaration)validate
- TRUE to validate the XML against the dtd (external-plugin-parameters.dtd)
public String getType()
public void setType(String type)
public String getName()
public void setName(String name)
public boolean isRequired()
public void setRequired(boolean required)
public boolean isMultiple()
public void setMultiple(boolean multiple)
public String getDefaultValue()
public void setDefaultValue(String defaultValue)
public String getDescription()
public void setDescription(String description)
public Set<String> getOptions()
public String getOption(String key)
public void setOption(String key, String value)
public String toXmlFragment(boolean compact)
compact
- If TRUE, the generated XML is compacted and without line breaks.
public PluginParameter<?> toPluginParameter(DbControl dc, BioAssaySet source)
dc
- A DbControl to use for database accesssource
- The source bioassay set
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |