public class XMLExperiment extends XMLBasicSerialization
options
from the Experiment, since these are handled
by the get/set-methods. For the Classifier
class with all its
derivative classes it stores only debug
and options
.
For SplitEvaluator
and ResultProducer
only the
options are retrieved. The PropertyNode
is done manually since
it has no get/set-methods for its public fields.m_ClassFirst
we always save it
as false
.Experiment.m_ClassFirst
Modifier and Type | Field and Description |
---|---|
static String |
NAME_CLASSFIRST
the name of the classFirst property
|
static String |
NAME_PROPERTYNODE_PARENTCLASS
PropertyNode member
|
static String |
NAME_PROPERTYNODE_PROPERTY
PropertyNode member
|
static String |
NAME_PROPERTYNODE_VALUE
PropertyNode member
|
VAL_CELLS, VAL_KEY, VAL_MAPPING, VAL_VALUE
ATT_ARRAY, ATT_ARRAY_DEFAULT, ATT_CLASS, ATT_NAME, ATT_NULL, ATT_NULL_DEFAULT, ATT_PRIMITIVE, ATT_PRIMITIVE_DEFAULT, ATT_VERSION, DOCTYPE, ROOT_NODE, TAG_OBJECT, VAL_NO, VAL_ROOT, VAL_YES
Constructor and Description |
---|
XMLExperiment()
initializes the serialization
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
generates internally a new XML document and clears also the IgnoreList and
the mappings for the Read/Write-Methods
|
String |
getRevision()
Returns the revision string.
|
static void |
main(String[] args)
for testing only.
|
Object |
readPropertyNode(Element node)
builds the PropertyNode from the given DOM node.
|
Element |
writePropertyNode(Element parent,
Object o,
String name)
adds the given PropertyNode to a DOM structure.
|
readCollection, readCostMatrixOld, readDefaultListModel, readMap, readMatrix, readMatrixOld, writeCollection, writeCostMatrixOld, writeDefaultListModel, writeMap, writeMatrix, writeMatrixOld
fromXML, getVersion, read, read, read, read, readBooleanFromXML, readByteFromXML, readCharFromXML, readDoubleFromXML, readFloatFromXML, readFromXML, readFromXML, readIntFromXML, readLongFromXML, readShortFromXML, toXML, write, write, write, write, writeToXML
public static final String NAME_CLASSFIRST
public static final String NAME_PROPERTYNODE_VALUE
public static final String NAME_PROPERTYNODE_PARENTCLASS
public static final String NAME_PROPERTYNODE_PROPERTY
public void clear() throws Exception
clear
in class XMLBasicSerialization
Exception
- if initializing failspublic Element writePropertyNode(Element parent, Object o, String name) throws Exception
parent
- the parent of this object, e.g. the class this object is a member ofo
- the Object to describe in XMLname
- the name of the objectException
- if the DOM creation failspublic Object readPropertyNode(Element node) throws Exception
node
- the associated XML nodeException
- if instantiation failsDefaultListModel
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class XMLBasicSerialization
public static void main(String[] args) throws Exception
toString()
of the generated object.
Otherwise it loads the binary file, saves the XML representation in a
file with the original filename appended by ".xml" and once again in a
binary file with the original filename appended by ".exp".args
- the commandline argumentsException
- if something goes wrong, e.g., file not foundCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.