softparsmap
Class AbstractTreeParser

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

public abstract class AbstractTreeParser
extends LinkedTagInstance
implements TreeParser

Extending this class will facilitate creating a tag instance that is needed for any class to be installed and used by the property file.


Constructor Summary
AbstractTreeParser()
           
 
Method Summary
 java.lang.String getCharset()
          Returns the name of the encoding.
 PropertyFile getPropertyFile()
          Returns the property file.
 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.
abstract  void parseIn(Node tree, java.lang.String treeInfo)
          Adding information to the existing tree.
abstract  Node parseIn(java.lang.String tree)
          Returns the root of the parsed tree.
abstract  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.
 
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, setupInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTreeParser

public AbstractTreeParser()
Method Detail

getPropertyFile

public PropertyFile getPropertyFile()
Returns the property file.

Returns:
the property file
See Also:
PropertyFile

getCharset

public java.lang.String getCharset()
Returns the name of the encoding. Defined in attribute 'encoding'.

Returns:
the name of the encoding

parseIn

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

Specified by:
parseIn in interface TreeParser
Parameters:
tree - is the input stream 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)
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
Parameters:
tree - is the existing tree.
treeInfo - is a stream in a tree format containing the information to be added.

parseOut

public void parseOut(java.io.OutputStream outputStream,
                     Node tree)
Description copied from interface: TreeParser
This method will parse out the tree to the output stream.

Specified by:
parseOut in interface TreeParser
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

parseIn

public abstract 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
Parameters:
tree - is the string from which the tree is parsed
Returns:
the root of the parsed tree
See Also:
Node

parseIn

public abstract 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
Parameters:
tree - is the existing tree.
treeInfo - is a string in a tree format containing the information to be added.

parseOut

public abstract 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
Parameters:
tree - is the tree that is parsed out
See Also:
Node