public class StorableResult extends Result
Result
s that are Storable
s. The method
AnnotatedEntity.toXML()
is used to save the StorableResult
together with the
result to an XML representation, or in the method toString()
.Storable
Modifier and Type | Field and Description |
---|---|
static byte |
FALSE
The model/classifier has not been trained.
|
static byte |
NA
The
Storable cannot be trained anyway. |
static byte |
TRUE
The model/classifier has been trained.
|
comment, datatype, name
Constructor and Description |
---|
StorableResult(StringBuffer buf)
The standard constructor for the interface
Storable . |
StorableResult(String name,
String comment,
Storable object)
Creates a result for an XML representation of an object.
|
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 void |
extractFurtherInfos(StringBuffer representation)
This method can be used in the constructor with parameter
StringBuffer to
extract the further information. |
String |
getClassName()
Returns the name of the class of the
Storable corresponding to
the XML representation stored in this StorableResult . |
Storable |
getResultInstance()
Returns the instance of the
Storable that is the result of this
StorableResult . |
String |
getValue()
Returns the value of the
AnnotatedEntity . |
String |
getXMLTag()
This method returns a tag used as outer tag of the XML description.
|
byte |
isInitialized()
Returns
TRUE if the model or classifier was trained when
obtaining its XML representation stored in this StorableResult ,
FALSE if it was not, and NA if the object could not be
trained anyway. |
String |
toString() |
checkDatatype, createResult, getOriginalName, isCastableResult, isComparableResult, rename
getComment, getDatatype, getName, toXML
public static final byte NA
Storable
cannot be trained anyway.public static final byte FALSE
public static final byte TRUE
public StorableResult(String name, String comment, Storable object)
name
- the name of the resultcomment
- a comment on the resultobject
- the Storable
that is the resultpublic StorableResult(StringBuffer buf) throws NonParsableException
Storable
.
Constructs a new StorableResult
from its XML representation as
returned by AnnotatedEntity.toXML()
.buf
- the XML representation as StringBuffer
NonParsableException
- if buf
could not be parsedpublic byte isInitialized()
TRUE
if the model or classifier was trained when
obtaining its XML representation stored in this StorableResult
,
FALSE
if it was not, and NA
if the object could not be
trained anyway.public String getClassName()
Storable
corresponding to
the XML representation stored in this StorableResult
.public String getValue()
AnnotatedEntity
AnnotatedEntity
.getValue
in class AnnotatedEntity
AnnotatedEntity
public Storable getResultInstance()
Storable
that is the result of this
StorableResult
.public String getXMLTag()
AnnotatedEntity
getXMLTag
in class AnnotatedEntity
protected void appendFurtherInfos(StringBuffer buf)
AnnotatedEntity
Storable.toXML()
to extract
further information (name, comment, datatype).appendFurtherInfos
in class Result
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 Result
representation
- a XML represenation of the main information as
StringBuffer
NonParsableException
- if the XML representation is not parsableAnnotatedEntity.AnnotatedEntity(StringBuffer)