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
-
Field Summary
FieldsFields 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
address()
Starts an address element.final void
Starts an element which defines an anchor.final void
article()
Starts an article within a document.final void
author()
Starts an author element.final void
Starts a blockquote element.final void
body()
Starts the body of a document.final void
content()
Start the main content section between the header and the footer within the sections and/or body.final void
Starts a data element which groups together other elements representing microformats.final void
date()
Starts the date element.final void
Starts a definition term element within a definition list.final void
Starts a definition element within a definition list.final void
Starts a definition list element.final void
Starts a list item element within a definition list.final void
division()
Starts a division element grouping together other elements.final void
figure()
Starts a basic image embedding element.final void
Starts a caption of an image element.final void
figureGraphics
(String name) Adds a graphic element.final void
footer()
Start a new footer within the section or body.static String
formatLocation
(Locator locator) Creates a string with line/column information.Returns the locator which exposes location information for a particular Sink event.protected String
final void
head()
Starts the head element.final void
header()
Start a new header within the section or body.final void
Adding a separator of sections from a text to each other.protected void
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.final void
inline()
Starts an inline element.final void
Adds a line break.final void
Adds a line break opportunity.final void
Starts an element which defines a link.final void
list()
Starts an unordered list element.final void
listItem()
Starts a list item element within an unordered list.final void
Starts a navigation section within a document.final void
numberedList
(int numbering) Starts an ordered list element.final void
Starts a list item element within an ordered list.final void
Starts an element which represents a paragraph.final void
section1()
Starts a first heading element which contains the topic of the section.final void
Ends a first heading element.final void
section2()
Starts a second heading element which contains the topic of the section.final void
Ends a second heading element.final void
section3()
Starts a third heading element which contains the topic of the section.final void
Ends a third heading element.final void
section4()
Starts a 4th heading element which contains the topic of the section.final void
Ends a 4th heading element.final void
section5()
Starts a 5th heading element which contains the topic of the section.final void
Ends a 5th heading element.final void
section6()
Starts a 6th heading element which contains the topic of the section.final void
Ends a 6th heading element.final void
Starts a title heading element.final void
Ends a title heading element.final void
Starts a first title heading element.final void
Ends a first title heading element.final void
Starts a second title heading element.final void
Ends a second title heading element.final void
Starts a third title heading element.final void
Ends a third title heading element.final void
Starts a 4th title heading element.final void
Ends a 4th title heading element.final void
Starts a 5th title heading element.final void
Ends a 5th title heading element.final void
Starts a 6th title heading element.final void
Ends a 6th title heading element.void
setDocumentLocator
(Locator locator) Sets the locator which exposes location information for a particular Sink event.final void
sidebar()
Starts a sidebar section within a document.final void
table()
Starts a table element for marking up tabular information in a document.final void
Starts a caption element of a table.final void
Starts a cell element which defines a cell that contains data.final void
Starts a cell element which defines a cell that contains header information.final void
tableRow()
Starts a row element which acts as a container for a row of table cells.final void
Starts an element that contains rows of table data.final void
Adding a text.final void
Starts a time element which groups together other elements representing a time.final void
title()
Starts the title element.protected static String
Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL.final void
verbatim()
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, wait
Methods 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_, 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_
-
Field Details
-
locator
-
-
Constructor Details
-
AbstractSink
public AbstractSink()
-
-
Method Details
-
head
public final void head()Description copied from interface:Sink
Starts the head element. Shortcut forSink.head(SinkEventAttributes)
with first argument beingnull
. -
title
public final void title()Description copied from interface:Sink
Starts the title element. Shortcut forSink.title(SinkEventAttributes)
with first argument beingnull
. -
author
public final void author()Description copied from interface:Sink
Starts an author element. Shortcut forSink.author(SinkEventAttributes)
with first argument beingnull
. -
date
public final void date()Description copied from interface:Sink
Starts the date element. Shortcut forSink.date(SinkEventAttributes)
with first argument beingnull
. -
body
public final void body()Description copied from interface:Sink
Starts the body of a document. Shortcut forSink.body(SinkEventAttributes)
with first argument beingnull
. -
article
public final void article()Description copied from interface:Sink
Starts an article within a document. Shortcut forSink.article(SinkEventAttributes)
with first argument beingnull
. -
sidebar
public final void sidebar()Description copied from interface:Sink
Starts a sidebar section within a document. Shortcut forSink.sidebar(SinkEventAttributes)
with first argument beingnull
. -
sectionTitle
public final void sectionTitle()Description copied from interface:Sink
Starts a title heading element. Shortcut forSink.sectionTitle(int, SinkEventAttributes)
with first argument being0
and second argument beingnull
.- Specified by:
sectionTitle
in interfaceSink
-
section1
public final void section1()Description copied from interface:Sink
Starts a first heading element which contains the topic of the section. Shortcut forSink.section(int, SinkEventAttributes)
with first argument being1
and second argument beingnull
. -
sectionTitle_
public final void sectionTitle_()Description copied from interface:Sink
Ends a title heading element. Shortcut forSink.sectionTitle_(int)
with argument being0
.- Specified by:
sectionTitle_
in interfaceSink
-
section1_
public final void section1_()Description copied from interface:Sink
Ends a first heading element. Shortcut forSink.section_(int)
with argument being1
. -
sectionTitle1
public final void sectionTitle1()Description copied from interface:Sink
Starts 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 being1
and second argument beingnull
.- Specified by:
sectionTitle1
in interfaceSink
- See Also:
-
sectionTitle1_
public final void sectionTitle1_()Description copied from interface:Sink
Ends a first title heading element. Shortcut forSink.sectionTitle_(int)
with argument being1
.- Specified by:
sectionTitle1_
in interfaceSink
-
section2
public final void section2()Description copied from interface:Sink
Starts 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 being2
and second argument beingnull
. -
section2_
public final void section2_()Description copied from interface:Sink
Ends a second heading element. Shortcut forSink.section_(int)
with argument being2
. -
sectionTitle2
public final void sectionTitle2()Description copied from interface:Sink
Starts 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 being2
and second argument beingnull
.- Specified by:
sectionTitle2
in interfaceSink
- See Also:
-
sectionTitle2_
public final void sectionTitle2_()Description copied from interface:Sink
Ends a second title heading element. Shortcut forSink.sectionTitle_(int)
with argument being2
.- Specified by:
sectionTitle2_
in interfaceSink
-
section3
public final void section3()Description copied from interface:Sink
Starts 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 being3
and second argument beingnull
. -
section3_
public final void section3_()Description copied from interface:Sink
Ends a third heading element. Shortcut forSink.section_(int)
with argument being3
. -
sectionTitle3
public final void sectionTitle3()Description copied from interface:Sink
Starts 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 being3
and second argument beingnull
.- Specified by:
sectionTitle3
in interfaceSink
- See Also:
-
sectionTitle3_
public final void sectionTitle3_()Description copied from interface:Sink
Ends a third title heading element. Shortcut forSink.sectionTitle_(int)
with argument being3
.- Specified by:
sectionTitle3_
in interfaceSink
-
section4
public final void section4()Description copied from interface:Sink
Starts 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 being4
and second argument beingnull
. -
section4_
public final void section4_()Description copied from interface:Sink
Ends a 4th heading element. Shortcut forSink.section_(int)
with argument being4
. -
sectionTitle4
public final void sectionTitle4()Description copied from interface:Sink
Starts 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 being4
and second argument beingnull
.- Specified by:
sectionTitle4
in interfaceSink
- See Also:
-
sectionTitle4_
public final void sectionTitle4_()Description copied from interface:Sink
Ends a 4th title heading element. Shortcut forSink.sectionTitle_(int)
with argument being4
.- Specified by:
sectionTitle4_
in interfaceSink
-
section5
public final void section5()Description copied from interface:Sink
Starts 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 being5
and second argument beingnull
. -
section5_
public final void section5_()Description copied from interface:Sink
Ends a 5th heading element. Shortcut forSink.section_(int)
with argument being5
. -
sectionTitle5
public final void sectionTitle5()Description copied from interface:Sink
Starts 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 being5
and second argument beingnull
.- Specified by:
sectionTitle5
in interfaceSink
- See Also:
-
sectionTitle5_
public final void sectionTitle5_()Description copied from interface:Sink
Ends a 5th title heading element. Shortcut forSink.sectionTitle_(int)
with argument being5
.- Specified by:
sectionTitle5_
in interfaceSink
-
section6
public final void section6()Description copied from interface:Sink
Starts 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 being6
and second argument beingnull
. -
section6_
public final void section6_()Description copied from interface:Sink
Ends a 6th heading element. Shortcut forSink.section_(int)
with argument being6
. -
sectionTitle6
public final void sectionTitle6()Description copied from interface:Sink
Starts 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 being6
and second argument beingnull
.- Specified by:
sectionTitle6
in interfaceSink
- See Also:
-
sectionTitle6_
public final void sectionTitle6_()Description copied from interface:Sink
Ends a 6th title heading element. Shortcut forSink.sectionTitle_(int)
with argument being6
.- Specified by:
sectionTitle6_
in interfaceSink
-
header
public final void header()Description copied from interface:Sink
Start a new header within the section or body. Shortcut forSink.header(SinkEventAttributes)
with argument beingnull
. -
content
public final void content()Description copied from interface:Sink
Start the main content section between the header and the footer within the sections and/or body. Shortcut forSink.content(SinkEventAttributes)
with argument beingnull
. -
list
public final void list()Description copied from interface:Sink
Starts an unordered list element. Shortcut forSink.list(SinkEventAttributes)
with argument beingnull
. -
listItem
public final void listItem()Description copied from interface:Sink
Starts a list item element within an unordered list. Shortcut forSink.listItem(SinkEventAttributes)
with argument beingnull
. -
numberedList
public final void numberedList(int numbering) Description copied from interface:Sink
Starts an ordered list element. Shortcut forSink.numberedList(int, SinkEventAttributes)
with first argument beingnumbering
and second argument beingnull
.- Specified by:
numberedList
in interfaceSink
- Parameters:
numbering
- the numbering style.- See Also:
-
numberedListItem
public final void numberedListItem()Description copied from interface:Sink
Starts a list item element within an ordered list. Shortcut forSink.numberedListItem(SinkEventAttributes)
with argument beingnull
.- Specified by:
numberedListItem
in interfaceSink
- See Also:
-
definitionList
public final void definitionList()Description copied from interface:Sink
Starts a definition list element. Shortcut forSink.definitionList(SinkEventAttributes)
with argument beingnull
.- Specified by:
definitionList
in interfaceSink
- See Also:
-
definitionListItem
public final void definitionListItem()Description copied from interface:Sink
Starts a list item element within a definition list. Shortcut forSink.definitionListItem(SinkEventAttributes)
with argument beingnull
.- Specified by:
definitionListItem
in interfaceSink
- See Also:
-
definition
public final void definition()Description copied from interface:Sink
Starts a definition element within a definition list. Shortcut forSink.definition(SinkEventAttributes)
with argument beingnull
.- Specified by:
definition
in interfaceSink
- See Also:
-
definedTerm
public final void definedTerm()Description copied from interface:Sink
Starts a definition term element within a definition list. Shortcut forSink.definedTerm(SinkEventAttributes)
with argument beingnull
.- Specified by:
definedTerm
in interfaceSink
- See Also:
-
figure
public final void figure()Description copied from interface:Sink
Starts a basic image embedding element. Shortcut forSink.figure(SinkEventAttributes)
with argument beingnull
. -
figureCaption
public final void figureCaption()Description copied from interface:Sink
Starts a caption of an image element. Shortcut forSink.figureCaption(SinkEventAttributes)
with argument beingnull
.- Specified by:
figureCaption
in interfaceSink
- See Also:
-
figureGraphics
Description copied from interface:Sink
Adds a graphic element. Shortcut forSink.figureGraphics(String, SinkEventAttributes)
with first argument beingsrc
and second argument beingnull
.- Specified by:
figureGraphics
in interfaceSink
- Parameters:
name
- the source
-
table
public final void table()Description copied from interface:Sink
Starts a table element for marking up tabular information in a document. Shortcut forSink.table(SinkEventAttributes)
with argument beingnull
. -
tableRows
public final void tableRows()Description copied from interface:Sink
Starts an element that contains rows of table data. Shortcut forSink.tableRows(int[], boolean)
with first argument beingnull
and second beingfalse
. -
tableRow
public final void tableRow()Description copied from interface:Sink
Starts a row element which acts as a container for a row of table cells. Shortcut forSink.tableRow(SinkEventAttributes)
with argument beingnull
. -
tableCell
public final void tableCell()Description copied from interface:Sink
Starts a cell element which defines a cell that contains data. Shortcut forSink.tableCell(SinkEventAttributes)
with argument beingnull
. -
tableHeaderCell
public final void tableHeaderCell()Description copied from interface:Sink
Starts a cell element which defines a cell that contains header information. Shortcut forSink.tableHeaderCell(SinkEventAttributes)
with argument beingnull
.- Specified by:
tableHeaderCell
in interfaceSink
- See Also:
-
tableCaption
public final void tableCaption()Description copied from interface:Sink
Starts a caption element of a table. Shortcut forSink.tableCaption(SinkEventAttributes)
with argument beingnull
.- Specified by:
tableCaption
in interfaceSink
- See Also:
-
paragraph
public final void paragraph()Description copied from interface:Sink
Starts an element which represents a paragraph. Shortcut forSink.paragraph(SinkEventAttributes)
with argument beingnull
. -
data
Description copied from interface:Sink
Starts 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:Sink
Starts 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
public final void address()Description copied from interface:Sink
Starts an address element. Shortcut forSink.address(SinkEventAttributes)
with argument beingnull
. -
blockquote
public final void blockquote()Description copied from interface:Sink
Starts a blockquote element. Shortcut forSink.blockquote(SinkEventAttributes)
with argument beingnull
.- Specified by:
blockquote
in interfaceSink
- See Also:
-
division
public final void division()Description copied from interface:Sink
Starts a division element grouping together other elements. Shortcut forSink.division(SinkEventAttributes)
with argument beingnull
. -
verbatim
public final void verbatim()Description copied from interface:Sink
Starts a verbatim block, ie a block where whitespace has semantic relevance. Shortcut forSink.verbatim(SinkEventAttributes)
with argument beingnull
. -
horizontalRule
public final void horizontalRule()Description copied from interface:Sink
Adding a separator of sections from a text to each other. Shortcut forSink.horizontalRule(SinkEventAttributes)
with argument beingnull
.- Specified by:
horizontalRule
in interfaceSink
- See Also:
-
anchor
Description copied from interface:Sink
Starts an element which defines an anchor. Shortcut forSink.anchor(String, SinkEventAttributes)
with first argument beingname
and second argument beingnull
. -
link
Description copied from interface:Sink
Starts an element which defines a link. Shortcut forSink.link(String, SinkEventAttributes)
with first argument beingname
and second argument beingnull
. -
inline
public final void inline()Description copied from interface:Sink
Starts an inline element. Shortcut forSink.inline(SinkEventAttributes)
with argument beingnull
. -
lineBreak
public final void lineBreak()Description copied from interface:Sink
Adds a line break. Shortcut forSink.lineBreak(SinkEventAttributes)
with argument beingnull
. -
lineBreakOpportunity
public final void lineBreakOpportunity()Description copied from interface:Sink
Adds a line break opportunity. Shortcut forSink.lineBreakOpportunity(SinkEventAttributes)
with argument beingnull
.- Specified by:
lineBreakOpportunity
in interfaceSink
- See Also:
-
text
Description copied from interface:Sink
Adding a text. Shortcut forSink.text(String, SinkEventAttributes)
with first argument beingtext
and 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
protected void 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:Sink
Sets the locator which exposes location information for a particular Sink event.- Specified by:
setDocumentLocator
in interfaceSink
- Parameters:
locator
- the locator (nevernull
).
-
getDocumentLocator
Description copied from interface:Sink
Returns the locator which exposes location information for a particular Sink event.- Specified by:
getDocumentLocator
in 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
.
-