softparsmap
Class TreeParserNewick

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

public class TreeParserNewick
extends AbstractTreeParser

This parser will parse the Newick format. It is flexible within limits, See the def.xml file for more information.


Constructor Summary
TreeParserNewick()
           
 
Method Summary
 EdgeType getEdgeType()
          Returns the edge type that exists in the 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 setEdgeType(EdgeType edgeType)
           
 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

TreeParserNewick

public TreeParserNewick()
Method Detail

setupInstance

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

Overrides:
setupInstance in class LinkedTagInstance

getEdgeType

public EdgeType getEdgeType()
Returns the edge type that exists in the tree. It is defined by the attribute 'edge_type' in the tag.

Returns:
an edge type
See Also:
EdgeType

setEdgeType

public void setEdgeType(EdgeType edgeType)

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

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

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