|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.doxia.sink.SinkAdapter
org.apache.maven.doxia.sink.AbstractXmlSink
org.apache.maven.doxia.module.xdoc.XdocSink
public class XdocSink
A doxia Sink which produces an xdoc model.
Field Summary | |
---|---|
protected StringBuffer |
buffer
Used to collect text events. |
protected boolean |
headFlag
An indication on if we're inside a head. |
protected LineBreaker |
out
The LineBreaker to write the result. |
protected boolean |
titleFlag
An indication on if we're inside a title. |
Fields inherited from interface org.apache.maven.doxia.module.xdoc.XdocMarkup |
---|
AUTHOR_TAG, DATE_TAG, DOCUMENT_TAG, MACRO_TAG, PROPERTIES_TAG, SECTION_TAG, SOURCE_TAG, SUBSECTION_TAG |
Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup |
---|
BANG, CDATA |
Fields inherited from interface org.apache.maven.doxia.markup.Markup |
---|
EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SLASH, SPACE, STAR |
Fields inherited from interface org.apache.maven.doxia.sink.Sink |
---|
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 | |
---|---|
XdocSink(Writer writer)
Constructor, initialize the LineBreaker. |
Method Summary | |
---|---|
void |
anchor_()
Ending an anchor element. |
void |
anchor(String name)
Starting an element which defines an anchor. |
void |
author_()
Ending the author element. |
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. |
protected void |
content(String text)
Write HTML escaped text to output, not preserving white space. |
void |
date_()
Ending the date element. |
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. |
static String |
encodeURL(String text)
Forward to HtmlTools.encodeURL( text ). |
static String |
escapeHTML(String text)
Forward to HtmlTools.escapeHTML( text ). |
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(String s)
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(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. |
protected void |
markup(String text)
Write text to output, preserving white space. |
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)
The default list style depends on the numbering. |
void |
numberedListItem_()
Ending a list item element within an ordered list. |
void |
numberedListItem()
Starting a list item element within an ordered list. |
void |
paragraph_()
Ending a paragraph element. |
void |
paragraph()
Starting an element which represents a paragraph. |
protected void |
resetState()
Reset all variables. |
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 |
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()
The default align is center . |
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_(boolean headerRow)
Ends a table cell. |
void |
tableCell()
Starting a cell element which defines a cell that contains data. |
void |
tableCell(boolean headerRow)
Starts a table cell. |
void |
tableHeaderCell_()
Ending a cell header element. |
void |
tableHeaderCell()
Starting a cell element which defines a cell that contains header information. |
void |
tableRow_()
Ending a row element. |
void |
tableRow()
The default valign is top . |
void |
tableRows_()
Ending an element contains rows of table data. |
void |
tableRows(int[] justification,
boolean grid)
The default align is center . |
void |
text(String text)
Adding a text. |
void |
title_()
Ending the title element. |
void |
verbatim_()
Ending a verbatim element. |
void |
verbatim(boolean boxed)
Starting an element which indicates that whitespace in the enclosed text has semantic relevance. |
protected void |
verbatimContent(String text)
Write HTML escaped text to output, preserving white space. |
protected void |
write(String text)
TODO DOXIA-59 Need to uniform writing |
Methods inherited from class org.apache.maven.doxia.sink.AbstractXmlSink |
---|
writeEndTag, writeEndTagWithoutEOL, writeSimpleTag, writeSimpleTag, writeStartTag, writeStartTag, writeStartTag |
Methods inherited from class org.apache.maven.doxia.sink.SinkAdapter |
---|
author, date, definitionListItem_, definitionListItem, pageBreak, rawText, sectionTitle_, sectionTitle, tableCell, tableHeaderCell, title |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LineBreaker out
protected StringBuffer buffer
protected boolean headFlag
protected boolean titleFlag
Constructor Detail |
---|
public XdocSink(Writer writer)
writer
- The writer to write the result.Method Detail |
---|
protected void resetState()
public void head()
head
in interface Sink
head
in class SinkAdapter
XdocMarkup.DOCUMENT_TAG
,
XdocMarkup.PROPERTIES_TAG
public void head_()
head_
in interface Sink
head_
in class SinkAdapter
XdocMarkup.DOCUMENT_TAG
,
XdocMarkup.PROPERTIES_TAG
public void title_()
title_
in interface Sink
title_
in class SinkAdapter
HTML.Tag.TITLE
public void author_()
author_
in interface Sink
author_
in class SinkAdapter
XdocMarkup.AUTHOR_TAG
public void date_()
date_
in interface Sink
date_
in class SinkAdapter
XdocMarkup.DATE_TAG
public void body()
body
in interface Sink
body
in class SinkAdapter
HTML.Tag.BODY
public void body_()
body_
in interface Sink
body_
in class SinkAdapter
HTML.Tag.BODY
,
XdocMarkup.DOCUMENT_TAG
public void section1()
section1
in interface Sink
section1
in class SinkAdapter
public void sectionTitle1()
sectionTitle1
in interface Sink
sectionTitle1
in class SinkAdapter
public void sectionTitle1_()
sectionTitle1_
in interface Sink
sectionTitle1_
in class SinkAdapter
public void section1_()
section1_
in interface Sink
section1_
in class SinkAdapter
public void section2()
section2
in interface Sink
section2
in class SinkAdapter
public void sectionTitle2()
sectionTitle2
in interface Sink
sectionTitle2
in class SinkAdapter
public void sectionTitle2_()
sectionTitle2_
in interface Sink
sectionTitle2_
in class SinkAdapter
public void section2_()
section2_
in interface Sink
section2_
in class SinkAdapter
public void section3()
section3
in interface Sink
section3
in class SinkAdapter
public void sectionTitle3()
sectionTitle3
in interface Sink
sectionTitle3
in class SinkAdapter
public void sectionTitle3_()
sectionTitle3_
in interface Sink
sectionTitle3_
in class SinkAdapter
public void section3_()
section3_
in interface Sink
section3_
in class SinkAdapter
public void section4()
section4
in interface Sink
section4
in class SinkAdapter
public void sectionTitle4()
sectionTitle4
in interface Sink
sectionTitle4
in class SinkAdapter
public void sectionTitle4_()
sectionTitle4_
in interface Sink
sectionTitle4_
in class SinkAdapter
public void section4_()
section4_
in interface Sink
section4_
in class SinkAdapter
public void section5()
section5
in interface Sink
section5
in class SinkAdapter
public void sectionTitle5()
sectionTitle5
in interface Sink
sectionTitle5
in class SinkAdapter
public void sectionTitle5_()
sectionTitle5_
in interface Sink
sectionTitle5_
in class SinkAdapter
public void section5_()
section5_
in interface Sink
section5_
in class SinkAdapter
public void list()
list
in interface Sink
list
in class SinkAdapter
HTML.Tag.UL
public void list_()
list_
in interface Sink
list_
in class SinkAdapter
HTML.Tag.UL
public void listItem()
listItem
in interface Sink
listItem
in class SinkAdapter
HTML.Tag.LI
public void listItem_()
listItem_
in interface Sink
listItem_
in class SinkAdapter
HTML.Tag.LI
public void numberedList(int numbering)
numberedList
in interface Sink
numberedList
in class SinkAdapter
numbering
- the numbering wantedHTML.Tag.OL
public void numberedList_()
numberedList_
in interface Sink
numberedList_
in class SinkAdapter
HTML.Tag.OL
public void numberedListItem()
numberedListItem
in interface Sink
numberedListItem
in class SinkAdapter
HTML.Tag.LI
public void numberedListItem_()
numberedListItem_
in interface Sink
numberedListItem_
in class SinkAdapter
HTML.Tag.LI
public void definitionList()
definitionList
in interface Sink
definitionList
in class SinkAdapter
HTML.Tag.DL
public void definitionList_()
definitionList_
in interface Sink
definitionList_
in class SinkAdapter
HTML.Tag.DL
public void definedTerm()
definedTerm
in interface Sink
definedTerm
in class SinkAdapter
HTML.Tag.DT
public void definedTerm_()
definedTerm_
in interface Sink
definedTerm_
in class SinkAdapter
HTML.Tag.DT
public void definition()
definition
in interface Sink
definition
in class SinkAdapter
HTML.Tag.DD
public void definition_()
definition_
in interface Sink
definition_
in class SinkAdapter
HTML.Tag.DD
public void figure()
figure
in interface Sink
figure
in class SinkAdapter
HTML.Tag.IMG
public void figure_()
figure_
in interface Sink
figure_
in class SinkAdapter
public void figureGraphics(String s)
figureGraphics
in interface Sink
figureGraphics
in class SinkAdapter
s
- the sourcepublic void figureCaption()
figureCaption
in interface Sink
figureCaption
in class SinkAdapter
public void figureCaption_()
figureCaption_
in interface Sink
figureCaption_
in class SinkAdapter
public void paragraph()
paragraph
in interface Sink
paragraph
in class SinkAdapter
HTML.Tag.P
public void paragraph_()
paragraph_
in interface Sink
paragraph_
in class SinkAdapter
HTML.Tag.P
public void verbatim(boolean boxed)
verbatim
in interface Sink
verbatim
in class SinkAdapter
boxed
- true to add a box, false otherwiseXdocMarkup.SOURCE_TAG
,
HTML.Tag.PRE
public void verbatim_()
verbatim_
in interface Sink
verbatim_
in class SinkAdapter
XdocMarkup.SOURCE_TAG
,
HTML.Tag.PRE
public void horizontalRule()
horizontalRule
in interface Sink
horizontalRule
in class SinkAdapter
HTML.Tag.HR
public void table()
center
.
Starting a table element for marking up tabular information in a document.
table
in interface Sink
table
in class SinkAdapter
HTML.Tag.TABLE
public void table_()
table_
in interface Sink
table_
in class SinkAdapter
HTML.Tag.TABLE
public void tableRows(int[] justification, boolean grid)
center
.
Starting an element contains rows of table data.
tableRows
in interface Sink
tableRows
in class SinkAdapter
justification
- the justification wantedgrid
- true to provide a grid, false otherwiseHTML.Tag.TABLE
public void tableRows_()
tableRows_
in interface Sink
tableRows_
in class SinkAdapter
HTML.Tag.TABLE
public void tableRow()
top
.
Starting a row element which acts as a container for a row of table cells.
tableRow
in interface Sink
tableRow
in class SinkAdapter
HTML.Tag.TR
public void tableRow_()
tableRow_
in interface Sink
tableRow_
in class SinkAdapter
HTML.Tag.TR
public void tableCell()
tableCell
in interface Sink
tableCell
in class SinkAdapter
public void tableHeaderCell()
tableHeaderCell
in interface Sink
tableHeaderCell
in class SinkAdapter
public void tableCell(boolean headerRow)
headerRow
- true if it is an header rowHTML.Tag.TH
,
HTML.Tag.TD
public void tableCell_()
tableCell_
in interface Sink
tableCell_
in class SinkAdapter
public void tableHeaderCell_()
tableHeaderCell_
in interface Sink
tableHeaderCell_
in class SinkAdapter
public void tableCell_(boolean headerRow)
headerRow
- true if it is an header rowHTML.Tag.TH
,
HTML.Tag.TD
public void tableCaption()
tableCaption
in interface Sink
tableCaption
in class SinkAdapter
HTML.Tag.P
,
HTML.Tag.I
public void tableCaption_()
tableCaption_
in interface Sink
tableCaption_
in class SinkAdapter
HTML.Tag.P
,
HTML.Tag.I
public void anchor(String name)
anchor
in interface Sink
anchor
in class SinkAdapter
name
- the name of the anchorHTML.Tag.A
public void anchor_()
anchor_
in interface Sink
anchor_
in class SinkAdapter
HTML.Tag.A
public void link(String name)
link
in interface Sink
link
in class SinkAdapter
name
- the name of the linkHTML.Tag.A
public void link_()
link_
in interface Sink
link_
in class SinkAdapter
HTML.Tag.A
public void italic()
italic
in interface Sink
italic
in class SinkAdapter
HTML.Tag.I
public void italic_()
italic_
in interface Sink
italic_
in class SinkAdapter
HTML.Tag.I
public void bold()
bold
in interface Sink
bold
in class SinkAdapter
HTML.Tag.B
public void bold_()
bold_
in interface Sink
bold_
in class SinkAdapter
HTML.Tag.B
public void monospaced()
monospaced
in interface Sink
monospaced
in class SinkAdapter
HTML.Tag.TT
public void monospaced_()
monospaced_
in interface Sink
monospaced_
in class SinkAdapter
HTML.Tag.TT
public void lineBreak()
lineBreak
in interface Sink
lineBreak
in class SinkAdapter
HTML.Tag.BR
public void nonBreakingSpace()
nonBreakingSpace
in interface Sink
nonBreakingSpace
in class SinkAdapter
public void text(String text)
text
in interface Sink
text
in class SinkAdapter
text
- The text to write.protected void markup(String text)
text
- The text to write.protected void content(String text)
text
- The text to write.protected void verbatimContent(String text)
text
- The text to write.public static String escapeHTML(String text)
text
- the String to escape, may be null
HtmlTools.escapeHTML(String)
public static String encodeURL(String text)
text
- the String to encode, may be null.
HtmlTools.encodeURL(String)
public void flush()
flush
in interface Sink
flush
in class SinkAdapter
public void close()
close
in interface Sink
close
in class SinkAdapter
protected void write(String text)
write
in class AbstractXmlSink
text
- the given text to write
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |