|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.xml.XMLSerialization
weka.core.xml.XMLBasicSerialization
public class XMLBasicSerialization
This serializer contains some read/write methods for common classes that are not beans-conform. Currently supported are:
| Field Summary | |
|---|---|
static String |
VAL_CELLS
the matrix cells |
static String |
VAL_KEY
the value for a mapping-key, e.g., Maps |
static String |
VAL_MAPPING
the value for mapping, e.g., Maps |
static String |
VAL_VALUE
the value for mapping-value, e.g., Maps |
| Fields inherited from class weka.core.xml.XMLSerialization |
|---|
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 Summary | |
|---|---|
XMLBasicSerialization()
initializes the serialization |
|
| Method Summary | |
|---|---|
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. |
Object |
readCollection(Element node)
builds the Collection from the given DOM node. |
Object |
readCostMatrixOld(Element node)
builds the Matrix (old) from the given DOM node. |
Object |
readDefaultListModel(Element node)
builds the DefaultListModel from the given DOM node. |
Object |
readMap(Element node)
builds the Map from the given DOM node. |
Object |
readMatrix(Element node)
builds the Matrix from the given DOM node. |
Object |
readMatrixOld(Element node)
builds the Matrix (old) from the given DOM node. |
Element |
writeCollection(Element parent,
Object o,
String name)
adds the given Collection to a DOM structure. |
Element |
writeCostMatrixOld(Element parent,
Object o,
String name)
adds the given CostMatrix (old) to a DOM structure. |
Element |
writeDefaultListModel(Element parent,
Object o,
String name)
adds the given DefaultListModel to a DOM structure. |
Element |
writeMap(Element parent,
Object o,
String name)
adds the given Map to a DOM structure. |
Element |
writeMatrix(Element parent,
Object o,
String name)
adds the given Matrix to a DOM structure. |
Element |
writeMatrixOld(Element parent,
Object o,
String name)
adds the given Matrix (old) to a DOM structure. |
| Methods inherited from class weka.core.xml.XMLSerialization |
|---|
fromXML, getVersion, main, read, read, read, read, readBooleanFromXML, readByteFromXML, readCharFromXML, readDoubleFromXML, readFloatFromXML, readFromXML, readFromXML, readIntFromXML, readLongFromXML, readShortFromXML, toXML, write, write, write, write, writeToXML |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VAL_MAPPING
public static final String VAL_KEY
public static final String VAL_VALUE
public static final String VAL_CELLS
| Constructor Detail |
|---|
public XMLBasicSerialization()
throws Exception
Exception - if initialization fails| Method Detail |
|---|
public void clear()
throws Exception
clear in class XMLSerializationException - if initializing fails
public Element writeDefaultListModel(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 object
Exception - if the DOM creation failsDefaultListModel
public Object readDefaultListModel(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsDefaultListModel
public Element writeCollection(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 object
Exception - if the DOM creation failsCollection
public Object readCollection(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsCollection
public Element writeMap(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 object
Exception - if the DOM creation failsMap
public Object readMap(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsMap
public Element writeMatrix(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 object
Exception - if the DOM creation failsMatrix
public Object readMatrix(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsMatrix
public Element writeMatrixOld(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 object
Exception - if the DOM creation failsMatrix
public Object readMatrixOld(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsMatrix
public Element writeCostMatrixOld(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 object
Exception - if the DOM creation failsCostMatrix
public Object readCostMatrixOld(Element node)
throws Exception
node - the associated XML node
Exception - if instantiation failsCostMatrixpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class XMLSerialization
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||