public class DataColumnParameter extends SimpleParameter
SimpleParameter
that represents a data column parameter in Galaxy and JstacsFX.SimpleParameter.DatatypeNotValidException, SimpleParameter.IllegalValueException
defaultValue, required, validator, value
comment, datatype, name
Constructor and Description |
---|
DataColumnParameter(StringBuffer representation)
The standard constructor for the interface
Storable . |
DataColumnParameter(String dataRef,
String name,
String comment,
boolean required)
Creates a new
DataColumnParameter with given name, comment, and reference. |
DataColumnParameter(String dataRef,
String name,
String comment,
boolean required,
Integer defaultVal)
Creates a new
DataColumnParameter with given name, comment, and reference. |
DataColumnParameter(String dataRef,
String name,
String comment,
boolean required,
ParameterValidator validator)
Creates a new
DataColumnParameter with given name, comment, and reference. |
DataColumnParameter(String dataRef,
String name,
String comment,
boolean required,
ParameterValidator validator,
Integer defaultVal)
Creates a new
DataColumnParameter with given name, comment, and reference. |
Modifier and Type | Method and Description |
---|---|
protected void |
appendFurtherInfos(StringBuffer buf)
This method can be used in the method
Storable.toXML() to extract
further information (name, comment, datatype). |
protected String |
dataTypeToGalaxy()
Returns the Galaxy identifier for the
DataType of this parameter |
protected void |
extractFurtherInfos(StringBuffer representation)
This method can be used in the constructor with parameter
StringBuffer to
extract the further information. |
static FileParameter |
find(ParameterSet top,
String dataRef)
Finds the parameter for the given ID in a
ParameterSet . |
void |
fromGalaxy(String namePrefix,
StringBuffer command)
Parses the contents of
command in the format defined by configBuffer of GalaxyConvertible.toGalaxy(String, String, int, StringBuffer, StringBuffer, boolean)
and sets the values of the Parameter or ParameterSet accordingly. |
String |
getDataRef()
Returns the ID of the referenced parameter (tabular) in Galaxy.
|
void |
toGalaxy(String namePrefix,
String configPrefix,
int depth,
StringBuffer descBuffer,
StringBuffer configBuffer,
boolean addLine)
Creates an Galaxy XML-representation of the parameters and appends it to
descBuffer
and variable configuration and appends it to configBuffer . |
checkValue, clone, equals, getErrorMessage, getRangedInstance, getValidator, getValue, getXMLTag, hasDefaultOrIsSet, isAtomic, isRangeable, isRequired, isSet, reset, setDefault, setRangeable, setValidator, setValue, toString
getParent, isComparable, setParent
getComment, getDatatype, getName, toXML
public DataColumnParameter(String dataRef, String name, String comment, boolean required, Integer defaultVal) throws SimpleParameter.DatatypeNotValidException, SimpleParameter.IllegalValueException
DataColumnParameter
with given name, comment, and reference.dataRef
- the ID of the referenced parameter (tabular) in Galaxy.name
- the name of the parametercomment
- a comment on the parameterrequired
- if this parameter is requireddefaultVal
- the default valueDatatypeNotValidException
- should not happenIllegalValueException
- should not happenSimpleParameter.DatatypeNotValidException
SimpleParameter.IllegalValueException
public DataColumnParameter(String dataRef, String name, String comment, boolean required, ParameterValidator validator, Integer defaultVal) throws ParameterException
DataColumnParameter
with given name, comment, and reference.dataRef
- the ID of the referenced parameter (tabular) in Galaxy.name
- the name of the parametercomment
- a comment on the parameterrequired
- if this parameter is requiredvalidator
- a validator of admissible valuesdefaultVal
- the default valueParameterException
- if the default value is not admissiblepublic DataColumnParameter(String dataRef, String name, String comment, boolean required, ParameterValidator validator) throws SimpleParameter.DatatypeNotValidException
DataColumnParameter
with given name, comment, and reference.dataRef
- the ID of the referenced parameter (tabular) in Galaxy.name
- the name of the parametercomment
- a comment on the parameterrequired
- if this parameter is requiredvalidator
- a validator of admissible valuesDatatypeNotValidException
- should not happenSimpleParameter.DatatypeNotValidException
public DataColumnParameter(String dataRef, String name, String comment, boolean required) throws SimpleParameter.DatatypeNotValidException
DataColumnParameter
with given name, comment, and reference.dataRef
- the ID of the referenced parameter (tabular) in Galaxy.name
- the name of the parametercomment
- a comment on the parameterrequired
- if this parameter is requiredDatatypeNotValidException
- should not happenSimpleParameter.DatatypeNotValidException
public DataColumnParameter(StringBuffer representation) throws NonParsableException
Storable
.
Creates a new DataColumnParameter
out of its XML representation.representation
- the XML representation as StringBuffer
NonParsableException
- if the DataColumnParameter
could not be reconstructed
out of the XML representation (the StringBuffer
could
not be parsed)Storable
protected String dataTypeToGalaxy()
SimpleParameter
DataType
of this parameterdataTypeToGalaxy
in class SimpleParameter
public String getDataRef()
public void toGalaxy(String namePrefix, String configPrefix, int depth, StringBuffer descBuffer, StringBuffer configBuffer, boolean addLine) throws Exception
GalaxyConvertible
descBuffer
and variable configuration and appends it to configBuffer
. The variable configuration
is also used to parse user-supplied values returned by Galaxy.toGalaxy
in interface GalaxyConvertible
toGalaxy
in class SimpleParameter
namePrefix
- the prefix of the variable name used in GalaxyconfigPrefix
- the prefix for conditionalsdepth
- the depth in the parameter hierarchy, used for graphical representation of nestingdescBuffer
- the buffer for the parameter descriptionconfigBuffer
- the buffer for the configuration lineaddLine
- if true, a line is added before the title of a parameterException
- if the conversion failspublic void fromGalaxy(String namePrefix, StringBuffer command) throws Exception
GalaxyConvertible
command
in the format defined by configBuffer
of GalaxyConvertible.toGalaxy(String, String, int, StringBuffer, StringBuffer, boolean)
and sets the values of the Parameter
or ParameterSet
accordingly.fromGalaxy
in interface GalaxyConvertible
fromGalaxy
in class SimpleParameter
namePrefix
- the prefix of the variable namecommand
- the command stringException
- if the command string could not be parsedprotected void appendFurtherInfos(StringBuffer buf)
AnnotatedEntity
Storable.toXML()
to extract
further information (name, comment, datatype).appendFurtherInfos
in class SimpleParameter
buf
- a XML representation of the main information as
StringBuffer
Storable.toXML()
protected void extractFurtherInfos(StringBuffer representation) throws NonParsableException
AnnotatedEntity
StringBuffer
to
extract the further information.extractFurtherInfos
in class SimpleParameter
representation
- a XML represenation of the main information as
StringBuffer
NonParsableException
- if the XML representation is not parsableAnnotatedEntity.AnnotatedEntity(StringBuffer)
public static FileParameter find(ParameterSet top, String dataRef)
ParameterSet
.top
- the ParameterSet
dataRef
- the ID