org.apache.maven.doxia.sink

Interface Sink

public interface Sink

A Sink consumes Doxia events in a resultant output format like Docbook, PDF, or XHTML.

Doxia allows you to parse any supported input document format (ie for which a parser exists) and generate any supported output document format (ie for which a sink exists).

The upshot is that you can parse any front-end format, the parser is responsible for emitting the standard Doxia events which can then be consumed by any Doxia Sink. This is what allow us to parse the front- end format like APT, FML, and Xdoc for the Maven site plugin and have them all contribute to the final XHTML version of a site. All documents being parsed results in a stream of Doxia events (paragraph, bold, italic, text) which are then fed in the XHTML sink which results in a set of XHTML pages.

A sink is ultimately responsible for the final format and structure. So, for example, you can take a series of APT documents and have that be fed into a Sink which makes a single PDF, a book, a site, or a Word document. The Sink is fully responsible for the final output. Once you have Doxia events you can leverage any existing Sink. So if you wanted to integrate your custom XML format, or custom Wiki format, you would create a Doxia parser which could then be fed into any Sink to produce your desired final output.

Since: 1.0

Version: $Id: Sink.java 566748 2007-08-16 15:24:39Z ltheussl $

Author: Jason van Zyl Vincent Siveton

Field Summary
intNUMBERING_DECIMAL
A numbering to handle a number list.
intNUMBERING_LOWER_ALPHA
A numbering to handle a lower alpha list.
intNUMBERING_LOWER_ROMAN
A numbering to handle a lower roman list.
intNUMBERING_UPPER_ALPHA
A numbering to handle a upper alpha list.
intNUMBERING_UPPER_ROMAN
A numbering to handle a upper roman list.
StringROLE
The Plexus Sink Role
intSECTION_LEVEL_1
A level 1 section (section).
intSECTION_LEVEL_2
A level 2 section (subsection).
intSECTION_LEVEL_3
A level 3 section (sub-subsection).
intSECTION_LEVEL_4
A level 4 section (sub-sub-subsection).
intSECTION_LEVEL_5
A level 5 section (sub-sub-sub-subsection).
Method Summary
voidanchor(String name)
Starting an element which defines an anchor.
voidanchor_()
Ending an anchor element.
voidauthor()
Starting the author element which is used to identify the author of the document.
voidauthor_()
Ending the author element.
voidbody()
Starting the body of a document which contains the document's content.
voidbody_()
Ending the body element.
voidbold()
Starting a bold element.
voidbold_()
Ending a bold element.
voidclose()
Close the writer or the stream, if needed.
voiddate()
Starting the date element which is used to identify the date of the document.
voiddate_()
Ending the date element.
voiddefinedTerm()
Starting a definition term element within a definition list.
voiddefinedTerm_()
Starting a definition term element within a definition list.
voiddefinition()
Starting a definition element within a definition list.
voiddefinitionList()
Starting a definition list element.
voiddefinitionListItem()
Starting a list item element within a definition list.
voiddefinitionListItem_()
Ending a list item element within a definition list.
voiddefinitionList_()
Ending a definition list element.
voiddefinition_()
Ending a definition element within a definition list.
voidfigure()
Starting a basic image embedding element.
voidfigureCaption()
Starting a caption of an image element.
voidfigureCaption_()
Ending a caption of an image.
voidfigureGraphics(String name)
Adding a source of a graphic.
voidfigure_()
Ending a basic image embedding element.
voidflush()
Flush the writer or the stream, if needed.
voidhead()
Starting the head element which contains information about the current document, such as its title, that is not considered document content.
voidhead_()
Ending the head element.
voidhorizontalRule()
Adding a separator of sections from a text to each other.
voiditalic()
Starting an italic element.
voiditalic_()
Ending an italic element.
voidlineBreak()
Adding a line breaks.
voidlink(String name)
Starting an element which defines a link.
voidlink_()
Ending a link element.
voidlist()
Starting an unordered list element.
voidlistItem()
Starting a list item element within an unordered list.
voidlistItem_()
Ending a list item element within an unordered list.
voidlist_()
Ending an unordered list element.
voidmonospaced()
Starting a monospaced element.
voidmonospaced_()
Ending a monospaced element.
voidnonBreakingSpace()
Adding a non breaking space, ie a space without any special formatting operations.
voidnumberedList(int numbering)
Starting an ordered list element.
voidnumberedListItem()
Starting a list item element within an ordered list.
voidnumberedListItem_()
Ending a list item element within an ordered list.
voidnumberedList_()
Ending an ordered list element.
voidpageBreak()
Adding a new page separator.
voidparagraph()
Starting an element which represents a paragraph.
voidparagraph_()
Ending a paragraph element.
voidrawText(String text)
Adding a raw text, ie a text without any special formatting operations.
voidsection1()
Starting a first heading element which contains the topic of the section.
voidsection1_()
Ending a first heading element.
voidsection2()
Starting a second heading element which contains the topic of the section.
voidsection2_()
Ending a second heading element.
voidsection3()
Starting a third heading element which contains the topic of the section.
voidsection3_()
Ending a third heading element.
voidsection4()
Starting a 4th heading element which contains the topic of the section.
voidsection4_()
Ending a 4th heading element.
voidsection5()
Starting a 5th heading element which contains the topic of the section.
voidsection5_()
Ending a 5th heading element.
voidsectionTitle()
Starting a title heading element.
voidsectionTitle1()
Starting a first title heading element.
voidsectionTitle1_()
Ending a first title heading element.
voidsectionTitle2()
Starting a second title heading element.
voidsectionTitle2_()
Ending a second title heading element.
voidsectionTitle3()
Starting a third title heading element.
voidsectionTitle3_()
Ending a third title heading element.
voidsectionTitle4()
Starting a 4th title heading element.
voidsectionTitle4_()
Ending a 4th title heading element.
voidsectionTitle5()
Starting a 5th title heading element.
voidsectionTitle5_()
Ending a 5th title heading element.
voidsectionTitle_()
Ending a title heading element.
voidtable()
Starting a table element for marking up tabular information in a document.
voidtableCaption()
Starting a caption element of a table.
voidtableCaption_()
Ending a caption element of a table.
voidtableCell()
Starting a cell element which defines a cell that contains data.
voidtableCell(String width)
Starting a cell element which defines a cell that contains data.
voidtableCell_()
Ending a cell element.
voidtableHeaderCell()
Starting a cell element which defines a cell that contains header information.
voidtableHeaderCell(String width)
Starting a cell element which defines a cell that contains header information.
voidtableHeaderCell_()
Ending a cell header element.
voidtableRow()
Starting a row element which acts as a container for a row of table cells.
voidtableRows(int[] justification, boolean grid)
Starting an element contains rows of table data.
voidtableRows_()
Ending an element contains rows of table data.
voidtableRow_()
Ending a row element.
voidtable_()
Ending a table element.
voidtext(String text)
Adding a text.
voidtitle()
Starting the title element which is used to identify the document.
voidtitle_()
Ending the title element.
voidverbatim(boolean boxed)
Starting an element which indicates that whitespace in the enclosed text has semantic relevance.
voidverbatim_()
Ending a verbatim element.

