org.licas.parsers.sci

## Class KD_TreeNodeParser

- java.lang.Object
- - org.licas.parsers.sci.TreeNodeParser
  - - org.licas.parsers.sci.KD_TreeNodeParser

- All Implemented Interfaces:
    org.ai_heuristic.def.ParserDef

      public class KD_TreeNodeParser
      extends TreeNodeParser

  This can be used to parse a `KD_TreeNode` node in a tree structure, although the root tree node is parsed using `KD_TreeParser`. Note that only the structure is parsed. Any stored value is cast only to a String.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KD_TreeNodeParser()` Create a new instance of KD_TreeNodeParser

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.ai_heuristic.tree.TreeNode` | `parse(org.licas_xml.abs.Element toParse)` Parse the XML element back into a TreeNode object.
    `org.licas_xml.abs.Element` | `serialize(org.ai_heuristic.tree.KD_TreeNode treeNode)` Serialize the object into an XML element.
    `org.licas_xml.abs.Element` | `serialize(java.lang.Object toSerialize)` Serialize the object into an XML element.

    - ### Methods inherited from class org.licas.parsers.sci.TreeNodeParser

      `serialize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KD_TreeNodeParser

          public KD_TreeNodeParser()

      Create a new instance of KD_TreeNodeParser

  - ### Method Detail

    - #### serialize

          public org.licas_xml.abs.Element serialize(java.lang.Object toSerialize)
                                              throws java.lang.Exception

      Serialize the object into an XML element.
      Specified by:
        `serialize` in interface `org.ai_heuristic.def.ParserDef`
      Overrides:
        `serialize` in class `TreeNodeParser`
      Parameters:
        `toSerialize` - the object to serialize. Of type `TreeNode`.
      Returns:
        the serialized object.
      Throws:
        `java.lang.Exception` - any error.

    - #### serialize

          public org.licas_xml.abs.Element serialize(org.ai_heuristic.tree.KD_TreeNode treeNode)
                                              throws java.lang.Exception

      Serialize the object into an XML element.
      Parameters:
        `treeNode` - the node to serialize.
      Returns:
        the serialized object.
      Throws:
        `java.lang.Exception` - any error.

    - #### parse

          public org.ai_heuristic.tree.TreeNode parse(org.licas_xml.abs.Element toParse)
                                               throws java.lang.Exception

      Parse the XML element back into a TreeNode object.
      Specified by:
        `parse` in interface `org.ai_heuristic.def.ParserDef`
      Overrides:
        `parse` in class `TreeNodeParser`
      Parameters:
        `toParse` - the element to parse.
      Returns:
        the parsed tree node.
      Throws:
        `java.lang.Exception` - any error.