public class TextResult extends Result
Result analogon of a FileParameter, but conceptually (though not formally)
restricted to text contents.comment, datatype, name| Constructor and Description |
|---|
TextResult(StringBuffer xml)
Creates a
TextResult from its XML representation. |
TextResult(String name,
String comment,
FileParameter.FileRepresentation file,
String mime,
String producer,
String extendedType,
boolean export)
Creates a new
TextResult with given name, comment, content, mime type, and additional info. |
| 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). |
static boolean |
equals(String[] p1,
String mime2)
Checks if the list of mime types given in
p1
contains an element that is equal to one of the mime types given in mime2 (may be multiple, separated by commas). |
static boolean |
equals(String mime1,
String mime2)
Checks if the list of mime types given in
mime1 (may be multiple, separated by commas)
contains an element that is equal to one of the mime types given in mime2. |
protected void |
extractFurtherInfos(StringBuffer buf)
This method can be used in the constructor with parameter
StringBuffer to
extract the further information. |
void |
fill(FileParameter par)
Fills the supplied
FileParameter with a clone of the contents of this TextResult. |
boolean |
getExport()
Returns
true if the contents are saved to a separate file in Galaxy. |
String |
getExtendedType()
Returns the extended type of this
TextResult. |
String |
getMime()
Returns the mime type of this
TextResult. |
Object |
getProducer()
Returns the producer (i.e., the tool/application/program) that created this
TextResult. |
FileParameter.FileRepresentation |
getValue()
Returns the value of the
AnnotatedEntity. |
String |
getXMLTag()
This method returns a tag used as outer tag of the XML description.
|
void |
setExtendedType(String extendedType)
Sets the extended type of this
TextResult. |
checkDatatype, createResult, isCastableResult, isComparableResultgetComment, getDatatype, getName, toXMLpublic TextResult(String name, String comment, FileParameter.FileRepresentation file, String mime, String producer, String extendedType, boolean export)
TextResult with given name, comment, content, mime type, and additional info.name - the name of the resultcomment - a comment on the resultfile - the contents of the result, encapsulated in a FileParameter.FileRepresentation.mime - the mime type of the contentproducer - the producer (may be null)extendedType - the extended type (may be null)export - if true, the contents are exported as a separate file when used in Galaxypublic TextResult(StringBuffer xml) throws NonParsableException
TextResult from its XML representation.xml - the XML representationNonParsableException - if XML could not be parsedpublic boolean getExport()
true if the contents are saved to a separate file in Galaxy.public static boolean equals(String[] p1, String mime2)
p1
contains an element that is equal to one of the mime types given in mime2 (may be multiple, separated by commas).p1 - the reference mime typesmime2 - the mime types to be checkedp1 and mime2 share a mime typepublic static boolean equals(String mime1, String mime2)
mime1 (may be multiple, separated by commas)
contains an element that is equal to one of the mime types given in mime2.mime1 - the reference mime typesmime2 - the mime types to be checkedmime1 and mime2 share a mime typepublic void fill(FileParameter par) throws SimpleParameter.IllegalValueException, CloneNotSupportedException
FileParameter with a clone of the contents of this TextResult.par - the FileParameter to be filledSimpleParameter.IllegalValueException - if the value of this FileParameter is not accepted by the supplied parameterCloneNotSupportedException - if the contents of this TextResult could not be cloned.public String getMime()
TextResult.public String getExtendedType()
TextResult. May be used for checking compatibility for
fill(FileParameter) using FileParameter.getExtendedType().public void setExtendedType(String extendedType)
TextResult.extendedType - the extended typeFileParameter.setExtendedType(String)public String getXMLTag()
AnnotatedEntitygetXMLTag in class AnnotatedEntityprotected void appendFurtherInfos(StringBuffer buf)
AnnotatedEntityStorable.toXML() to extract
further information (name, comment, datatype).appendFurtherInfos in class AnnotatedEntitybuf - a XML representation of the main information as
StringBufferStorable.toXML()protected void extractFurtherInfos(StringBuffer buf) throws NonParsableException
AnnotatedEntityStringBuffer to
extract the further information.extractFurtherInfos in class AnnotatedEntitybuf - a XML represenation of the main information as
StringBufferNonParsableException - if the XML representation is not parsableAnnotatedEntity.AnnotatedEntity(StringBuffer)public FileParameter.FileRepresentation getValue()
AnnotatedEntityAnnotatedEntity.getValue in class AnnotatedEntityAnnotatedEntitypublic Object getProducer()
TextResult.