Field Detail

NUMBERING_DECIMAL

public int NUMBERING_DECIMAL
A numbering to handle a number list.

See Also: Sink

NUMBERING_LOWER_ALPHA

public int NUMBERING_LOWER_ALPHA
A numbering to handle a lower alpha list.

See Also: Sink

NUMBERING_LOWER_ROMAN

public int NUMBERING_LOWER_ROMAN
A numbering to handle a lower roman list.

See Also: Sink

NUMBERING_UPPER_ALPHA

public int NUMBERING_UPPER_ALPHA
A numbering to handle a upper alpha list.

See Also: Sink

NUMBERING_UPPER_ROMAN

public int NUMBERING_UPPER_ROMAN
A numbering to handle a upper roman list.

See Also: Sink

ROLE

public String ROLE
The Plexus Sink Role

SECTION_LEVEL_1

public int SECTION_LEVEL_1
A level 1 section (section).

See Also: section1

SECTION_LEVEL_2

public int SECTION_LEVEL_2
A level 2 section (subsection).

See Also: section2

SECTION_LEVEL_3

public int SECTION_LEVEL_3
A level 3 section (sub-subsection).

See Also: section3

SECTION_LEVEL_4

public int SECTION_LEVEL_4
A level 4 section (sub-sub-subsection).

See Also: section4

SECTION_LEVEL_5

public int SECTION_LEVEL_5
A level 5 section (sub-sub-sub-subsection).

See Also: section5

Method Detail

anchor

public void anchor(String name)
Starting an element which defines an anchor.

Parameters: name the name of the anchor

anchor_

public void anchor_()
Ending an anchor element.

author

public void author()
Starting the author element which is used to identify the author of the document.

author_

public void author_()
Ending the author element.

body

public void body()
Starting the body of a document which contains the document's content.

body_

public void body_()
Ending the body element.

bold

public void bold()
Starting a bold element.

bold_

public void bold_()
Ending a bold element.

close

public void close()
Close the writer or the stream, if needed.

date

public void date()
Starting the date element which is used to identify the date of the document.

date_

public void date_()
Ending the date element.

definedTerm

public void definedTerm()
Starting a definition term element within a definition list.

definedTerm_

public void definedTerm_()
Starting a definition term element within a definition list.

definition

public void definition()
Starting a definition element within a definition list.

definitionList

public void definitionList()
Starting a definition list element.

definitionListItem

public void definitionListItem()
Starting a list item element within a definition list.

definitionListItem_

public void definitionListItem_()
Ending a list item element within a definition list.

definitionList_

public void definitionList_()
Ending a definition list element.

definition_

public void definition_()
Ending a definition element within a definition list.

figure

public void figure()
Starting a basic image embedding element.

figureCaption

public void figureCaption()
Starting a caption of an image element.

figureCaption_

public void figureCaption_()
Ending a caption of an image.

figureGraphics

public void figureGraphics(String name)
Adding a source of a graphic.

Parameters: name the source

figure_

public void figure_()
Ending a basic image embedding element.

flush

