org.apache.maven.doxia.sink
Interface Sink

All Known Subinterfaces:
Sink
All Known Implementing Classes:
AbstractTextSink, AbstractXdocBookSink, AbstractXhtmlSink, AbstractXmlSink, AptSink, ChapterXdocBookSink, DocBookSink, IndexingSink, IndexXdocBookSink, ITextSink, LatexBookSink, LatexSink, RtfSink, SectionXdocBookSink, SinkAdapter, XdocSink, XhtmlBookSink, XhtmlSink, XmlWriterXdocSink

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
static int NUMBERING_DECIMAL
          A numbering to handle a number list.
static int NUMBERING_LOWER_ALPHA
          A numbering to handle a lower alpha list.
static int NUMBERING_LOWER_ROMAN
          A numbering to handle a lower roman list.
static int NUMBERING_UPPER_ALPHA
          A numbering to handle a upper alpha list.
static int NUMBERING_UPPER_ROMAN
          A numbering to handle a upper roman list.
static java.lang.String ROLE
          The Plexus Sink Role
static int SECTION_LEVEL_1
          A level 1 section (section).
static int SECTION_LEVEL_2
          A level 2 section (subsection).
static int SECTION_LEVEL_3
          A level 3 section (sub-subsection).
static int SECTION_LEVEL_4
          A level 4 section (sub-sub-subsection).
static int SECTION_LEVEL_5
          A level 5 section (sub-sub-sub-subsection).
 
Method Summary
 void anchor_()
          Ending an anchor element.
 void anchor(java.lang.String name)
          Starting an element which defines an anchor.
 void author_()
          Ending the author element.
 void author()
          Starting the author element which is used to identify the author of the document.
 void body_()
          Ending the body element.
 void body()
          Starting the body of a document which contains the document's content.
 void bold_()
          Ending a bold element.
 void bold()
          Starting a bold element.
 void close()
          Close the writer or the stream, if needed.
 void date_()
          Ending the date element.
 void date()
          Starting the date element which is used to identify the date of the document.
 void definedTerm_()
          Starting a definition term element within a definition list.
 void definedTerm()
          Starting a definition term element within a definition list.
 void definition_()
          Ending a definition element within a definition list.
 void definition()
          Starting a definition element within a definition list.
 void definitionList_()
          Ending a definition list element.
 void definitionList()
          Starting a definition list element.
 void definitionListItem_()
          Ending a list item element within a definition list.
 void definitionListItem()
          Starting a list item element within a definition list.
 void figure_()
          Ending a basic image embedding element.
 void figure()
          Starting a basic image embedding element.
 void figureCaption_()
          Ending a caption of an image.
 void figureCaption()
          Starting a caption of an image element.
 void figureGraphics(java.lang.String name)
          Adding a source of a graphic.
 void flush()
          Flush the writer or the stream, if needed.
 void head_()
          Ending the head element.
 void head()
          Starting the head element which contains information about the current document, such as its title, that is not considered document content.
 void horizontalRule()
          Adding a separator of sections from a text to each other.
 void italic_()
          Ending an italic element.
 void italic()
          Starting an italic element.
 void lineBreak()
          Adding a line breaks.
 void link_()
          Ending a link element.
 void link(java.lang.String name)
          Starting an element which defines a link.
 void list_()
          Ending an unordered list element.
 void list()
          Starting an unordered list element.
 void listItem_()
          Ending a list item element within an unordered list.
 void listItem()
          Starting a list item element within an unordered list.
 void monospaced_()
          Ending a monospaced element.
 void monospaced()
          Starting a monospaced element.
 void nonBreakingSpace()
          Adding a non breaking space, ie a space without any special formatting operations.
 void numberedList_()
          Ending an ordered list element.
 void numberedList(int numbering)
          Starting an ordered list element.
 void numberedListItem_()
          Ending a list item element within an ordered list.
 void numberedListItem()
          Starting a list item element within an ordered list.
 void pageBreak()
          Adding a new page separator.
 void paragraph_()
          Ending a paragraph element.
 void paragraph()
          Starting an element which represents a paragraph.
 void rawText(java.lang.String text)
          Adding a raw text, ie a text without any special formatting operations.
 void section1_()
          Ending a first heading element.
 void section1()
          Starting a first heading element which contains the topic of the section.
 void section2_()
          Ending a second heading element.
 void section2()
          Starting a second heading element which contains the topic of the section.
 void section3_()
          Ending a third heading element.
 void section3()
          Starting a third heading element which contains the topic of the section.
 void section4_()
          Ending a 4th heading element.
 void section4()
          Starting a 4th heading element which contains the topic of the section.
 void section5_()
          Ending a 5th heading element.
 void section5()
          Starting a 5th heading element which contains the topic of the section.
 void sectionTitle_()
          Ending a title heading element.
 void sectionTitle()
          Starting a title heading element.
 void sectionTitle1_()
          Ending a first title heading element.
 void sectionTitle1()
          Starting a first title heading element.
 void sectionTitle2_()
          Ending a second title heading element.
 void sectionTitle2()
          Starting a second title heading element.
 void sectionTitle3_()
          Ending a third title heading element.
 void sectionTitle3()
          Starting a third title heading element.
 void sectionTitle4_()
          Ending a 4th title heading element.
 void sectionTitle4()
          Starting a 4th title heading element.
 void sectionTitle5_()
          Ending a 5th title heading element.
 void sectionTitle5()
          Starting a 5th title heading element.
 void table_()
          Ending a table element.
 void table()
          Starting a table element for marking up tabular information in a document.
 void tableCaption_()
          Ending a caption element of a table.
 void tableCaption()
          Starting a caption element of a table.
 void tableCell_()
          Ending a cell element.
 void tableCell()
          Starting a cell element which defines a cell that contains data.
 void tableCell(java.lang.String width)
          Starting a cell element which defines a cell that contains data.
 void tableHeaderCell_()
          Ending a cell header element.
 void tableHeaderCell()
          Starting a cell element which defines a cell that contains header information.
 void tableHeaderCell(java.lang.String width)
          Starting a cell element which defines a cell that contains header information.
 void tableRow_()
          Ending a row element.
 void tableRow()
          Starting a row element which acts as a container for a row of table cells.
 void tableRows_()
          Ending an element contains rows of table data.
 void tableRows(int[] justification, boolean grid)
          Starting an element contains rows of table data.
 void text(java.lang.String text)
          Adding a text.
 void title_()
          Ending the title element.
 void title()
          Starting the title element which is used to identify the document.
 void verbatim_()
          Ending a verbatim element.
 void verbatim(boolean boxed)
          Starting an element which indicates that whitespace in the enclosed text has semantic relevance.
 

Field Detail

ROLE

static final java.lang.String ROLE
The Plexus Sink Role


NUMBERING_DECIMAL

static final int NUMBERING_DECIMAL
A numbering to handle a number list.

See Also:
numberedList(int), Constant Field Values

NUMBERING_LOWER_ALPHA

static final int NUMBERING_LOWER_ALPHA
A numbering to handle a lower alpha list.

See Also:
numberedList(int), Constant Field Values

NUMBERING_UPPER_ALPHA

static final int NUMBERING_UPPER_ALPHA
A numbering to handle a upper alpha list.

See Also:
numberedList(int), Constant Field Values

NUMBERING_LOWER_ROMAN

static final int NUMBERING_LOWER_ROMAN
A numbering to handle a lower roman list.

See Also:
numberedList(int), Constant Field Values

NUMBERING_UPPER_ROMAN

static final int NUMBERING_UPPER_ROMAN
A numbering to handle a upper roman list.

See Also:
numberedList(int), Constant Field Values

SECTION_LEVEL_1

static final int SECTION_LEVEL_1
A level 1 section (section).

See Also:
section1(), Constant Field Values

SECTION_LEVEL_2

static final int SECTION_LEVEL_2
A level 2 section (subsection).

See Also:
section2(), Constant Field Values

SECTION_LEVEL_3

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

See Also:
section3(), Constant Field Values

SECTION_LEVEL_4

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

See Also:
section4(), Constant Field Values

SECTION_LEVEL_5

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

See Also:
section5(), Constant Field Values
Method Detail

head

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


head_

void head_()
Ending the head element.


title

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


title_

void title_()
Ending the title element.


author

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


author_

void author_()
Ending the author element.


date

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


date_

void date_()
Ending the date element.


body

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


body_

void body_()
Ending the body element.


sectionTitle

void sectionTitle()
Starting a title heading element.


sectionTitle_

void sectionTitle_()
Ending a title heading element.


section1

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


section1_

void section1_()
Ending a first heading element.


sectionTitle1

void sectionTitle1()
Starting a first title heading element.


sectionTitle1_

void sectionTitle1_()
Ending a first title heading element.


section2

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


section2_

void section2_()
Ending a second heading element.


sectionTitle2

void sectionTitle2()
Starting a second title heading element.


sectionTitle2_

void sectionTitle2_()
Ending a second title heading element.


section3

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


section3_

void section3_()
Ending a third heading element.


sectionTitle3

void sectionTitle3()
Starting a third title heading element.


sectionTitle3_

void sectionTitle3_()
Ending a third title heading element.


section4

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


section4_

void section4_()
Ending a 4th heading element.


sectionTitle4

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


sectionTitle4_

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


section5

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


section5_

void section5_()
Ending a 5th heading element.


sectionTitle5

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


sectionTitle5_

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


list

void list()
Starting an unordered list element.


list_

void list_()
Ending an unordered list element.


listItem

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


listItem_

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


numberedList

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

numberedList_

void numberedList_()
Ending an ordered list element.


numberedListItem

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


numberedListItem_

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


definitionList

void definitionList()
Starting a definition list element.


definitionList_

void definitionList_()
Ending a definition list element.


definitionListItem

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


definitionListItem_

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


definition

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


definition_

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


definedTerm

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


definedTerm_

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


figure

void figure()
Starting a basic image embedding element.


figure_

void figure_()
Ending a basic image embedding element.


figureCaption

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


figureCaption_

void figureCaption_()
Ending a caption of an image.


figureGraphics

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

Parameters:
name - the source

table

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


table_

void table_()
Ending a table element.


tableRows

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_

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


tableRow

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


tableRow_

void tableRow_()
Ending a row element.


tableCell

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


tableCell

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

Parameters:
width - the size of the cell

tableCell_

void tableCell_()
Ending a cell element.


tableHeaderCell

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


tableHeaderCell

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

Parameters:
width - the size of the header cell

tableHeaderCell_

void tableHeaderCell_()
Ending a cell header element.


tableCaption

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


tableCaption_

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


paragraph

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


paragraph_

void paragraph_()
Ending a paragraph element.


verbatim

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_

void verbatim_()
Ending a verbatim element.


horizontalRule

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


pageBreak

void pageBreak()
Adding a new page separator.


anchor

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

Parameters:
name - the name of the anchor

anchor_

void anchor_()
Ending an anchor element.


link

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

Parameters:
name - the name of the link

link_

void link_()
Ending a link element.


italic

void italic()
Starting an italic element.


italic_

void italic_()
Ending an italic element.


bold

void bold()
Starting a bold element.


bold_

void bold_()
Ending a bold element.


monospaced

void monospaced()
Starting a monospaced element.


monospaced_

void monospaced_()
Ending a monospaced element.


lineBreak

void lineBreak()
Adding a line breaks.


nonBreakingSpace

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


text

void text(java.lang.String text)
Adding a text.

Parameters:
text - The text to write.

rawText

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

Parameters:
text - The text to write.

flush

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


close

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



Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.