Package org.apache.maven.doxia.sink.impl
Class XhtmlBaseSink
- 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.XhtmlBaseSink
-
- All Implemented Interfaces:
org.apache.maven.doxia.logging.LogEnabled,HtmlMarkup,Markup,XmlMarkup,org.apache.maven.doxia.sink.Sink
public class XhtmlBaseSink extends AbstractXmlSink implements HtmlMarkup
Abstract base xhtml sink implementation.- Since:
- 1.1
- Author:
- Jason van Zyl, ltheussl
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Stack<java.util.List<javax.swing.text.html.HTML.Tag>>inlineStackKeep track of the closing tags for inline events.protected javax.swing.text.MutableAttributeSettableAttributesused to store attributes passed to table().protected booleantableRowsFlag to know iftableRows(int[], boolean)is called or not.-
Fields inherited from interface org.apache.maven.doxia.markup.HtmlMarkup
A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CANVAS, CAPTION, CDATA_TYPE, CENTER, CITE, CODE, COL, COLGROUP, COMMAND, DATA, DATALIST, DD, DEL, DETAILS, DFN, DIALOG, DIR, DIV, DL, DT, EM, EMBED, ENTITY_TYPE, FIELDSET, FIGCAPTION, FIGURE, FONT, FOOTER, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HEADER, HGROUP, HR, HTML, I, IFRAME, IMG, INPUT, INS, ISINDEX, KBD, KEYGEN, LABEL, LEGEND, LI, LINK, MAIN, MAP, MARK, MENU, META, METER, NAV, NOFRAMES, 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, STRIKE, STRONG, STYLE, SUB, SUMMARY, SUP, TABLE, TAG_TYPE_END, TAG_TYPE_SIMPLE, TAG_TYPE_START, TBODY, TD, TEMPLATE, TEXTAREA, TFOOT, TH, THEAD, TIME, TITLE, TR, TRACK, TT, 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, ROLE, 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 XhtmlBaseSink(java.io.Writer out)Constructor, initialize the PrintWriter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddress()voidaddress(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidaddress_()voidanchor(java.lang.String name)voidanchor(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidanchor_()voidblockquote()voidblockquote(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidblockquote_()voidbold()voidbold_()voidclose()voidcomment(java.lang.String comment)protected voidcontent(java.lang.String text)Write HTML escaped text to output.voiddefinedTerm()voiddefinedTerm(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voiddefinedTerm_()voiddefinition()voiddefinition(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voiddefinition_()voiddefinitionList()voiddefinitionList(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voiddefinitionList_()voiddivision()voiddivision(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voiddivision_()protected static java.lang.StringencodeURL(java.lang.String text)Forward to HtmlTools.encodeURL( text ).protected static java.lang.StringescapeHTML(java.lang.String text)Forward to HtmlTools.escapeHTML( text ).voidfigure()Deprecated.Usefigure(SinkEventAttributes), this method is only kept for backward compatibility.voidfigure(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidfigure_()voidfigureCaption()Deprecated.UsefigureCaption(SinkEventAttributes), this method is only kept for backward compatibility.voidfigureCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidfigureCaption_()voidfigureGraphics(java.lang.String name)Deprecated.UsefigureGraphics(String,SinkEventAttributes), this method is only kept for backward compatibility.voidfigureGraphics(java.lang.String src, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidflush()protected intgetCellCount()Getter for the fieldcellCount.protected int[]getCellJustif()Getter for the fieldcellJustif.protected java.lang.StringBuffergetTextBuffer()To use mainly when playing with the head events.voidhorizontalRule()voidhorizontalRule(org.apache.maven.doxia.sink.SinkEventAttributes attributes)protected voidinit()This is called inSink.head()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.voidinline()voidinline(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidinline_()protected booleanisHeadFlag()isHeadFlag.protected booleanisVerbatimFlag()isVerbatimFlag.voiditalic()voiditalic_()voidlineBreak()voidlineBreak(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidlink(java.lang.String name)voidlink(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidlink_()voidlist()voidlist(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidlist_()voidlistItem()voidlistItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidlistItem_()voidmonospaced()voidmonospaced_()voidnonBreakingSpace()voidnumberedList(int numbering)The default list style depends on the numbering.voidnumberedList(int numbering, org.apache.maven.doxia.sink.SinkEventAttributes attributes)The default list style depends on the numbering.voidnumberedList_()voidnumberedListItem()voidnumberedListItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidnumberedListItem_()protected voidonSection(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)Starts a section.protected voidonSection_(int depth)Ends a section.protected voidonSectionTitle(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)Starts a section title.protected voidonSectionTitle_(int depth)Ends a section title.voidpageBreak()voidparagraph()voidparagraph(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidparagraph_()voidrawText(java.lang.String text)protected voidresetState()Deprecated.since 1.1.2, useinit()instead of.protected voidresetTextBuffer()Reset the text buffer.voidsection(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidsection_(int level)voidsection1()voidsection1_()voidsection2()voidsection2_()voidsection3()voidsection3_()voidsection4()voidsection4_()voidsection5()voidsection5_()voidsectionTitle(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidsectionTitle_(int level)voidsectionTitle1()voidsectionTitle1_()voidsectionTitle2()voidsectionTitle2_()voidsectionTitle3()voidsectionTitle3_()voidsectionTitle4()voidsectionTitle4_()voidsectionTitle5()voidsectionTitle5_()protected voidsetCellCount(int count)Setter for the fieldcellCount.protected voidsetCellJustif(int[] justif)Setter for the fieldcellJustif.protected voidsetHeadFlag(boolean headFlag)Setter for the fieldheadFlag.protected voidsetVerbatimFlag(boolean verb)Setter for the fieldverbatimFlag.voidtable()voidtable(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidtable_()voidtableCaption()voidtableCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidtableCaption_()voidtableCell()voidtableCell(java.lang.String width)voidtableCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidtableCell_()voidtableHeaderCell()voidtableHeaderCell(java.lang.String width)voidtableHeaderCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidtableHeaderCell_()voidtableRow()The default class style isaorbdepending the row id.voidtableRow(org.apache.maven.doxia.sink.SinkEventAttributes attributes)The default class style isaorbdepending the row id.voidtableRow_()voidtableRows(int[] justification, boolean grid)The default class style isbodyTable.voidtableRows_()voidtext(java.lang.String text)voidtext(java.lang.String text, org.apache.maven.doxia.sink.SinkEventAttributes attributes)voidunknown(java.lang.String name, java.lang.Object[] requiredParams, org.apache.maven.doxia.sink.SinkEventAttributes attributes)Add an unknown event.voidverbatim(boolean boxed)The default class style for boxed issource.voidverbatim(org.apache.maven.doxia.sink.SinkEventAttributes attributes)The default class style for boxed issource.voidverbatim_()protected voidverbatimContent(java.lang.String text)Write HTML escaped text to output.protected voidwrite(java.lang.String text)Write a text to the sink.protected voidwriteEndTag(javax.swing.text.html.HTML.Tag t)Ends a Tag without writing an EOL.protected voidwriteStartTag(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
article, article, article_, author, author, author_, body, body, body_, content, content, content_, data, data, data_, date, date, date_, definitionListItem, definitionListItem, definitionListItem_, footer, footer, footer_, head, head, head_, header, header, header_, lineBreakOpportunity, lineBreakOpportunity, navigation, navigation, navigation_, section6, section6_, sectionTitle, sectionTitle_, sectionTitle6, sectionTitle6_, sidebar, sidebar, sidebar_, time, time, time_, title, title, title_
-
Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractSink
enableLogging, getLog, unifyEOLs
-
-
-
-
Field Detail
-
tableAttributes
protected javax.swing.text.MutableAttributeSet tableAttributes
used to store attributes passed to table().
-
tableRows
protected boolean tableRows
Flag to know iftableRows(int[], boolean)is called or not. It is mainly to be backward compatible with some plugins (like checkstyle) which uses:sink.table(); sink.tableRow();
instead ofsink.table(); sink.tableRows( justify, true ); sink.tableRow();
-
inlineStack
protected java.util.Stack<java.util.List<javax.swing.text.html.HTML.Tag>> inlineStack
Keep track of the closing tags for inline events.
-
-
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.
-
setVerbatimFlag
protected void setVerbatimFlag(boolean verb)
Setter for the field
verbatimFlag.- Parameters:
verb- a verbatim flag.
-
isVerbatimFlag
protected boolean isVerbatimFlag()
isVerbatimFlag.
- Returns:
- the current verbatim flag.
-
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.
-
resetState
protected void resetState()
Deprecated.since 1.1.2, useinit()instead of.Reset all variables.
-
init
protected void init()
This is called inSink.head()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.- Overrides:
initin classAbstractSink
-
resetTextBuffer
protected void resetTextBuffer()
Reset the text buffer.
-
section
public void section(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
sectionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionin classSinkAdapter
-
sectionTitle
public void sectionTitle(int level, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
sectionTitlein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitlein 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
-
section1
public void section1()
- Specified by:
section1in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section1in classSinkAdapter
-
sectionTitle1
public void sectionTitle1()
- Specified by:
sectionTitle1in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle1in classSinkAdapter
-
sectionTitle1_
public void sectionTitle1_()
- Specified by:
sectionTitle1_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle1_in classSinkAdapter
-
section1_
public void section1_()
- Specified by:
section1_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section1_in classSinkAdapter
-
section2
public void section2()
- Specified by:
section2in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section2in classSinkAdapter
-
sectionTitle2
public void sectionTitle2()
- Specified by:
sectionTitle2in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle2in classSinkAdapter
-
sectionTitle2_
public void sectionTitle2_()
- Specified by:
sectionTitle2_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle2_in classSinkAdapter
-
section2_
public void section2_()
- Specified by:
section2_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section2_in classSinkAdapter
-
section3
public void section3()
- Specified by:
section3in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section3in classSinkAdapter
-
sectionTitle3
public void sectionTitle3()
- Specified by:
sectionTitle3in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle3in classSinkAdapter
-
sectionTitle3_
public void sectionTitle3_()
- Specified by:
sectionTitle3_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle3_in classSinkAdapter
-
section3_
public void section3_()
- Specified by:
section3_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section3_in classSinkAdapter
-
section4
public void section4()
- Specified by:
section4in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section4in classSinkAdapter
-
sectionTitle4
public void sectionTitle4()
- Specified by:
sectionTitle4in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle4in classSinkAdapter
-
sectionTitle4_
public void sectionTitle4_()
- Specified by:
sectionTitle4_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle4_in classSinkAdapter
-
section4_
public void section4_()
- Specified by:
section4_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section4_in classSinkAdapter
-
section5
public void section5()
- Specified by:
section5in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section5in classSinkAdapter
-
sectionTitle5
public void sectionTitle5()
- Specified by:
sectionTitle5in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle5in classSinkAdapter
-
sectionTitle5_
public void sectionTitle5_()
- Specified by:
sectionTitle5_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
sectionTitle5_in classSinkAdapter
-
section5_
public void section5_()
- Specified by:
section5_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
section5_in classSinkAdapter
-
onSection
protected void onSection(int depth, org.apache.maven.doxia.sink.SinkEventAttributes attributes)Starts a section. The default class style issection.- Parameters:
depth- The level of the section.attributes- some attributes. May be null.- See Also:
HTML.Tag.DIV
-
onSection_
protected void onSection_(int depth)
Ends a section.- Parameters:
depth- The level of the section.- See Also:
HTML.Tag.DIV
-
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:
HTML.Tag.H2,HTML.Tag.H3,HTML.Tag.H4,HTML.Tag.H5,HTML.Tag.H6
-
onSectionTitle_
protected void onSectionTitle_(int depth)
Ends a section title.- Parameters:
depth- The level of the section title.- See Also:
HTML.Tag.H2,HTML.Tag.H3,HTML.Tag.H4,HTML.Tag.H5,HTML.Tag.H6
-
list
public void list()
- Specified by:
listin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
listin classSinkAdapter- See Also:
HTML.Tag.UL
-
list
public void list(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
listin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
listin 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()
- Specified by:
listItemin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
listItemin classSinkAdapter- See Also:
HTML.Tag.LI
-
listItem
public void listItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
listItemin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
listItemin 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)
The default list style depends on the numbering.- Specified by:
numberedListin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
numberedListin classSinkAdapter- See Also:
HTML.Tag.OL
-
numberedList
public void numberedList(int numbering, org.apache.maven.doxia.sink.SinkEventAttributes attributes)The default list style depends on the numbering.- Specified by:
numberedListin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
numberedListin 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()
- Specified by:
numberedListItemin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
numberedListItemin classSinkAdapter- See Also:
HTML.Tag.LI
-
numberedListItem
public void numberedListItem(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
numberedListItemin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
numberedListItemin 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()
- Specified by:
definitionListin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definitionListin classSinkAdapter- See Also:
HTML.Tag.DL
-
definitionList
public void definitionList(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
definitionListin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definitionListin 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:
definedTermin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definedTermin classSinkAdapter- See Also:
HTML.Tag.DT
-
definedTerm
public void definedTerm()
- Specified by:
definedTermin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definedTermin 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()
- Specified by:
definitionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definitionin classSinkAdapter- See Also:
HTML.Tag.DD
-
definition
public void definition(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
definitionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
definitionin 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()
Deprecated.Usefigure(SinkEventAttributes), this method is only kept for backward compatibility. Note that the behavior is different though, as this method writes an img tag, while correctly the img tag should be written by figureGraphics().- Specified by:
figurein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figurein classSinkAdapter- See Also:
HTML.Tag.IMG
-
figure
public void figure(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
figurein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figurein classSinkAdapter- See Also:
HTML.Tag.IMG
-
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 name)
Deprecated.UsefigureGraphics(String,SinkEventAttributes), this method is only kept for backward compatibility. Note that the behavior is different though, as this method does not write the img tag, only the src attribute.- Specified by:
figureGraphicsin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figureGraphicsin classSinkAdapter
-
figureGraphics
public void figureGraphics(java.lang.String src, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
figureGraphicsin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figureGraphicsin classSinkAdapter
-
figureCaption
public void figureCaption()
Deprecated.UsefigureCaption(SinkEventAttributes), this method is only kept for backward compatibility. Note that the behavior is different though, as this method only writes an alt attribute.- Specified by:
figureCaptionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figureCaptionin classSinkAdapter
-
figureCaption
public void figureCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
figureCaptionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figureCaptionin classSinkAdapter
-
figureCaption_
public void figureCaption_()
- Specified by:
figureCaption_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
figureCaption_in classSinkAdapter
-
paragraph
public void paragraph()
- Specified by:
paragraphin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
paragraphin classSinkAdapter- See Also:
HTML.Tag.P
-
paragraph
public void paragraph(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
paragraphin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
paragraphin 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
-
address
public void address()
- Specified by:
addressin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
addressin classSinkAdapter- See Also:
HTML.Tag.ADDRESS
-
address
public void address(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
addressin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
addressin 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()
- Specified by:
blockquotein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
blockquotein classSinkAdapter- See Also:
HTML.Tag.BLOCKQUOTE
-
blockquote
public void blockquote(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
blockquotein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
blockquotein 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()
- Specified by:
divisionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
divisionin classSinkAdapter- See Also:
HTML.Tag.DIV
-
division
public void division(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
divisionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
divisionin 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(boolean boxed)
The default class style for boxed issource.- Specified by:
verbatimin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
verbatimin classSinkAdapter- See Also:
HTML.Tag.DIV,HTML.Tag.PRE
-
verbatim
public void verbatim(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default class style for boxed issource.- Specified by:
verbatimin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
verbatimin classSinkAdapter- See Also:
HTML.Tag.DIV,HTML.Tag.PRE
-
verbatim_
public void verbatim_()
- Specified by:
verbatim_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
verbatim_in classSinkAdapter- See Also:
HTML.Tag.DIV,HTML.Tag.PRE
-
horizontalRule
public void horizontalRule()
- Specified by:
horizontalRulein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
horizontalRulein classSinkAdapter- See Also:
HTML.Tag.HR
-
horizontalRule
public void horizontalRule(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
horizontalRulein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
horizontalRulein classSinkAdapter- See Also:
HTML.Tag.HR
-
table
public void table()
- Specified by:
tablein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tablein classSinkAdapter
-
table
public void table(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tablein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tablein 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 class style isbodyTable. The default align iscenter.- Specified by:
tableRowsin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableRowsin classSinkAdapter- 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()
The default class style isaorbdepending the row id.- Specified by:
tableRowin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableRowin classSinkAdapter- See Also:
HTML.Tag.TR
-
tableRow
public void tableRow(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
The default class style isaorbdepending the row id.- Specified by:
tableRowin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableRowin 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()
- Specified by:
tableCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableCellin classSinkAdapter
-
tableHeaderCell
public void tableHeaderCell()
- Specified by:
tableHeaderCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableHeaderCellin classSinkAdapter
-
tableCell
public void tableCell(java.lang.String width)
- Specified by:
tableCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableCellin classSinkAdapter
-
tableHeaderCell
public void tableHeaderCell(java.lang.String width)
- Specified by:
tableHeaderCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableHeaderCellin classSinkAdapter
-
tableCell
public void tableCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableCellin classSinkAdapter
-
tableHeaderCell
public void tableHeaderCell(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableHeaderCellin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableHeaderCellin 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()
- Specified by:
tableCaptionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableCaptionin classSinkAdapter- See Also:
HTML.Tag.CAPTION
-
tableCaption
public void tableCaption(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
tableCaptionin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
tableCaptionin 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)
- Specified by:
anchorin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
anchorin classSinkAdapter- See Also:
HTML.Tag.A
-
anchor
public void anchor(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
anchorin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
anchorin 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)
- Specified by:
linkin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
linkin classSinkAdapter
-
link
public void link(java.lang.String name, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
linkin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
linkin classSinkAdapter
-
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()
- Specified by:
inlinein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
inlinein classSinkAdapter
-
inline
public void inline(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
inlinein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
inlinein 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:
italicin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
italicin 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:
boldin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
boldin 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:
monospacedin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
monospacedin classSinkAdapter- See Also:
HTML.Tag.TT
-
monospaced_
public void monospaced_()
- Specified by:
monospaced_in interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
monospaced_in classSinkAdapter- See Also:
HTML.Tag.TT
-
lineBreak
public void lineBreak()
- Specified by:
lineBreakin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
lineBreakin classSinkAdapter- See Also:
HTML.Tag.BR
-
lineBreak
public void lineBreak(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
- Specified by:
lineBreakin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
lineBreakin classSinkAdapter- See Also:
HTML.Tag.BR
-
pageBreak
public void pageBreak()
- Specified by:
pageBreakin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
pageBreakin classSinkAdapter
-
nonBreakingSpace
public void nonBreakingSpace()
- Specified by:
nonBreakingSpacein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
nonBreakingSpacein classSinkAdapter
-
text
public void text(java.lang.String text)
- Specified by:
textin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
textin classSinkAdapter
-
text
public void text(java.lang.String text, org.apache.maven.doxia.sink.SinkEventAttributes attributes)- Specified by:
textin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
textin classSinkAdapter
-
rawText
public void rawText(java.lang.String text)
- Specified by:
rawTextin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
rawTextin classSinkAdapter
-
comment
public void comment(java.lang.String comment)
- Specified by:
commentin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
commentin 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:
unknownin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
unknownin classSinkAdapter- Parameters:
name- the name of the event. If this is not a valid xhtml tag name as defined inHtmlMarkupthen 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:
flushin interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
flushin classSinkAdapter
-
close
public void close()
- Specified by:
closein interfaceorg.apache.maven.doxia.sink.Sink- Overrides:
closein 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:
writein 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:
writeStartTagin 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:
writeEndTagin classAbstractXmlSink- Parameters:
t- a tag.
-
-