|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jstacs.results.Result de.jstacs.results.StorableResult
public class StorableResult
Class for Result
s that are Storable
s. The method
toXML()
is used to save the StorableResult
together with the
result to an XML representation, or in the method toString()
.
Storable
Field Summary | |
---|---|
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. |
Fields inherited from class de.jstacs.results.Result |
---|
comment, datatype, name |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
protected void |
fromXML(StringBuffer representation)
This method is used in Result.Result(StringBuffer) to extract the
information. |
String |
getClassName()
Returns the name of the class of the Storable corresponding to
the XML representation stored in this StorableResult . |
String |
getResult()
Returns the value of the Result . |
Storable |
getResultInstance()
Returns the instance of the Storable that is the result of this
StorableResult . |
byte |
isTrained()
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()
|
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class de.jstacs.results.Result |
---|
appendMainInfo, checkDatatype, createResult, extractMainInfo, getComment, getDatatype, getName, isCastableResult, isComparableResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte NA
Storable
cannot be trained anyway.
public static final byte FALSE
public static final byte TRUE
Constructor Detail |
---|
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 toXML()
.
buf
- the XML representation as StringBuffer
NonParsableException
- if buf
could not be parsedMethod Detail |
---|
public byte isTrained()
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 getResult()
Result
Result
.
getResult
in class Result
Result
public Storable getResultInstance()
Storable
that is the result of this
StorableResult
.
public StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
protected void fromXML(StringBuffer representation) throws NonParsableException
Result
Result.Result(StringBuffer)
to extract the
information. The method can be seen as opposite of
Storable.toXML()
and should not be made public.
fromXML
in class Result
representation
- the XML represenation of the Result
to be parsed
NonParsableException
- if the XML representation is not parsableResult.extractMainInfo(StringBuffer)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |