gate.yam.translate
Class TreeTranslator

java.lang.Object
  extended by gate.yam.translate.AbstractTranslator
      extended by gate.yam.translate.TreeTranslator
All Implemented Interfaces:
TranslationConstants

public class TreeTranslator
extends AbstractTranslator

This class prints the parse tree for a YAM document. It is intended for testing and debugging.

Author:
Hamish Cunningham

Field Summary
 
Fields inherited from class gate.yam.translate.AbstractTranslator
translatorType
 
Fields inherited from interface gate.yam.translate.TranslationConstants
CONSTANTEND, CONSTANTNAME, CONSTANTSTART
 
Constructor Summary
TreeTranslator()
          Construction.
 
Method Summary
 String[][] getConstantsTable()
          Array mapping node type name to start/end strings.
 String getPreamblePath()
          Get the path to the preamble resource.
 Object[][] getPredicatesTable()
          Array mapping predicate type name to attributes.
 void processURLs(SimpleNode node)
          Process URLs and Anchors.
 Writer translate()
          Translation.
 void traverse(String prefix, SimpleNode node)
          Traverse a subtree.
 
Methods inherited from class gate.yam.translate.AbstractTranslator
addToFooter, getConstantEnd, getConstantStart, makeContents, makePreamble, printEndNotes, printTree, printTree, printTree, setIOHandler, setParseTree, setWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeTranslator

public TreeTranslator()
Construction.

Method Detail

getPreamblePath

public String getPreamblePath()
Get the path to the preamble resource.


getConstantsTable

public String[][] getConstantsTable()
Array mapping node type name to start/end strings. Unused for trees.


getPredicatesTable

public Object[][] getPredicatesTable()
Array mapping predicate type name to attributes. Unused for trees.


translate

public Writer translate()
                 throws gate.util.GateException
Translation. Results are written to the Writer.

Overrides:
translate in class AbstractTranslator
Throws:
gate.util.GateException

traverse

public void traverse(String prefix,
                     SimpleNode node)
              throws gate.util.GateException
Traverse a subtree.

Throws:
gate.util.GateException

processURLs

public void processURLs(SimpleNode node)
                 throws gate.util.GateException
Process URLs and Anchors.

Specified by:
processURLs in class AbstractTranslator
Throws:
gate.util.GateException