public class MultilineSimpleParameter extends SimpleParameter
SimpleParameter
that renders as a textarea in Galaxy, which is only suitable for DataType.STRING
s.
Besides the toGalaxy(String, String, int, StringBuffer, StringBuffer, boolean)
and fromGalaxy(String, StringBuffer)
, all functionality is inherited from SimpleParameter
.SimpleParameter.DatatypeNotValidException, SimpleParameter.IllegalValueException
defaultValue, required, validator, value
comment, datatype, name
Constructor and Description |
---|
MultilineSimpleParameter(StringBuffer representation)
The standard constructor for the interface
Storable . |
MultilineSimpleParameter(String name,
String comment,
boolean required)
Creates a new
MultilineSimpleParameter with no default value. |
MultilineSimpleParameter(String name,
String comment,
boolean required,
Object defaultVal)
Creates a new
MultilineSimpleParameter with given default value. |
MultilineSimpleParameter(String name,
String comment,
boolean required,
ParameterValidator validator)
Creates a new
MultilineSimpleParameter with no default value and a ParameterValidator . |
MultilineSimpleParameter(String name,
String comment,
boolean required,
ParameterValidator validator,
Object defaultVal)
Creates a new
MultilineSimpleParameter with given default value and a ParameterValidator . |
Modifier and Type | Method and Description |
---|---|
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. |
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 . |
appendFurtherInfos, checkValue, clone, dataTypeToGalaxy, equals, extractFurtherInfos, getErrorMessage, getRangedInstance, getValidator, getValue, getXMLTag, hasDefaultOrIsSet, isAtomic, isRangeable, isRequired, isSet, reset, setDefault, setRangeable, setValidator, setValue, toString
getParent, isComparable, setParent
getComment, getDatatype, getName, toXML
public MultilineSimpleParameter(String name, String comment, boolean required, Object defaultVal) throws SimpleParameter.DatatypeNotValidException, SimpleParameter.IllegalValueException
MultilineSimpleParameter
with given default value.name
- the name of the parametercomment
- a comment on the parameter that tells the user some details
about itrequired
- determines if the parameter is requireddefaultVal
- the default valueDatatypeNotValidException
- if datatype
is not in
the values allowed for a SimpleParameter
IllegalValueException
- if the default value is not a valid value with respect
to datatype
SimpleParameter.DatatypeNotValidException
SimpleParameter.IllegalValueException
public MultilineSimpleParameter(String name, String comment, boolean required, ParameterValidator validator, Object defaultVal) throws ParameterException
MultilineSimpleParameter
with given default value and a ParameterValidator
.name
- the name of the parametercomment
- a comment on the parameter that tells the user some details
about itrequired
- determines if the parameter is requiredvalidator
- the validator for the parameter valuesdefaultVal
- the default valueParameterException
- if either the default value is not a valid value with respect
to datatype
or datatype
is not in
the values allowed for a SimpleParameter
public MultilineSimpleParameter(String name, String comment, boolean required, ParameterValidator validator) throws SimpleParameter.DatatypeNotValidException
MultilineSimpleParameter
with no default value and a ParameterValidator
.name
- the name of the parametercomment
- a comment on the parameter that tells the user some details
about itrequired
- determines if the parameter is requiredvalidator
- the validator for the parameter valuesDatatypeNotValidException
- if datatype
is not in the values allowed for a
SimpleParameter
SimpleParameter.DatatypeNotValidException
public MultilineSimpleParameter(String name, String comment, boolean required) throws SimpleParameter.DatatypeNotValidException
MultilineSimpleParameter
with no default value.name
- the name of the parametercomment
- a comment on the parameter that tells the user some details
about itrequired
- determines if the parameter is requiredDatatypeNotValidException
- if datatype
is not one of the allowed
DataType
sSimpleParameter.DatatypeNotValidException
public MultilineSimpleParameter(StringBuffer representation) throws NonParsableException
Storable
.
Constructs a MultilineSimpleParameter
out of an XML representation.representation
- the XML representation as StringBuffer
NonParsableException
- if the SimpleParameter
could not be restored from the
StringBuffer
representation
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 parsed