softparsmap
Interface TreeParser

All Known Implementing Classes:
AbstractTreeParser

public interface TreeParser

This interface is used to parse in and out trees. In order to define your own parser you can extend the class AbstractTreeParser and make the necessary changes in your property file.


Method Summary
 Node parseIn(java.io.InputStream tree)
          Returns the root of the parsed tree.
 void parseIn(Node tree, java.io.InputStream treeInfo)
          Adding information to the existing tree.
 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 parseOut(java.io.OutputStream outputStream, Node tree)
          This method will parse out the tree to the output stream.
 

Method Detail

parseIn

public Node parseIn(java.io.InputStream tree)
Returns the root of the parsed tree. The tree is parsed from a input stream.

Parameters:
tree - is the input stream from which the tree is parsed
Returns:
the root of the parsed tree
See Also:
Node

parseIn

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

Parameters:
tree - is the string from which the tree is parsed
Returns:
the root of the parsed tree
See Also:
Node

parseIn

public void parseIn(Node tree,
                    java.io.InputStream treeInfo)
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.

Parameters:
tree - is the existing tree.
treeInfo - is a stream in a tree format containing the information to be added.

parseIn

public void parseIn(Node tree,
                    java.lang.String treeInfo)
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.

Parameters:
tree - is the existing tree.
treeInfo - is a string in a tree format containing the information to be added.

parseOut

public void parseOut(java.io.OutputStream outputStream,
                     Node tree)
This method will parse out the tree to the output stream.

Parameters:
outputStream - is the stream to which the tree will be parsed out to.
tree - is the tree that are parsed out
See Also:
Node

parseOut

public java.lang.String parseOut(Node tree)
This method will parse out the tree to a string.

Parameters:
tree - is the tree that is parsed out
See Also:
Node