|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttextmaven.application.analyzer.annotator.HTMLWriter
This class generates a HTML file. The file is eventually generated by calls to writeHTMLHeader, several write and writeHTMLFooter calls. It will typically contain the basic text which is converted to HTML.
The method write(String,String)
writes the word specified in the first parameter to the output file,
basically hyperlinking it to a anchor specified by the second parameter within the translation frame.
Constructor Summary | |
HTMLWriter()
Standard constructor |
|
HTMLWriter(java.io.PrintWriter out,
java.lang.String vocabFrameName,
java.lang.String vocabFileName)
Constructor |
Method Summary | |
java.net.URL |
getResourceDir()
|
java.io.PrintWriter |
getTextWriter()
|
java.lang.String |
getVocabFileName()
|
java.lang.String |
getVocabFrameName()
|
void |
setResourceDir(java.net.URL resourceDir)
|
void |
setTextWriter(java.io.PrintWriter textOut)
|
void |
setVocabFileName(java.lang.String vocabFileName)
|
void |
setVocabFrameName(java.lang.String vocabFrameName)
|
void |
write(java.lang.String str)
Writes specified string to HTML file |
void |
write(java.lang.String word,
java.lang.String linkTarget)
Writes word to HTML file. |
void |
writeAnchor(int id)
Writes bookmark link and anchor. |
void |
writeHTMLFooter()
Writes footer to HTML file |
void |
writeHTMLHeader()
Writes header to HTML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTMLWriter()
public HTMLWriter(java.io.PrintWriter out, java.lang.String vocabFrameName, java.lang.String vocabFileName)
out
- writer into which HTML text is writtenvocabFrameName
- name of vocabulary framevocabFileName
- vocabulary file nameMethod Detail |
public void writeHTMLHeader()
public void writeHTMLFooter()
public void write(java.lang.String str)
str
- string to be printedpublic void write(java.lang.String word, java.lang.String linkTarget)
word
- word to writelinkTarget
- linktarget to be used as anchor in vocab framepublic void writeAnchor(int id)
id
- bookmark anchorpublic java.io.PrintWriter getTextWriter()
public void setTextWriter(java.io.PrintWriter textOut)
textOut
- The writer to set.public java.net.URL getResourceDir()
public void setResourceDir(java.net.URL resourceDir) throws java.net.MalformedURLException
resourceDir
- The resourceDir to set.
java.net.MalformedURLException
public java.lang.String getVocabFileName()
public void setVocabFileName(java.lang.String vocabFileName)
vocabFileName
- The vocabFileName to set.public java.lang.String getVocabFrameName()
public void setVocabFrameName(java.lang.String vocabFrameName)
vocabFrameName
- The vocabFrameName to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |