程序包 weka.core.xml

类 XMLBasicSerialization

java.lang.Object
weka.core.xml.XMLSerialization
weka.core.xml.XMLBasicSerialization
所有已实现的接口:
RevisionHandler
直接已知子类:
XMLBeans, XMLClassifier, XMLExperiment

public class XMLBasicSerialization extends XMLSerialization
This serializer contains some read/write methods for common classes that are not beans-conform. Currently supported are:
  • java.util.HashMap
  • java.util.HashSet
  • java.util.Hashtable
  • java.util.LinkedList
  • java.util.Properties
  • java.util.Stack
  • java.util.TreeMap
  • java.util.TreeSet
  • java.util.Vector
  • javax.swing.DefaultListModel
Weka classes:
  • weka.core.Matrix
  • weka.core.matrix.Matrix
版本:
$Revision: 1.6 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
  • 字段详细资料

    • VAL_MAPPING

      public static final String VAL_MAPPING
      the value for mapping, e.g., Maps
      另请参阅:
    • VAL_KEY

      public static final String VAL_KEY
      the value for a mapping-key, e.g., Maps
      另请参阅:
    • VAL_VALUE

      public static final String VAL_VALUE
      the value for mapping-value, e.g., Maps
      另请参阅:
    • VAL_CELLS

      public static final String VAL_CELLS
      the matrix cells
      另请参阅:
  • 构造器详细资料

    • XMLBasicSerialization

      public XMLBasicSerialization() throws Exception
      initializes the serialization
      抛出:
      Exception - if initialization fails
  • 方法详细资料

    • clear

      public void clear() throws Exception
      generates internally a new XML document and clears also the IgnoreList and the mappings for the Read/Write-Methods
      覆盖:
      clear 在类中 XMLSerialization
      抛出:
      Exception - if initializing fails
    • writeDefaultListModel

      public Element writeDefaultListModel(Element parent, Object o, String name) throws Exception
      adds the given DefaultListModel to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readDefaultListModel

      public Object readDefaultListModel(Element node) throws Exception
      builds the DefaultListModel from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • writeCollection

      public Element writeCollection(Element parent, Object o, String name) throws Exception
      adds the given Collection to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readCollection

      public Object readCollection(Element node) throws Exception
      builds the Collection from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • writeMap

      public Element writeMap(Element parent, Object o, String name) throws Exception
      adds the given Map to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readMap

      public Object readMap(Element node) throws Exception
      builds the Map from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • writeMatrix

      public Element writeMatrix(Element parent, Object o, String name) throws Exception
      adds the given Matrix to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readMatrix

      public Object readMatrix(Element node) throws Exception
      builds the Matrix from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • writeMatrixOld

      public Element writeMatrixOld(Element parent, Object o, String name) throws Exception
      adds the given Matrix (old) to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readMatrixOld

      public Object readMatrixOld(Element node) throws Exception
      builds the Matrix (old) from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • writeCostMatrixOld

      public Element writeCostMatrixOld(Element parent, Object o, String name) throws Exception
      adds the given CostMatrix (old) to a DOM structure.
      参数:
      parent - the parent of this object, e.g. the class this object is a member of
      o - the Object to describe in XML
      name - the name of the object
      返回:
      the node that was created
      抛出:
      Exception - if the DOM creation fails
      另请参阅:
    • readCostMatrixOld

      public Object readCostMatrixOld(Element node) throws Exception
      builds the Matrix (old) from the given DOM node.
      参数:
      node - the associated XML node
      返回:
      the instance created from the XML description
      抛出:
      Exception - if instantiation fails
      另请参阅:
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 XMLSerialization
      返回:
      the revision