|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.doxia.sink.AbstractSink
org.apache.maven.doxia.sink.SinkAdapter
org.apache.maven.doxia.sink.AbstractXmlSink
org.apache.maven.doxia.module.fo.FoSink
org.apache.maven.doxia.module.fo.FoAggregateSink
public class FoAggregateSink
A Doxia Sink that produces an aggregated FO model. The usage is similar to the following:
FoAggregateSink sink = new FoAggregateSink( writer ); sink.setDocumentModel( documentModel ); sink.beginDocument(); sink.coverPage(); sink.toc(); ... sink.endDocument();Note: the documentModel object contains several document metadata, but only a few of them are used in this sink (i.e. author, confidential, date and title), the others are ignored.
| Field Summary | |
|---|---|
static int |
TOC_END
Table Of Content at the end of the document. |
static int |
TOC_NONE
No Table Of Content. |
static int |
TOC_START
Table Of Content at the start of the document. |
| Fields inherited from class org.apache.maven.doxia.module.fo.FoSink |
|---|
warnMessages |
| Fields inherited from interface org.apache.maven.doxia.module.fo.FoMarkup |
|---|
BASIC_LINK_TAG, BLOCK_TAG, BOOKMARK_TAG, BOOKMARK_TITLE_TAG, BOOKMARK_TREE_TAG, FLOW_TAG, FO_NAMESPACE, INLINE_TAG, LAYOUT_MASTER_SET_TAG, LEADER_TAG, LIST_BLOCK_TAG, LIST_ITEM_BODY_TAG, LIST_ITEM_LABEL_TAG, LIST_ITEM_TAG, PAGE_NUMBER_CITATION_TAG, PAGE_NUMBER_TAG, PAGE_SEQUENCE_TAG, REGION_AFTER_TAG, REGION_BEFORE_TAG, REGION_BODY_TAG, ROOT_TAG, SIMPLE_PAGE_MASTER_TAG, STATIC_CONTENT_TAG, TABLE_AND_CAPTION_TAG, TABLE_BODY_TAG, TABLE_CAPTION_TAG, TABLE_CELL_TAG, TABLE_COLUMN_TAG, TABLE_ROW_TAG, TABLE_TAG |
| Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup |
|---|
BANG, CDATA, DOCTYPE_START, ENTITY_START, XML_NAMESPACE |
| Fields inherited from interface org.apache.maven.doxia.markup.Markup |
|---|
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR |
| Fields inherited from interface org.apache.maven.doxia.sink.Sink |
|---|
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NUMBERING_DECIMAL, NUMBERING_LOWER_ALPHA, NUMBERING_LOWER_ROMAN, NUMBERING_UPPER_ALPHA, NUMBERING_UPPER_ROMAN, ROLE, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5 |
| Constructor Summary | |
|---|---|
FoAggregateSink(Writer writer)
Constructor. |
|
| Method Summary | |
|---|---|
void |
anchor(String name)
|
void |
anchor(String name,
SinkEventAttributes attributes)
|
void |
author_()
|
void |
author()
|
void |
author(SinkEventAttributes attributes)
|
void |
body_()
|
void |
body()
|
void |
body(SinkEventAttributes attributes)
|
protected void |
chapterHeading(String headerText,
boolean chapterNumber)
Writes a chapter heading. Writes a chapter heading. |
protected void |
content(String text)
Writes content, escaping special characters. Writes content, escaping special characters. |
void |
coverPage()
Writes a cover page. |
void |
date_()
|
void |
date()
|
void |
date(SinkEventAttributes attributes)
|
void |
figureGraphics(String name)
|
void |
figureGraphics(String src,
SinkEventAttributes attributes)
|
protected String |
getChapterString()
Returns the current chapter number as a string. Returns the current chapter number as a string. |
protected String |
getFooterText()
Returns the text to write in the footer of each page. |
protected String |
getHeaderText()
Returns the text to write in the header of each page. |
void |
head_()
|
void |
head()
|
void |
head(SinkEventAttributes attributes)
|
void |
link(String name)
|
void |
link(String name,
SinkEventAttributes attributes)
|
protected void |
newline()
Writes EOL. |
protected void |
pdfBookmarks()
Writes a fo:bookmark-tree. Writes a fo:bookmark-tree. |
protected void |
regionAfter(String footerText)
Writes a 'xsl-region-after' block. Writes a 'xsl-region-after' block. |
protected void |
regionBefore(String headerText)
Writes a 'xsl-region-before' block. Writes a 'xsl-region-before' block. |
void |
setDocumentModel(DocumentModel model)
Sets the DocumentModel to be used by this sink. |
void |
setDocumentModel(DocumentModel model,
int tocPos)
Sets the DocumentModel to be used by this sink. |
void |
setDocumentName(String name)
Sets the name of the current source document, relative to the source root. |
void |
setDocumentTitle(String title)
Sets the title of the current document. |
protected void |
startPageSequence(String headerText,
String footerText)
Starts a page sequence, depending on the current chapter. |
void |
title_()
|
void |
title()
|
void |
title(SinkEventAttributes attributes)
|
void |
toc()
Writes a table of contents. |
protected void |
write(String text)
Writes a text, swallowing any exceptions. Writes a text, swallowing any exceptions. |
protected void |
writeEmptyTag(HTML.Tag tag,
String attributeId)
Writes a simple tag, appending EOL. Writes a simple tag, appending EOL. |
protected void |
writeEndTag(HTML.Tag t)
Writes an end tag, appending EOL. |
protected void |
writeln(String text)
Writes a text, appending EOL. Writes a text, appending EOL. |
protected void |
writeStartTag(HTML.Tag tag,
String attributeId)
Writes a start tag, prepending EOL. Writes a start tag, prepending EOL. |
protected void |
writeStartTag(HTML.Tag tag,
String id,
String name)
Writes a start tag, prepending EOL. Writes a start tag, prepending EOL. |
| Methods inherited from class org.apache.maven.doxia.sink.AbstractXmlSink |
|---|
getNameSpace, setNameSpace, writeEOL, writeSimpleTag, writeSimpleTag, writeStartTag, writeStartTag |
| Methods inherited from class org.apache.maven.doxia.sink.AbstractSink |
|---|
enableLogging, getLog, unifyEOLs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int TOC_NONE
setDocumentModel(DocumentModel, int)public static int TOC_START
setDocumentModel(DocumentModel, int)public static int TOC_END
setDocumentModel(DocumentModel, int)| Constructor Detail |
|---|
public FoAggregateSink(Writer writer)
writer - The writer for writing the result.| Method Detail |
|---|
public void head()
head in interface Sinkhead in class FoSinkpublic void head(SinkEventAttributes attributes)
head in interface Sinkhead in class FoSinkpublic void head_()
head_ in interface Sinkhead_ in class FoSinkpublic void title()
title in interface Sinktitle in class FoSinkpublic void title(SinkEventAttributes attributes)
title in interface Sinktitle in class FoSinkpublic void title_()
title_ in interface Sinktitle_ in class FoSinkpublic void author()
author in interface Sinkauthor in class FoSinkpublic void author(SinkEventAttributes attributes)
author in interface Sinkauthor in class FoSinkpublic void author_()
author_ in interface Sinkauthor_ in class FoSinkpublic void date()
date in interface Sinkdate in class FoSinkpublic void date(SinkEventAttributes attributes)
date in interface Sinkdate in class FoSinkpublic void date_()
date_ in interface Sinkdate_ in class FoSinkpublic void body()
body in interface Sinkbody in class FoSinkpublic void body(SinkEventAttributes attributes)
body in interface Sinkbody in class FoSinkpublic void body_()
body_ in interface Sinkbody_ in class FoSinkpublic void setDocumentTitle(String title)
title - the title of the current document.public void setDocumentName(String name)
name - the name for the current document.public void setDocumentModel(DocumentModel model)
model - the DocumentModel.#setDocumentModel(DocumentModel, String),
TOC_START
public void setDocumentModel(DocumentModel model,
int tocPos)
model - the DocumentModel, could be null.tocPos - should be one of these values: TOC_NONE, TOC_START and TOC_END.public void figureGraphics(String name)
figureGraphics in interface SinkfigureGraphics in class FoSink
public void figureGraphics(String src,
SinkEventAttributes attributes)
figureGraphics in interface SinkfigureGraphics in class FoSinkpublic void anchor(String name)
anchor in interface Sinkanchor in class FoSink
public void anchor(String name,
SinkEventAttributes attributes)
anchor in interface Sinkanchor in class FoSinkpublic void link(String name)
link in interface Sinklink in class FoSink
public void link(String name,
SinkEventAttributes attributes)
link in interface Sinklink in class FoSink
protected void writeStartTag(HTML.Tag tag,
String attributeId)
writeStartTag in class FoSinktag - The tag.attributeId - An id identifying the attribute set.
protected void writeStartTag(HTML.Tag tag,
String id,
String name)
writeStartTag in class FoSinktag - The tag.id - An id to add.name - The name (value) of the id.protected void writeEndTag(HTML.Tag t)
writeEndTag in class FoSink
protected void writeEmptyTag(HTML.Tag tag,
String attributeId)
writeEmptyTag in class FoSinktag - The tag name.attributeId - An id identifying the attribute set.protected void write(String text)
write in class FoSinkprotected void writeln(String text)
writeln in class FoSinktext - The text to write.protected void content(String text)
content in class FoSinktext - The text to write.protected void newline()
protected void startPageSequence(String headerText,
String footerText)
headerText - The text to write in the header, if null, nothing is written.footerText - The text to write in the footer, if null, nothing is written.protected String getHeaderText()
protected String getFooterText()
protected String getChapterString()
getChapterString in class FoSinkprotected void regionBefore(String headerText)
regionBefore in class FoSinkheaderText - The text to write in the header, if null, nothing is written.protected void regionAfter(String footerText)
regionAfter in class FoSinkfooterText - The text to write in the footer, if null, nothing is written.
protected void chapterHeading(String headerText,
boolean chapterNumber)
chapterHeading in class FoSinkheaderText - The text to write in the header, if null, the current document title is written.chapterNumber - True if the chapter number should be written in front of the text.public void toc()
protected void pdfBookmarks()
pdfBookmarks in class FoSinkpublic void coverPage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||