Class AbstractSink
- All Implemented Interfaces:
AutoCloseable,Markup,Sink
- Direct Known Subclasses:
SinkAdapter,SinkWrapper
SinkEventAttributes).
This implementation just delegates the former to the latter with argument SinkEventAttributes being null.- Since:
- 1.1
- Author:
- ltheussl, Vincent Siveton
-
Field Summary
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, STARFields inherited from interface org.apache.maven.doxia.sink.Sink
JUSTIFY_CENTER, JUSTIFY_DEFAULT, 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddress()Starts an address element.final voidStarts an element which defines an anchor.final voidarticle()Starts an article within a document.final voidauthor()Starts an author element.final voidStarts a blockquote element.final voidbody()Starts the body of a document.final voidcontent()Start the main content section between the header and the footer within the sections and/or body.final voidStarts a data element which groups together other elements representing microformats.final voiddate()Starts the date element.final voidStarts a definition term element within a definition list.final voidStarts a definition element within a definition list.final voidStarts a definition list element.final voidStarts a list item element within a definition list.final voiddivision()Starts a division element grouping together other elements.final voidfigure()Starts a basic image embedding element.final voidStarts a caption of an image element.final voidfigureGraphics(String name) Adds a graphic element.final voidfooter()Start a new footer within the section or body.static StringformatLocation(Locator locator) Creates a string with line/column information.Returns the locator which exposes location information for a particular Sink event.protected Stringfinal voidhead()Starts the head element.final voidheader()Start a new header within the section or body.final voidAdds a separator of sections from a text to each other.protected voidinit()This is called inhead()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.final voidinline()Starts an inline element.final voidAdds a line break.final voidAdds a line break opportunity.final voidStarts an element which defines a link.final voidlist()Starts an unordered list element.final voidlistItem()Starts a list item element within an unordered list.final voidStarts a navigation section within a document.final voidnumberedList(int numbering) Starts an ordered list element.final voidStarts a list item element within an ordered list.final voidStarts an element which represents a paragraph.final voidsection1()Starts a first heading element which contains the topic of the section.final voidEnds a first heading element.final voidsection2()Starts a second heading element which contains the topic of the section.final voidEnds a second heading element.final voidsection3()Starts a third heading element which contains the topic of the section.final voidEnds a third heading element.final voidsection4()Starts a 4th heading element which contains the topic of the section.final voidEnds a 4th heading element.final voidsection5()Starts a 5th heading element which contains the topic of the section.final voidEnds a 5th heading element.final voidsection6()Starts a 6th heading element which contains the topic of the section.final voidEnds a 6th heading element.final voidWas never properly evaluated by any Sink implementation because section titles (and sections) always started from 1 (not from 0).final voidWas never properly evaluated by any Sink implementation because section titles (and sections) always started from 1 (not from 0).final voidStarts a first title heading element.final voidEnds a first title heading element.final voidStarts a second title heading element.final voidEnds a second title heading element.final voidStarts a third title heading element.final voidEnds a third title heading element.final voidStarts a 4th title heading element.final voidEnds a 4th title heading element.final voidStarts a 5th title heading element.final voidEnds a 5th title heading element.final voidStarts a 6th title heading element.final voidEnds a 6th title heading element.voidsetDocumentLocator(Locator locator) Sets the locator which exposes location information for a particular Sink event.final voidsidebar()Starts a sidebar section within a document.final voidtable()Starts a table element for marking up tabular information in a document.final voidStarts a caption element of a table.final voidStarts a cell element which defines a cell that contains data.final voidStarts a cell element which defines a cell that contains header information.final voidtableRow()Starts a row element which acts as a container for a row of table cells.final voidStarts an element that contains rows of table data.final voidAdds a text.final voidStarts a time element which groups together other elements representing a time.final voidtitle()Starts the title element.protected static StringParses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL.final voidverbatim()Starts a verbatim block, ie a block where whitespace has semantic relevance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.doxia.sink.Sink
address, address_, anchor, anchor_, article, article_, author, author_, blockquote, blockquote_, body, body_, bold, bold_, close, comment, content, content_, data, data_, date, date_, definedTerm, definedTerm_, definition, definition_, definitionList, definitionList_, definitionListItem, definitionListItem_, division, division_, figure, figure_, figureCaption, figureCaption_, figureGraphics, flush, footer, footer_, head, head_, header, header_, horizontalRule, inline, inline_, italic, italic_, lineBreak, lineBreakOpportunity, link, link_, list, list_, listItem, listItem_, markupLineBreak, monospaced, monospaced_, navigation, navigation_, nonBreakingSpace, numberedList, numberedList_, numberedListItem, numberedListItem_, pageBreak, paragraph, paragraph_, rawText, section, section_, sectionTitle, sectionTitle_, sidebar, sidebar_, table, table_, tableCaption, tableCaption_, tableCell, tableCell_, tableHeaderCell, tableHeaderCell_, tableRow, tableRow_, tableRows, tableRows_, text, time, time_, title, title_, unknown, verbatim, verbatim_
-
Constructor Details
-
AbstractSink
public AbstractSink()
-
-
Method Details
-
head
Description copied from interface:SinkStarts the head element. Shortcut forSink.head(SinkEventAttributes)with first argument beingnull. -
title
Description copied from interface:SinkStarts the title element. Shortcut forSink.title(SinkEventAttributes)with first argument beingnull. -
author
Description copied from interface:SinkStarts an author element. Shortcut forSink.author(SinkEventAttributes)with first argument beingnull. -
date
Description copied from interface:SinkStarts the date element. Shortcut forSink.date(SinkEventAttributes)with first argument beingnull. -
body
Description copied from interface:SinkStarts the body of a document. Shortcut forSink.body(SinkEventAttributes)with first argument beingnull. -
article
Description copied from interface:SinkStarts an article within a document. Shortcut forSink.article(SinkEventAttributes)with first argument beingnull. -
sidebar
Description copied from interface:SinkStarts a sidebar section within a document. Shortcut forSink.sidebar(SinkEventAttributes)with first argument beingnull. -
sectionTitle
Description copied from interface:SinkWas never properly evaluated by any Sink implementation because section titles (and sections) always started from 1 (not from 0).- Specified by:
sectionTitlein interfaceSink
-
section1
Description copied from interface:SinkStarts a first heading element which contains the topic of the section. Shortcut forSink.section(int, SinkEventAttributes)with first argument being1and second argument beingnull. -
sectionTitle_
Description copied from interface:SinkWas never properly evaluated by any Sink implementation because section titles (and sections) always started from 1 (not from 0).- Specified by:
sectionTitle_in interfaceSink
-
section1_
Description copied from interface:SinkEnds a first heading element. Shortcut forSink.section_(int)with argument being1. -
sectionTitle1
Description copied from interface:SinkStarts a first title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section1()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being1and second argument beingnull.- Specified by:
sectionTitle1in interfaceSink- See Also:
-
sectionTitle1_
Description copied from interface:SinkEnds a first title heading element. Shortcut forSink.sectionTitle_(int)with argument being1.- Specified by:
sectionTitle1_in interfaceSink
-
section2
Description copied from interface:SinkStarts a second heading element which contains the topic of the section. This has to be contained within aSink.section1()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being2and second argument beingnull. -
section2_
Description copied from interface:SinkEnds a second heading element. Shortcut forSink.section_(int)with argument being2. -
sectionTitle2
Description copied from interface:SinkStarts a second title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section2()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being2and second argument beingnull.- Specified by:
sectionTitle2in interfaceSink- See Also:
-
sectionTitle2_
Description copied from interface:SinkEnds a second title heading element. Shortcut forSink.sectionTitle_(int)with argument being2.- Specified by:
sectionTitle2_in interfaceSink
-
section3
Description copied from interface:SinkStarts a third heading element which contains the topic of the section. This has to be contained within aSink.section2()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being3and second argument beingnull. -
section3_
Description copied from interface:SinkEnds a third heading element. Shortcut forSink.section_(int)with argument being3. -
sectionTitle3
Description copied from interface:SinkStarts a third title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section3()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being3and second argument beingnull.- Specified by:
sectionTitle3in interfaceSink- See Also:
-
sectionTitle3_
Description copied from interface:SinkEnds a third title heading element. Shortcut forSink.sectionTitle_(int)with argument being3.- Specified by:
sectionTitle3_in interfaceSink
-
section4
Description copied from interface:SinkStarts a 4th heading element which contains the topic of the section. This has to be contained within aSink.section3()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being4and second argument beingnull. -
section4_
Description copied from interface:SinkEnds a 4th heading element. Shortcut forSink.section_(int)with argument being4. -
sectionTitle4
Description copied from interface:SinkStarts a 4th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section4()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being4and second argument beingnull.- Specified by:
sectionTitle4in interfaceSink- See Also:
-
sectionTitle4_
Description copied from interface:SinkEnds a 4th title heading element. Shortcut forSink.sectionTitle_(int)with argument being4.- Specified by:
sectionTitle4_in interfaceSink
-
section5
Description copied from interface:SinkStarts a 5th heading element which contains the topic of the section. This has to be contained within aSink.section5()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being5and second argument beingnull. -
section5_
Description copied from interface:SinkEnds a 5th heading element. Shortcut forSink.section_(int)with argument being5. -
sectionTitle5
Description copied from interface:SinkStarts a 5th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section5()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being5and second argument beingnull.- Specified by:
sectionTitle5in interfaceSink- See Also:
-
sectionTitle5_
Description copied from interface:SinkEnds a 5th title heading element. Shortcut forSink.sectionTitle_(int)with argument being5.- Specified by:
sectionTitle5_in interfaceSink
-
section6
Description copied from interface:SinkStarts a 6th heading element which contains the topic of the section. This has to be contained within aSink.section6()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being6and second argument beingnull. -
section6_
Description copied from interface:SinkEnds a 6th heading element. Shortcut forSink.section_(int)with argument being6. -
sectionTitle6
Description copied from interface:SinkStarts a 6th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section5()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being6and second argument beingnull.- Specified by:
sectionTitle6in interfaceSink- See Also:
-
sectionTitle6_
Description copied from interface:SinkEnds a 6th title heading element. Shortcut forSink.sectionTitle_(int)with argument being6.- Specified by:
sectionTitle6_in interfaceSink
-
header
Description copied from interface:SinkStart a new header within the section or body. Shortcut forSink.header(SinkEventAttributes)with argument beingnull. -
content
Description copied from interface:SinkStart the main content section between the header and the footer within the sections and/or body. Shortcut forSink.content(SinkEventAttributes)with argument beingnull. -
list
Description copied from interface:SinkStarts an unordered list element. Shortcut forSink.list(SinkEventAttributes)with argument beingnull. -
listItem
Description copied from interface:SinkStarts a list item element within an unordered list. Shortcut forSink.listItem(SinkEventAttributes)with argument beingnull. -
numberedList
Description copied from interface:SinkStarts an ordered list element. Shortcut forSink.numberedList(int, SinkEventAttributes)with first argument beingnumberingand second argument beingnull.- Specified by:
numberedListin interfaceSink- Parameters:
numbering- the numbering style.- See Also:
-
numberedListItem
Description copied from interface:SinkStarts a list item element within an ordered list. Shortcut forSink.numberedListItem(SinkEventAttributes)with argument beingnull.- Specified by:
numberedListItemin interfaceSink- See Also:
-
definitionList
Description copied from interface:SinkStarts a definition list element. Shortcut forSink.definitionList(SinkEventAttributes)with argument beingnull.- Specified by:
definitionListin interfaceSink- See Also:
-
definitionListItem
Description copied from interface:SinkStarts a list item element within a definition list. Shortcut forSink.definitionListItem(SinkEventAttributes)with argument beingnull.- Specified by:
definitionListItemin interfaceSink- See Also:
-
definition
Description copied from interface:SinkStarts a definition element within a definition list. Shortcut forSink.definition(SinkEventAttributes)with argument beingnull.- Specified by:
definitionin interfaceSink- See Also:
-
definedTerm
Description copied from interface:SinkStarts a definition term element within a definition list. Shortcut forSink.definedTerm(SinkEventAttributes)with argument beingnull.- Specified by:
definedTermin interfaceSink- See Also:
-
figure
Description copied from interface:SinkStarts a basic image embedding element. Shortcut forSink.figure(SinkEventAttributes)with argument beingnull. -
figureCaption
Description copied from interface:SinkStarts a caption of an image element. Shortcut forSink.figureCaption(SinkEventAttributes)with argument beingnull.- Specified by:
figureCaptionin interfaceSink- See Also:
-
figureGraphics
Description copied from interface:SinkAdds a graphic element. Shortcut forSink.figureGraphics(String, SinkEventAttributes)with first argument beingsrcand second argument beingnull.- Specified by:
figureGraphicsin interfaceSink- Parameters:
name- the source
-
table
Description copied from interface:SinkStarts a table element for marking up tabular information in a document. Shortcut forSink.table(SinkEventAttributes)with argument beingnull. -
tableRows
Description copied from interface:SinkStarts an element that contains rows of table data. Shortcut forSink.tableRows(int[], boolean)with first argument beingnulland second beingfalse. -
tableRow
Description copied from interface:SinkStarts a row element which acts as a container for a row of table cells. Shortcut forSink.tableRow(SinkEventAttributes)with argument beingnull. -
tableCell
Description copied from interface:SinkStarts a cell element which defines a cell that contains data. Shortcut forSink.tableCell(SinkEventAttributes)with argument beingnull. -
tableHeaderCell
Description copied from interface:SinkStarts a cell element which defines a cell that contains header information. Shortcut forSink.tableHeaderCell(SinkEventAttributes)with argument beingnull.- Specified by:
tableHeaderCellin interfaceSink- See Also:
-
tableCaption
Description copied from interface:SinkStarts a caption element of a table. Shortcut forSink.tableCaption(SinkEventAttributes)with argument beingnull.- Specified by:
tableCaptionin interfaceSink- See Also:
-
paragraph
Description copied from interface:SinkStarts an element which represents a paragraph. Shortcut forSink.paragraph(SinkEventAttributes)with argument beingnull. -
data
Description copied from interface:SinkStarts a data element which groups together other elements representing microformats. Shortcut forSink.data(String, SinkEventAttributes)with first argument being {code value} and second argument beingnull. -
time
Description copied from interface:SinkStarts a time element which groups together other elements representing a time. Shortcut forSink.time(String, SinkEventAttributes)with first argument being {code datetime} and second argument beingnull. -
address
Description copied from interface:SinkStarts an address element. Shortcut forSink.address(SinkEventAttributes)with argument beingnull. -
blockquote
Description copied from interface:SinkStarts a blockquote element. Shortcut forSink.blockquote(SinkEventAttributes)with argument beingnull.- Specified by:
blockquotein interfaceSink- See Also:
-
division
Description copied from interface:SinkStarts a division element grouping together other elements. Shortcut forSink.division(SinkEventAttributes)with argument beingnull. -
verbatim
Description copied from interface:SinkStarts a verbatim block, ie a block where whitespace has semantic relevance. Shortcut forSink.verbatim(SinkEventAttributes)with argument beingnull. -
horizontalRule
Description copied from interface:SinkAdds a separator of sections from a text to each other. Shortcut forSink.horizontalRule(SinkEventAttributes)with argument beingnull.- Specified by:
horizontalRulein interfaceSink- See Also:
-
anchor
Description copied from interface:SinkStarts an element which defines an anchor. Shortcut forSink.anchor(String, SinkEventAttributes)with first argument beingnameand second argument beingnull. -
link
Description copied from interface:SinkStarts an element which defines a link. Shortcut forSink.link(String, SinkEventAttributes)with first argument beingnameand second argument beingnull. -
inline
Description copied from interface:SinkStarts an inline element. Shortcut forSink.inline(SinkEventAttributes)with argument beingnull. -
lineBreak
Description copied from interface:SinkAdds a line break. Shortcut forSink.lineBreak(SinkEventAttributes)with argument beingnull. -
lineBreakOpportunity
Description copied from interface:SinkAdds a line break opportunity. Shortcut forSink.lineBreakOpportunity(SinkEventAttributes)with argument beingnull.- Specified by:
lineBreakOpportunityin interfaceSink- See Also:
-
text
Description copied from interface:SinkAdds a text. Shortcut forSink.text(String, SinkEventAttributes)with first argument beingtextand second argument beingnull. -
unifyEOLs
Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL. All Sinks should make sure that text output is filtered through this method.- Parameters:
text- the text to scan. May be null in which case null is returned.- Returns:
- a String that contains only System EOLs.
-
init
This is called inhead()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.- Since:
- 1.1.2
-
setDocumentLocator
Description copied from interface:SinkSets the locator which exposes location information for a particular Sink event.- Specified by:
setDocumentLocatorin interfaceSink- Parameters:
locator- the locator (nevernull).
-
getDocumentLocator
Description copied from interface:SinkReturns the locator which exposes location information for a particular Sink event.- Specified by:
getDocumentLocatorin interfaceSink- Returns:
- the locator (never
null).
-
getLocationLogPrefix
-
formatLocation
Creates a string with line/column information. Inspired byo.a.m.model.building.ModelProblemUtils.formatLocation(...).- Parameters:
locator- The locator must not benull.- Returns:
- The formatted location or an empty string if unknown, never
null.
-