|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.results.Result
de.jstacs.results.StorableResult
public class StorableResult
Class for results that are Storables. The Storable.toXML() method is used
to save the StorableResult together with the result to an XML-representation, or in the toString() method.
Storable| Field Summary | |
|---|---|
static byte |
FALSE
The model/classifier has 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)
Constructs a new ObjectResult from its XML-representation |
|
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 ObjectResult. |
String |
getResult()
Returns the value of the result. |
Storable |
getResultInstance()
Returns the instance of the Storable that is the result of
this ObjectResult |
byte |
isTrained()
Returns TRUE if the model or classifier was trained when obtaining its XML-representation
stored in this ObjectResult, 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 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 result
public StorableResult(StringBuffer buf)
throws NonParsableException
ObjectResult from its XML-representation
buf - the XML-representation
NonParsableException - a NonParsableException is thrown if buf could not be parsed| Method Detail |
|---|
public byte isTrained()
TRUE if the model or classifier was trained when obtaining its XML-representation
stored in this ObjectResult, 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 ObjectResult.
public String getResult()
Result
getResult in class Resultpublic Storable getResultInstance()
Storable that is the result of
this ObjectResult
public StringBuffer toXML()
Storable
protected void fromXML(StringBuffer representation)
throws NonParsableException
ResultResult.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 Resultrepresentation - a xml represenation
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 | |||||||||