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 java.lang.String |
NAME_CLASSFIRST
the name of the classFirst property
|
static java.lang.String |
NAME_PROPERTYNODE_PARENTCLASS
PropertyNode member
|
static java.lang.String |
NAME_PROPERTYNODE_PROPERTY
PropertyNode member
|
static java.lang.String |
NAME_PROPERTYNODE_VALUE
PropertyNode member
|
VAL_CELLS, VAL_KEY, VAL_MAPPING, VAL_VALUEATT_ARRAY, ATT_ARRAY_DEFAULT, ATT_CLASS, ATT_NAME, ATT_NULL, ATT_NULL_DEFAULT, ATT_PRIMITIVE, ATT_PRIMITIVE_DEFAULT, ATT_VERSION, DEBUG, DOCTYPE, m_ClassnameOverride, m_CurrentNode, m_CustomMethods, m_Document, m_Properties, m_suppressWarnings, ROOT_NODE, SUPPRESS_PROPERTY_WARNINGS, 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
|
java.lang.String |
getRevision()
Returns the revision string.
|
static void |
main(java.lang.String[] args)
for testing only. if the first argument is a filename with ".xml" as
extension it tries to generate an instance from the XML description and
does a
toString() of the generated object. |
protected java.lang.Object |
readPostProcess(java.lang.Object o)
additional post-processing can happen in derived classes after reading from
XML.
|
java.lang.Object |
readPropertyNode(org.w3c.dom.Element node)
builds the PropertyNode from the given DOM node.
|
protected void |
writePostProcess(java.lang.Object o)
enables derived classes to add other properties to the DOM tree, e.g. ones
that do not apply to the get/set convention of beans.
|
org.w3c.dom.Element |
writePropertyNode(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given PropertyNode to a DOM structure.
|
readCollection, readColor, readCostMatrix, readCostMatrixOld, readDefaultListModel, readMap, readMatrix, readMatrixOld, writeCollection, writeColor, writeCostMatrix, writeCostMatrixOld, writeDefaultListModel, writeMap, writeMatrix, writeMatrixOldaddElement, addElement, addElement, booleanToString, determineClass, determineDescriptor, fromXML, getArrayDimensions, getDescriptorByName, getDescriptors, getPath, getPrimitive, getVersion, invokeReadFromXML, invokeWriteToXML, isPrimitiveArray, overrideClassname, overrideClassname, read, read, read, read, readBooleanFromXML, readByteFromXML, readCharFromXML, readDoubleFromXML, readFloatFromXML, readFromXML, readFromXML, readIntFromXML, readLongFromXML, readPreProcess, readShortFromXML, setSuppressWarnings, stringToBoolean, toXML, trace, write, write, write, write, writeBooleanToXML, writeByteToXML, writeCharToXML, writeDoubleToXML, writeFloatToXML, writeIntToXML, writeLongToXML, writePreProcess, writeShortToXML, writeToXMLpublic static final java.lang.String NAME_CLASSFIRST
public static final java.lang.String NAME_PROPERTYNODE_VALUE
public static final java.lang.String NAME_PROPERTYNODE_PARENTCLASS
public static final java.lang.String NAME_PROPERTYNODE_PROPERTY
public XMLExperiment()
throws java.lang.Exception
java.lang.Exception - if initialization failspublic void clear()
throws java.lang.Exception
clear in class XMLBasicSerializationjava.lang.Exception - if initializing failsprotected void writePostProcess(java.lang.Object o)
throws java.lang.Exception
writePostProcess in class XMLSerializationo - the object that is serialized into XMLjava.lang.Exception - if post-processing failsprotected java.lang.Object readPostProcess(java.lang.Object o)
throws java.lang.Exception
readPostProcess in class XMLSerializationo - the object to perform some additional processing onjava.lang.Exception - if post-processing failspublic org.w3c.dom.Element writePropertyNode(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
throws java.lang.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 objectjava.lang.Exception - if the DOM creation failspublic java.lang.Object readPropertyNode(org.w3c.dom.Element node)
throws java.lang.Exception
node - the associated XML nodejava.lang.Exception - if instantiation failsDefaultListModelpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class XMLBasicSerializationpublic static void main(java.lang.String[] args)
throws java.lang.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 argumentsjava.lang.Exception - if something goes wrong, e.g., file not found