|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.yam.translate.AbstractTranslator
public abstract class AbstractTranslator
This class provides a model for YAM translators. It is intended to be extended by all translators.
Field Summary | |
---|---|
static String |
translatorType
Type of the translator - "Html", for example. |
Fields inherited from interface gate.yam.translate.TranslationConstants |
---|
CONSTANTEND, CONSTANTNAME, CONSTANTSTART |
Constructor Summary | |
---|---|
AbstractTranslator()
|
Method Summary | |
---|---|
void |
addToFooter(String footerAddition)
Material to insert at the end of the translation. |
String |
getConstantEnd(String name)
Get the markup end element of a constant from the constants map. |
String |
getConstantStart(String name)
Get the markup start element of a constant from the constants map. |
void |
makeContents()
Collect contents and set heading bodies. |
void |
makePreamble()
Deal with the preamble material (and title if it exists). |
void |
printEndNotes()
Print end notes. |
void |
printTree(SimpleNode node)
Traverse (and translate) a subtree. |
void |
printTree(SimpleNode node,
boolean inContents)
Traverse (and translate) a subtree. |
void |
printTree(SimpleNode node,
boolean inContents,
SimpleNode nextNode)
Traverse (and translate) a subtree. |
abstract void |
processURLs(SimpleNode node)
Process URLs and Anchors. |
void |
setIOHandler(IOHandler ioh)
Set the translator's IOHandler. |
void |
setParseTree(YamParseTree parseTree)
Set the tree holding the results of a YAM parse. |
void |
setWriter(Writer writer)
Set the Writer for translation results. |
Writer |
translate()
Translation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.yam.translate.TranslationConstants |
---|
getConstantsTable, getPreamblePath, getPredicatesTable |
Field Detail |
---|
public static String translatorType
Constructor Detail |
---|
public AbstractTranslator()
Method Detail |
---|
public void setParseTree(YamParseTree parseTree)
public String getConstantStart(String name)
name
- The name of the constant.public String getConstantEnd(String name)
name
- The name of the constant.public Writer translate() throws gate.util.GateException
gate.util.GateException
public void printTree(SimpleNode node) throws gate.util.GateException
gate.util.GateException
public void printTree(SimpleNode node, boolean inContents) throws gate.util.GateException
gate.util.GateException
public void printTree(SimpleNode node, boolean inContents, SimpleNode nextNode) throws gate.util.GateException
gate.util.GateException
public abstract void processURLs(SimpleNode node) throws gate.util.GateException
gate.util.GateException
public void printEndNotes() throws gate.util.GateException
gate.util.GateException
public void addToFooter(String footerAddition)
public void makeContents() throws gate.util.GateException
gate.util.GateException
public void makePreamble() throws gate.util.GateException
gate.util.GateException
public void setWriter(Writer writer)
public void setIOHandler(IOHandler ioh)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |