|
||||||||||
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 java.lang.String |
VAL_CELLS
the matrix cells |
static java.lang.String |
VAL_KEY
the value for a mapping-key, e.g., Maps |
static java.lang.String |
VAL_MAPPING
the value for mapping, e.g., Maps |
static java.lang.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 |
java.lang.Object |
readCollection(org.w3c.dom.Element node)
builds the Collection from the given DOM node. |
java.lang.Object |
readCostMatrixOld(org.w3c.dom.Element node)
builds the Matrix (old) from the given DOM node. |
java.lang.Object |
readDefaultListModel(org.w3c.dom.Element node)
builds the DefaultListModel from the given DOM node. |
java.lang.Object |
readMap(org.w3c.dom.Element node)
builds the Map from the given DOM node. |
java.lang.Object |
readMatrix(org.w3c.dom.Element node)
builds the Matrix from the given DOM node. |
java.lang.Object |
readMatrixOld(org.w3c.dom.Element node)
builds the Matrix (old) from the given DOM node. |
org.w3c.dom.Element |
writeCollection(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given Collection to a DOM structure. |
org.w3c.dom.Element |
writeCostMatrixOld(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given CostMatrix (old) to a DOM structure. |
org.w3c.dom.Element |
writeDefaultListModel(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given DefaultListModel to a DOM structure. |
org.w3c.dom.Element |
writeMap(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given Map to a DOM structure. |
org.w3c.dom.Element |
writeMatrix(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.String name)
adds the given Matrix to a DOM structure. |
org.w3c.dom.Element |
writeMatrixOld(org.w3c.dom.Element parent,
java.lang.Object o,
java.lang.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 java.lang.String VAL_MAPPING
public static final java.lang.String VAL_KEY
public static final java.lang.String VAL_VALUE
public static final java.lang.String VAL_CELLS
Constructor Detail |
---|
public XMLBasicSerialization() throws java.lang.Exception
java.lang.Exception
- if initialization failsMethod Detail |
---|
public void clear() throws java.lang.Exception
clear
in class XMLSerialization
java.lang.Exception
- if initializing failspublic org.w3c.dom.Element writeDefaultListModel(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 object
java.lang.Exception
- if the DOM creation failsDefaultListModel
public java.lang.Object readDefaultListModel(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsDefaultListModel
public org.w3c.dom.Element writeCollection(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 object
java.lang.Exception
- if the DOM creation failsCollection
public java.lang.Object readCollection(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsCollection
public org.w3c.dom.Element writeMap(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 object
java.lang.Exception
- if the DOM creation failsMap
public java.lang.Object readMap(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsMap
public org.w3c.dom.Element writeMatrix(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 object
java.lang.Exception
- if the DOM creation failsMatrix
public java.lang.Object readMatrix(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsMatrix
public org.w3c.dom.Element writeMatrixOld(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 object
java.lang.Exception
- if the DOM creation failsMatrix
public java.lang.Object readMatrixOld(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsMatrix
public org.w3c.dom.Element writeCostMatrixOld(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 object
java.lang.Exception
- if the DOM creation failsCostMatrix
public java.lang.Object readCostMatrixOld(org.w3c.dom.Element node) throws java.lang.Exception
node
- the associated XML node
java.lang.Exception
- if instantiation failsCostMatrix
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |