gate.yam.parse
Class YamParseTree

java.lang.Object
  extended by gate.yam.parse.YamParseTree

public class YamParseTree
extends Object

The parse tree and related state created by parsing a YAM file. Forms the input to YAM translators.

Author:
Hamish Cunningham

Constructor Summary
YamParseTree()
          Construction.
 
Method Summary
 void addHeadingNode(Node headingNode)
          Add a heading node.
 SimpleNode getContentsNode()
          Get the contents node of the tree.
 List getErrors()
          Get the list of errors encountered during parsing.
 List getHeadingNodes()
          Get the list of heading nodes.
 List<String> getIncludes()
          Get the list of includes of other local files made in the YAM source.
 List<String> getLinks()
          Get the list of links to other local files made from the YAM source.
 int getNumNodes(SimpleNode node)
          Count the number of nodes in a (sub)tree.
 SimpleNode getRootNode()
          Get the root node of the tree.
 SimpleNode getTitleNode()
          Get the title node of the tree.
 List getWarnings()
          Get the list of warnings encountered during parsing.
 void merge(YamParseTree other)
          Merge another tree with this one.
 void reset()
          Reset the output strings on all nodes in the tree.
 void setContentsNode(Node contentsNode)
          Set the contents node of the tree.
 void setRootNode(Node rootNode)
          Set the root node of the tree.
 void setTitleNode(Node titleNode)
          Set the title node of the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamParseTree

public YamParseTree()
Construction.

Method Detail

getRootNode

public SimpleNode getRootNode()
Get the root node of the tree.


setRootNode

public void setRootNode(Node rootNode)
Set the root node of the tree.


getTitleNode

public SimpleNode getTitleNode()
Get the title node of the tree.


setTitleNode

public void setTitleNode(Node titleNode)
Set the title node of the tree.


getContentsNode

public SimpleNode getContentsNode()
Get the contents node of the tree.


setContentsNode

public void setContentsNode(Node contentsNode)
Set the contents node of the tree.


getHeadingNodes

public List getHeadingNodes()
Get the list of heading nodes.


addHeadingNode

public void addHeadingNode(Node headingNode)
Add a heading node.


getErrors

public List getErrors()
Get the list of errors encountered during parsing.


getWarnings

public List getWarnings()
Get the list of warnings encountered during parsing.


reset

public void reset()
Reset the output strings on all nodes in the tree.


getNumNodes

public int getNumNodes(SimpleNode node)
Count the number of nodes in a (sub)tree.


merge

public void merge(YamParseTree other)
Merge another tree with this one. It is assumed that the other tree is subsequent to this one.


getLinks

public List<String> getLinks()
Get the list of links to other local files made from the YAM source. These will always be relative links.


getIncludes

public List<String> getIncludes()
Get the list of includes of other local files made in the YAM source.