Package org.apache.maven.doxia.sink.impl
Class Xhtml5BaseSink
- java.lang.Object
-
- org.apache.maven.doxia.sink.impl.AbstractSink
-
- org.apache.maven.doxia.sink.impl.SinkAdapter
-
- org.apache.maven.doxia.sink.impl.AbstractXmlSink
-
- org.apache.maven.doxia.sink.impl.Xhtml5BaseSink
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,HtmlMarkup
,Markup
,XmlMarkup
,org.apache.maven.doxia.sink.Sink
public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup
Abstract base xhtml5 sink implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Xhtml5BaseSink.VerbatimMode
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Stack<javax.swing.text.html.HTML.Tag>
contentStack
Keep track of the main and div tags for content events.protected java.util.Stack<java.util.List<javax.swing.text.html.HTML.Tag>>
inlineStack
Keep track of the closing tags for inline events.protected javax.swing.text.MutableAttributeSet
tableAttributes
used to store attributes passed to table().-
Fields inherited from interface org.apache.maven.doxia.markup.HtmlMarkup
A, ABBR, ADDRESS, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BDI, BDO, BLOCKQUOTE, BODY, BR, BUTTON, CANVAS, CAPTION, CDATA_TYPE, CITE, CODE, COL, COLGROUP, COMMAND, DATA, DATALIST, DD, DEL, DETAILS, DFN, DIALOG, DIV, DL, DT, EM, EMBED, ENTITY_TYPE, FIELDSET, FIGCAPTION, FIGURE, FOOTER, FORM, H1, H2, H3, H4, H5, H6, HEAD, HEADER, HGROUP, HR, HTML, I, IFRAME, IMG, INPUT, INS, KBD, KEYGEN, LABEL, LEGEND, LI, LINK, MAIN, MAP, MARK, MENU, MENUITEM, META, METER, NAV, NOSCRIPT, OBJECT, OL, OPTGROUP, OPTION, OUTPUT, P, PARAM, PICTURE, PRE, PROGRESS, Q, RB, RP, RT, RTC, RUBY, S, SAMP, SCRIPT, SECTION, SELECT, SMALL, SOURCE, SPAN, STRONG, STYLE, SUB, SUMMARY, SUP, SVG, TABLE, TAG_TYPE_END, TAG_TYPE_SIMPLE, TAG_TYPE_START, TBODY, TD, TEMPLATE, TEXTAREA, TFOOT, TH, THEAD, TIME, TITLE, TR, TRACK, U, UL, VAR, VIDEO, WBR
-
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, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
-
Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup
BANG, CDATA, DOCTYPE_START, ENTITY_START, XML_NAMESPACE
-
-
Constructor Summary
Constructors Constructor Description Xhtml5BaseSink(java.io.Writer out)
Constructor, initialize the PrintWriter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
address(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
address_()
void
anchor(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
anchor_()
void
article(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
article_()
void
blockquote(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
blockquote_()
void
bold()
void
bold_()
void
close()
void
comment(java.lang.String comment)
protected void
content(java.lang.String text)
Write HTML escaped text to output.void
content(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
content_()
void
data(java.lang.String value, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
data_()
void
definedTerm(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
definedTerm_()
void
definition(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
definition_()
void
definitionList(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
definitionList_()
void
division(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
division_()
protected static java.lang.String
encodeURL(java.lang.String text)
Forward to HtmlTools.encodeURL(text).protected static java.lang.String
escapeHTML(java.lang.String text)
Forward to HtmlTools.escapeHTML(text).void
figure(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
figure_()
void
figureCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
figureCaption_()
void
figureGraphics(java.lang.String src, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
flush()
void
footer(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
footer_()
protected int
getCellCount()
Getter for the fieldcellCount
.protected int[]
getCellJustif()
Getter for the fieldcellJustif
.protected java.lang.StringBuffer
getTextBuffer()
To use mainly when playing with the head events.protected Xhtml5BaseSink.VerbatimMode
getVerbatimMode()
void
header(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
header_()
void
horizontalRule(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
protected void
init()
This is called inAbstractSink.head()
or inSink.close()
, and can be used to set the sink into a clear state so it can be re-used.void
inline(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
inline_()
protected boolean
isHeadFlag()
isHeadFlag.protected boolean
isVerbatim()
void
italic()
void
italic_()
void
lineBreak(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
lineBreakOpportunity(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
link(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default style class for external link isexternalLink
.void
link_()
void
list(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
list_()
void
listItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
listItem_()
void
monospaced()
void
monospaced_()
void
navigation(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
navigation_()
void
nonBreakingSpace()
void
numberedList(int numbering, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default list style depends on the numbering.void
numberedList_()
void
numberedListItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
numberedListItem_()
protected void
onSection(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Starts a section.protected void
onSection_(int depth)
Ends a section.protected void
onSectionTitle(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Starts a section title.protected void
onSectionTitle_(int depth)
Ends a section title.void
pageBreak()
void
paragraph(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
paragraph_()
void
rawText(java.lang.String text)
protected void
resetTextBuffer()
Reset the text buffer.void
section(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
section_(int level)
void
sectionTitle(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
sectionTitle_(int level)
protected void
setCellCount(int count)
Setter for the fieldcellCount
.protected void
setCellJustif(int[] justif)
Setter for the fieldcellJustif
.protected void
setHeadFlag(boolean headFlag)
Setter for the fieldheadFlag
.protected void
setVerbatimMode(Xhtml5BaseSink.VerbatimMode mode)
Setter for the fieldverbatimMode
.void
sidebar(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
sidebar_()
void
table(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
table_()
void
tableCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
tableCaption_()
void
tableCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
tableCell_()
void
tableHeaderCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
tableHeaderCell_()
void
tableRow(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Rows are striped with two colors by adding the classa
orb
.void
tableRow_()
void
tableRows(int[] justification, boolean grid)
The default style class isbodyTable
.void
tableRows_()
void
text(java.lang.String text, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
time(java.lang.String datetime, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
void
time_()
void
unknown(java.lang.String name, java.lang.Object[] requiredParams, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Add an unknown event.void
verbatim(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Depending on whether the decoration attribute is "source" or not, this leads to either emitting<pre><code>
or just<pre>
.void
verbatim_()
protected void
verbatimContent(java.lang.String text)
Write HTML escaped text to output.protected void
write(java.lang.String text)
Write a text to the sink.protected void
writeEndTag(javax.swing.text.html.HTML.Tag t)
Ends a Tag without writing an EOL.protected void
writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att, boolean isSimpleTag)
Starts a Tag with attributes.-
Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractXmlSink
getNameSpace, setInsertNewline, setNameSpace, writeEOL, writeSimpleTag, writeSimpleTag, writeStartTag, writeStartTag
-
Methods inherited from class org.apache.maven.doxia.sink.impl.SinkAdapter
author, author_, body, body_, date, date_, definitionListItem, definitionListItem_, head, head_, title, title_
-
Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractSink
address, anchor, article, author, blockquote, body, content, data, date, definedTerm, definition, definitionList, definitionListItem, division, figure, figureCaption, figureGraphics, footer, formatLocation, getDocumentLocator, getLocationLogPrefix, head, header, horizontalRule, inline, lineBreak, lineBreakOpportunity, link, list, listItem, navigation, numberedList, numberedListItem, paragraph, section1, section1_, section2, section2_, section3, section3_, section4, section4_, section5, section5_, section6, section6_, sectionTitle, sectionTitle_, sectionTitle1, sectionTitle1_, sectionTitle2, sectionTitle2_, sectionTitle3, sectionTitle3_, sectionTitle4, sectionTitle4_, sectionTitle5, sectionTitle5_, sectionTitle6, sectionTitle6_, setDocumentLocator, sidebar, table, tableCaption, tableCell, tableHeaderCell, tableRow, tableRows, text, time, title, unifyEOLs, verbatim
-
-
-
-
Field Detail
-
contentStack
protected java.util.Stack<javax.swing.text.html.HTML.Tag> contentStack
Keep track of the main and div tags for content events.
-
inlineStack
protected java.util.Stack<java.util.List<javax.swing.text.html.HTML.Tag>> inlineStack
Keep track of the closing tags for inline events.
-
tableAttributes
protected javax.swing.text.MutableAttributeSet tableAttributes
used to store attributes passed to table().
-
-
Method Detail
-
getTextBuffer
protected java.lang.StringBuffer getTextBuffer()
To use mainly when playing with the head events.- Returns:
- the current buffer of text events.
-
setHeadFlag
protected void setHeadFlag(boolean headFlag)
Setter for the field
headFlag
.- Parameters:
headFlag
- an header flag.
-
isHeadFlag
protected boolean isHeadFlag()
isHeadFlag.
- Returns:
- the current headFlag.
-
getVerbatimMode
protected Xhtml5BaseSink.VerbatimMode getVerbatimMode()
- Returns:
- the current verbatim mode.
-
setVerbatimMode
protected void setVerbatimMode(Xhtml5BaseSink.VerbatimMode mode)
Setter for the field
verbatimMode
.- Parameters:
mode
- a verbatim mode.
-
isVerbatim
protected boolean isVerbatim()
- Returns:
true
if inside verbatim section,false
otherwise
-
setCellJustif
protected void setCellJustif(int[] justif)
Setter for the field
cellJustif
.- Parameters:
justif
- the new cell justification array.
-
getCellJustif
protected int[] getCellJustif()
Getter for the field
cellJustif
.- Returns:
- the current cell justification array.
-
setCellCount
protected void setCellCount(int count)
Setter for the field
cellCount
.- Parameters:
count
- the new cell count.
-
getCellCount
protected int getCellCount()
Getter for the field
cellCount
.- Returns:
- the current cell count.
-
init
protected void init()
This is called inAbstractSink.head()
or inSink.close()
, and can be used to set the sink into a clear state so it can be re-used.- Overrides:
init
in classAbstractSink
-
resetTextBuffer
protected void resetTextBuffer()
Reset the text buffer.
-
article
public void article(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
article
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
article
in classSinkAdapter
-
article_
public void article_()
- Specified by:
article_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
article_
in classSinkAdapter
-
navigation
public void navigation(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
navigation
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
navigation
in classSinkAdapter
-
navigation_
public void navigation_()
- Specified by:
navigation_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
navigation_
in classSinkAdapter
-
sidebar
public void sidebar(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
sidebar
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
sidebar
in classSinkAdapter
-
sidebar_
public void sidebar_()
- Specified by:
sidebar_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
sidebar_
in classSinkAdapter
-
section
public void section(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
section
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
section
in classSinkAdapter
-
sectionTitle
public void sectionTitle(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
sectionTitle
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
sectionTitle
in classSinkAdapter
-
sectionTitle_
public void sectionTitle_(int level)
- Specified by:
sectionTitle_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
sectionTitle_
in classSinkAdapter
-
section_
public void section_(int level)
- Specified by:
section_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
section_
in classSinkAdapter
-
onSection
protected void onSection(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Starts a section.- Parameters:
depth
- The level of the section.attributes
- some attributes. May be null.
-
onSection_
protected void onSection_(int depth)
Ends a section.- Parameters:
depth
- The level of the section.- See Also:
HtmlMarkup.SECTION
-
onSectionTitle
protected void onSectionTitle(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Starts a section title.- Parameters:
depth
- The level of the section title.attributes
- some attributes. May be null.- See Also:
HtmlMarkup.H1
,HtmlMarkup.H2
,HtmlMarkup.H3
,HtmlMarkup.H4
,HtmlMarkup.H5
,HtmlMarkup.H6
-
onSectionTitle_
protected void onSectionTitle_(int depth)
Ends a section title.- Parameters:
depth
- The level of the section title.- See Also:
HtmlMarkup.H1
,HtmlMarkup.H2
,HtmlMarkup.H3
,HtmlMarkup.H4
,HtmlMarkup.H5
,HtmlMarkup.H6
-
header
public void header(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
header
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
header
in classSinkAdapter
-
header_
public void header_()
- Specified by:
header_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
header_
in classSinkAdapter
-
content
public void content(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
content
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
content
in classSinkAdapter
-
content_
public void content_()
- Specified by:
content_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
content_
in classSinkAdapter
-
footer
public void footer(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
footer
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
footer
in classSinkAdapter
-
footer_
public void footer_()
- Specified by:
footer_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
footer_
in classSinkAdapter
-
list
public void list(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
list
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
list
in classSinkAdapter
- See Also:
HTML.Tag.UL
-
list_
public void list_()
- Specified by:
list_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
list_
in classSinkAdapter
- See Also:
HTML.Tag.UL
-
listItem
public void listItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
listItem
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
listItem
in classSinkAdapter
- See Also:
HTML.Tag.LI
-
listItem_
public void listItem_()
- Specified by:
listItem_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
listItem_
in classSinkAdapter
- See Also:
HTML.Tag.LI
-
numberedList
public void numberedList(int numbering, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default list style depends on the numbering.- Specified by:
numberedList
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
numberedList
in classSinkAdapter
- See Also:
HTML.Tag.OL
-
numberedList_
public void numberedList_()
- Specified by:
numberedList_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
numberedList_
in classSinkAdapter
- See Also:
HTML.Tag.OL
-
numberedListItem
public void numberedListItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
numberedListItem
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
numberedListItem
in classSinkAdapter
- See Also:
HTML.Tag.LI
-
numberedListItem_
public void numberedListItem_()
- Specified by:
numberedListItem_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
numberedListItem_
in classSinkAdapter
- See Also:
HTML.Tag.LI
-
definitionList
public void definitionList(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
definitionList
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definitionList
in classSinkAdapter
- See Also:
HTML.Tag.DL
-
definitionList_
public void definitionList_()
- Specified by:
definitionList_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definitionList_
in classSinkAdapter
- See Also:
HTML.Tag.DL
-
definedTerm
public void definedTerm(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
definedTerm
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definedTerm
in classSinkAdapter
- See Also:
HTML.Tag.DT
-
definedTerm_
public void definedTerm_()
- Specified by:
definedTerm_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definedTerm_
in classSinkAdapter
- See Also:
HTML.Tag.DT
-
definition
public void definition(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
definition
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definition
in classSinkAdapter
- See Also:
HTML.Tag.DD
-
definition_
public void definition_()
- Specified by:
definition_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
definition_
in classSinkAdapter
- See Also:
HTML.Tag.DD
-
figure
public void figure(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
figure
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
figure
in classSinkAdapter
-
figure_
public void figure_()
- Specified by:
figure_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
figure_
in classSinkAdapter
-
figureGraphics
public void figureGraphics(java.lang.String src, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
figureGraphics
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
figureGraphics
in classSinkAdapter
-
figureCaption
public void figureCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
figureCaption
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
figureCaption
in classSinkAdapter
-
figureCaption_
public void figureCaption_()
- Specified by:
figureCaption_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
figureCaption_
in classSinkAdapter
-
paragraph
public void paragraph(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
paragraph
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
paragraph
in classSinkAdapter
- See Also:
HTML.Tag.P
-
paragraph_
public void paragraph_()
- Specified by:
paragraph_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
paragraph_
in classSinkAdapter
- See Also:
HTML.Tag.P
-
data
public void data(java.lang.String value, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
data
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
data
in classSinkAdapter
-
data_
public void data_()
- Specified by:
data_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
data_
in classSinkAdapter
-
time
public void time(java.lang.String datetime, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
time
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
time
in classSinkAdapter
-
time_
public void time_()
- Specified by:
time_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
time_
in classSinkAdapter
-
address
public void address(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
address
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
address
in classSinkAdapter
- See Also:
HTML.Tag.ADDRESS
-
address_
public void address_()
- Specified by:
address_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
address_
in classSinkAdapter
- See Also:
HTML.Tag.ADDRESS
-
blockquote
public void blockquote(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
blockquote
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
blockquote
in classSinkAdapter
- See Also:
HTML.Tag.BLOCKQUOTE
-
blockquote_
public void blockquote_()
- Specified by:
blockquote_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
blockquote_
in classSinkAdapter
- See Also:
HTML.Tag.BLOCKQUOTE
-
division
public void division(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
division
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
division
in classSinkAdapter
- See Also:
HTML.Tag.DIV
-
division_
public void division_()
- Specified by:
division_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
division_
in classSinkAdapter
- See Also:
HTML.Tag.DIV
-
verbatim
public void verbatim(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Depending on whether the decoration attribute is "source" or not, this leads to either emitting<pre><code>
or just<pre>
. No default classes are emitted but the given attributes are always added to thepre
element only.- Specified by:
verbatim
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
verbatim
in classSinkAdapter
- See Also:
HTML.Tag.PRE
,HTML.Tag.CODE
-
verbatim_
public void verbatim_()
- Specified by:
verbatim_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
verbatim_
in classSinkAdapter
- See Also:
HTML.Tag.CODE
,HTML.Tag.PRE
-
horizontalRule
public void horizontalRule(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
horizontalRule
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
horizontalRule
in classSinkAdapter
- See Also:
HTML.Tag.HR
-
table
public void table(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
table
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
table
in classSinkAdapter
-
table_
public void table_()
- Specified by:
table_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
table_
in classSinkAdapter
- See Also:
HTML.Tag.TABLE
-
tableRows
public void tableRows(int[] justification, boolean grid)
The default style class isbodyTable
.- Specified by:
tableRows
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableRows
in classSinkAdapter
- Parameters:
grid
- iftrue
the style classbodyTableBorder
will be added- See Also:
HTML.Tag.TABLE
-
tableRows_
public void tableRows_()
- Specified by:
tableRows_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableRows_
in classSinkAdapter
-
tableRow
public void tableRow(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Rows are striped with two colors by adding the classa
orb
. If the provided attributes specify thehidden
class, the next call to tableRow will set the same striping class as this one. A style forhidden
ortable.bodyTable hidden
may need to be provided to actually hide such a row.- Specified by:
tableRow
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableRow
in classSinkAdapter
- See Also:
HTML.Tag.TR
-
tableRow_
public void tableRow_()
- Specified by:
tableRow_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableRow_
in classSinkAdapter
- See Also:
HTML.Tag.TR
-
tableCell
public void tableCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableCell
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableCell
in classSinkAdapter
-
tableHeaderCell
public void tableHeaderCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableHeaderCell
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableHeaderCell
in classSinkAdapter
-
tableCell_
public void tableCell_()
- Specified by:
tableCell_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableCell_
in classSinkAdapter
-
tableHeaderCell_
public void tableHeaderCell_()
- Specified by:
tableHeaderCell_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableHeaderCell_
in classSinkAdapter
-
tableCaption
public void tableCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableCaption
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableCaption
in classSinkAdapter
- See Also:
HTML.Tag.CAPTION
-
tableCaption_
public void tableCaption_()
- Specified by:
tableCaption_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
tableCaption_
in classSinkAdapter
- See Also:
HTML.Tag.CAPTION
-
anchor
public void anchor(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
anchor
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
anchor
in classSinkAdapter
- See Also:
HTML.Tag.A
-
anchor_
public void anchor_()
- Specified by:
anchor_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
anchor_
in classSinkAdapter
- See Also:
HTML.Tag.A
-
link
public void link(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default style class for external link isexternalLink
.- Specified by:
link
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
link
in classSinkAdapter
- See Also:
HTML.Tag.A
-
link_
public void link_()
- Specified by:
link_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
link_
in classSinkAdapter
- See Also:
HTML.Tag.A
-
inline
public void inline(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
inline
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
inline
in classSinkAdapter
-
inline_
public void inline_()
- Specified by:
inline_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
inline_
in classSinkAdapter
-
italic
public void italic()
- Specified by:
italic
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
italic
in classSinkAdapter
- See Also:
HTML.Tag.I
-
italic_
public void italic_()
- Specified by:
italic_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
italic_
in classSinkAdapter
- See Also:
HTML.Tag.I
-
bold
public void bold()
- Specified by:
bold
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
bold
in classSinkAdapter
- See Also:
HTML.Tag.B
-
bold_
public void bold_()
- Specified by:
bold_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
bold_
in classSinkAdapter
- See Also:
HTML.Tag.B
-
monospaced
public void monospaced()
- Specified by:
monospaced
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
monospaced
in classSinkAdapter
- See Also:
HTML.Tag.CODE
-
monospaced_
public void monospaced_()
- Specified by:
monospaced_
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
monospaced_
in classSinkAdapter
- See Also:
HTML.Tag.CODE
-
lineBreak
public void lineBreak(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
lineBreak
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
lineBreak
in classSinkAdapter
- See Also:
HTML.Tag.BR
-
lineBreakOpportunity
public void lineBreakOpportunity(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
lineBreakOpportunity
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
lineBreakOpportunity
in classSinkAdapter
-
pageBreak
public void pageBreak()
- Specified by:
pageBreak
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
pageBreak
in classSinkAdapter
-
nonBreakingSpace
public void nonBreakingSpace()
- Specified by:
nonBreakingSpace
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
nonBreakingSpace
in classSinkAdapter
-
text
public void text(java.lang.String text, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
text
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
text
in classSinkAdapter
-
rawText
public void rawText(java.lang.String text)
- Specified by:
rawText
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
rawText
in classSinkAdapter
-
comment
public void comment(java.lang.String comment)
- Specified by:
comment
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
comment
in classSinkAdapter
-
unknown
public void unknown(java.lang.String name, java.lang.Object[] requiredParams, org.apache.maven.doxia.sink.SinkEventAttributes attributes)
Add an unknown event. This can be used to generate html tags for which no corresponding sink event exists.If
HtmlTools.getHtmlTag(name)
does not return null, the corresponding tag will be written.For example, the div block
<div class="detail" style="display:inline">text</div>
can be generated via the following event sequence:
SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute(SinkEventAttributes.CLASS, "detail"); atts.addAttribute(SinkEventAttributes.STYLE, "display:inline"); sink.unknown("div", new Object[]{new Integer(HtmlMarkup.TAG_TYPE_START)}, atts); sink.text("text"); sink.unknown("div", new Object[]{new Integer(HtmlMarkup.TAG_TYPE_END)}, null);
- Specified by:
unknown
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
unknown
in classSinkAdapter
- Parameters:
name
- the name of the event. If this is not a valid xhtml tag name as defined inHtmlMarkup
then the event is ignored.requiredParams
- If this is null or the first argument is not an Integer then the event is ignored. The first argument should indicate the type of the unknown event, its integer value should be one ofTAG_TYPE_START
,TAG_TYPE_END
,TAG_TYPE_SIMPLE
,ENTITY_TYPE
, orCDATA_TYPE
, otherwise the event will be ignored.attributes
- a set of attributes for the event. May be null. The attributes will always be written, no validity check is performed.
-
flush
public void flush()
- Specified by:
flush
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
flush
in classSinkAdapter
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceorg.apache.maven.doxia.sink.Sink
- Overrides:
close
in classSinkAdapter
-
content
protected void content(java.lang.String text)
Write HTML escaped text to output.- Parameters:
text
- The text to write.
-
verbatimContent
protected void verbatimContent(java.lang.String text)
Write HTML escaped text to output.- Parameters:
text
- The text to write.
-
escapeHTML
protected static java.lang.String escapeHTML(java.lang.String text)
Forward to HtmlTools.escapeHTML(text).- Parameters:
text
- the String to escape, may be null- Returns:
- the text escaped, "" if null String input
- See Also:
HtmlTools.escapeHTML(String)
-
encodeURL
protected static java.lang.String encodeURL(java.lang.String text)
Forward to HtmlTools.encodeURL(text).- Parameters:
text
- the String to encode, may be null.- Returns:
- the text encoded, null if null String input.
- See Also:
HtmlTools.encodeURL(String)
-
write
protected void write(java.lang.String text)
Write a text to the sink.- Specified by:
write
in classAbstractXmlSink
- Parameters:
text
- the given text to write
-
writeStartTag
protected void writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att, boolean isSimpleTag)
Starts a Tag with attributes. For instance:<tag attName="attValue">
- Overrides:
writeStartTag
in classAbstractXmlSink
- Parameters:
t
- a non null tag.att
- a set of attributes. May be null.isSimpleTag
- boolean to write as a simple tag.
-
writeEndTag
protected void writeEndTag(javax.swing.text.html.HTML.Tag t)
Ends a Tag without writing an EOL. For instance:</tag>
.- Overrides:
writeEndTag
in classAbstractXmlSink
- Parameters:
t
- a tag.
-
-