softparsmap
Class TreeParserDual

java.lang.Object
  extended byooc.LinkedTagInstance
      extended bysoftparsmap.AbstractTreeParser
          extended bysoftparsmap.TreeParserDual
All Implemented Interfaces:
Dependencies, TreeParser

public class TreeParserDual
extends AbstractTreeParser

This parser uses two complementary parts to parse in and out trees. The tree_structure_parser is parsing the tree structure and calls the node_converter when parsing in or out a node. See the def.xml file for more information.


Constructor Summary
TreeParserDual()
           
 
Method Summary
 void parseIn(Node tree, java.lang.String treeInfo)
          Adding information to the existing tree.
 Node parseIn(java.lang.String tree)
          Returns the root of the parsed tree.
 java.lang.String parseOut(Node tree)
          This method will parse out the tree to a string.
 void setupInstance()
          The default setup method which will be called.
 
Methods inherited from class softparsmap.AbstractTreeParser
getCharset, getPropertyFile, parseIn, parseIn, parseOut
 
Methods inherited from class ooc.LinkedTagInstance
containsKey, get, getAttribute, getAttributeBoolean, getAttributeDouble, getAttributeFloat, getAttributeInteger, getAttributeList, getAttributeRef, getAttributeShort, getAttributeString, getAttributeTag, getChildIterator, getChildIteratorByName, getContainer, getContainerTag, getFirstChildTagByName, getTag, getTagId, getTagInstance, getTagInstance, getTagRef, hasAttributeValue, hasChildTagByName, hasChildTags, hasTag, isMutable, keySet, put, remove, setTag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeParserDual

public TreeParserDual()
Method Detail

setupInstance

public void setupInstance()
Description copied from class: LinkedTagInstance
The default setup method which will be called.

Overrides:
setupInstance in class LinkedTagInstance

parseIn

public Node parseIn(java.lang.String tree)
Description copied from interface: TreeParser
Returns the root of the parsed tree. The tree is parsed from a string.

Specified by:
parseIn in interface TreeParser
Specified by:
parseIn in class AbstractTreeParser

parseIn

public void parseIn(Node tree,
                    java.lang.String treeInfo)
Description copied from interface: TreeParser
Adding information to the existing tree. The parser extracts the node information and adds it to the relevent node by mapping the key to the node information in the relevent node map.

Specified by:
parseIn in interface TreeParser
Specified by:
parseIn in class AbstractTreeParser

parseOut

public java.lang.String parseOut(Node tree)
Description copied from interface: TreeParser
This method will parse out the tree to a string.

Specified by:
parseOut in interface TreeParser
Specified by:
parseOut in class AbstractTreeParser