|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.plugin.html.Start
public class Start
Main line for HTML plugin. Error-handling convention: Output plugins handle all their own errors. Platypus is made aware of a problem only by the value returned from calling process(). However, it does not issue any user message(s) as a result of this.
Field Summary | |
---|---|
private HtmlCommandTable |
commandTable
the command table indexed by command root |
private HtmlData |
htmlData
contains state data for the pdf file |
private HtmlOutfile |
outfile
the outputfile we write to |
private PdfSymbolsTable |
symbolsTable
the symbols table indexed by root |
Constructor Summary | |
---|---|
Start()
Start() is always called first by Platypus, followed by a call to process() Any plugin initialization code should go in here. |
|
Start(HtmlOutfile newOutfile,
HtmlCommandTable newCommandTable)
Constructor that is only ever used in unit testing |
Method Summary | |
---|---|
private void |
errMsgUnrecognizedCommand(Token tok,
GDD gdd)
Output error message to logger for unrecognized command |
private java.lang.String |
escapeSpecialChars(java.lang.String s)
|
(package private) boolean |
isNextTokenCr(int currTokNumber,
TokenList tokList)
Determines if the next token in the token list is the command [cr] |
void |
process(GDD gdd,
CommandLineArgs clArgs)
This is the main line of the plug-in. |
(package private) void |
processCommand(Token tok,
HtmlData htmlData,
int tokNum)
Principal method for implementing command tokens |
(package private) int |
processCompoundCommand(GDD gdd,
int startTokNumber)
Handle compount commands. |
(package private) void |
processMacro()
|
(package private) void |
processSymbol(GDD gdd,
java.lang.String filename,
Token tok,
int tokNum,
HtmlData pdd)
Process a symbol or foreign character |
(package private) void |
processText(GDD gdd,
java.lang.String filename,
java.lang.String text)
Process a token consisting of a text item |
void |
processTokens(GDD gdd,
HtmlData htmlData,
java.lang.String outfileName)
Where the token stream is translated into text and actions. |
(package private) void |
setUpDataItems(GDD gdd)
set up various data items needed in processing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private HtmlData htmlData
private HtmlOutfile outfile
private HtmlCommandTable commandTable
private PdfSymbolsTable symbolsTable
Constructor Detail |
---|
public Start(HtmlOutfile newOutfile, HtmlCommandTable newCommandTable)
newOutfile
- the outfile for this HTMLnewCommandTable
- command table for this HTMLpublic Start()
Method Detail |
---|
public void process(GDD gdd, CommandLineArgs clArgs)
process
in interface IPlugin
gdd
- The Global Document DataclArgs
- command-line arguments in a hash map (key = argument, value = parameters)void setUpDataItems(GDD gdd)
gdd
- the GDDpublic void processTokens(GDD gdd, HtmlData htmlData, java.lang.String outfileName) throws java.io.IOException
gdd
- the GDD. Only the literals are usedhtmlData
- state info about the HTML fileoutfileName
- the file being written to
java.io.IOException
- in the event the file can't be written toboolean isNextTokenCr(int currTokNumber, TokenList tokList)
currTokNumber
- the number of the current tokentokList
- the list of tokens
void processCommand(Token tok, HtmlData htmlData, int tokNum)
tok
- command token to processhtmlData
- document state datatokNum
- the number of the token in the token listprivate void errMsgUnrecognizedCommand(Token tok, GDD gdd)
tok
- the command tokengdd
- the GDDint processCompoundCommand(GDD gdd, int startTokNumber)
gdd
- the GDDstartTokNumber
- the number of the opening token in the compound command
void processMacro()
void processSymbol(GDD gdd, java.lang.String filename, Token tok, int tokNum, HtmlData pdd) throws java.io.IOException
gdd
- the GDDfilename
- name of the output file (in the event the output file is not open yet)tok
- the Token containing the symbol infotokNum
- the number of the tokenpdd
- the HTML document data
java.io.IOException
- if any error occurredvoid processText(GDD gdd, java.lang.String filename, java.lang.String text) throws java.io.IOException
gdd
- the GDDfilename
- name of the output file (in the event the output file is not open yettext
- the text to output
java.io.IOException
- if any error occurredprivate java.lang.String escapeSpecialChars(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |