public class StorableResult extends Result
Results that are Storables. 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, isCastableResult, isComparableResultgetComment, getDatatype, getName, toXMLpublic 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 StringBufferNonParsableException - 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()
AnnotatedEntityAnnotatedEntity.getValue in class AnnotatedEntityAnnotatedEntitypublic Storable getResultInstance()
Storable that is the result of this
StorableResult.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 representation) throws NonParsableException
AnnotatedEntityStringBuffer to
extract the further information.extractFurtherInfos in class AnnotatedEntityrepresentation - a XML represenation of the main information as
StringBufferNonParsableException - if the XML representation is not parsableAnnotatedEntity.AnnotatedEntity(StringBuffer)