public void flush()
Flush the writer or the stream, if needed.

head

public void head()
Starting the head element which contains information about the current document, such as its title, that is not considered document content.

head_

public void head_()
Ending the head element.

horizontalRule

public void horizontalRule()
Adding a separator of sections from a text to each other.

italic

public void italic()
Starting an italic element.

italic_

public void italic_()
Ending an italic element.

lineBreak

public void lineBreak()
Adding a line breaks.

link

public void link(String name)
Starting an element which defines a link.

Parameters: name the name of the link

link_

public void link_()
Ending a link element.

list

public void list()
Starting an unordered list element.

listItem

public void listItem()
Starting a list item element within an unordered list.

listItem_

public void listItem_()
Ending a list item element within an unordered list.

list_

public void list_()
Ending an unordered list element.

monospaced

public void monospaced()
Starting a monospaced element.

monospaced_

public void monospaced_()
Ending a monospaced element.

nonBreakingSpace

public void nonBreakingSpace()
Adding a non breaking space, ie a space without any special formatting operations.

numberedList

public void numberedList(int numbering)
Starting an ordered list element.

Parameters: numbering the numbering wanted

See Also: NUMBERING_DECIMAL NUMBERING_LOWER_ALPHA NUMBERING_LOWER_ROMAN NUMBERING_UPPER_ALPHA NUMBERING_UPPER_ROMAN

numberedListItem

public void numberedListItem()
Starting a list item element within an ordered list.

numberedListItem_

public void numberedListItem_()
Ending a list item element within an ordered list.

numberedList_

public void numberedList_()
Ending an ordered list element.

pageBreak

public void pageBreak()
Adding a new page separator.

paragraph

public void paragraph()
Starting an element which represents a paragraph.

paragraph_

public void paragraph_()
Ending a paragraph element.

rawText

public void rawText(String text)
Adding a raw text, ie a text without any special formatting operations.

Parameters: text The text to write.

section1

public void section1()
Starting a first heading element which contains the topic of the section.

section1_

public void section1_()
Ending a first heading element.

section2

public void section2()
Starting a second heading element which contains the topic of the section.

section2_

public void section2_()
Ending a second heading element.

section3

public void section3()
Starting a third heading element which contains the topic of the section.

section3_

public void section3_()
Ending a third heading element.

section4

public void section4()
Starting a 4th heading element which contains the topic of the section.

section4_

public void section4_()
Ending a 4th heading element.

section5

public void section5()
Starting a 5th heading element which contains the topic of the section.

section5_

public void section5_()
Ending a 5th heading element.

sectionTitle

public void sectionTitle()
Starting a title heading element.

sectionTitle1

public void sectionTitle1()
Starting a first title heading element.

sectionTitle1_

public void sectionTitle1_()
Ending a first title heading element.

sectionTitle2

public void sectionTitle2()
Starting a second title heading element.

sectionTitle2_

public void sectionTitle2_()
Ending a second title heading element.

sectionTitle3

public void sectionTitle3()
Starting a third title heading element.

sectionTitle3_

public void sectionTitle3_()
Ending a third title heading element.

sectionTitle4

public void sectionTitle4()
Starting a 4th title heading element.

sectionTitle4_

public void sectionTitle4_()
Ending a 4th title heading element.

sectionTitle5

public void sectionTitle5()
Starting a 5th title heading element.

sectionTitle5_

public void sectionTitle5_()
Ending a 5th title heading element.

sectionTitle_

public void sectionTitle_()
Ending a title heading element.

table

public void table()
Starting a table element for marking up tabular information in a document.

tableCaption

public void tableCaption()
Starting a caption element of a table.

tableCaption_

public void tableCaption_()
Ending a caption element of a table.

tableCell

public void tableCell()
Starting a cell element which defines a cell that contains data.

tableCell

public void tableCell(String width)
Starting a cell element which defines a cell that contains data.

Parameters: width the size of the cell

tableCell_

public void tableCell_()
Ending a cell element.

tableHeaderCell

public void tableHeaderCell()
Starting a cell element which defines a cell that contains header information.

tableHeaderCell

public void tableHeaderCell(String width)
Starting a cell element which defines a cell that contains header information.

Parameters: width the size of the header cell

tableHeaderCell_

public void tableHeaderCell_()
Ending a cell header element.

tableRow

public void tableRow()
Starting a row element which acts as a container for a row of table cells.

tableRows

public void tableRows(int[] justification, boolean grid)
Starting an element contains rows of table data.

Parameters: justification the justification wanted grid true to provide a grid, false otherwise

tableRows_

public void tableRows_()
Ending an element contains rows of table data.

tableRow_

public void tableRow_()
Ending a row element.

table_

public void table_()
Ending a table element.

text

public void text(String text)
Adding a text.

Parameters: text The text to write.

title

public void title()
Starting the title element which is used to identify the document.

title_

public void title_()
Ending the title element.

verbatim

public void verbatim(boolean boxed)
Starting an element which indicates that whitespace in the enclosed text has semantic relevance.

Parameters: boxed true to add a box, false otherwise

verbatim_

public void verbatim_()
Ending a verbatim element.
Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.