Package org.apache.maven.doxia.sink.impl
Class AbstractSink
java.lang.Object
org.apache.maven.doxia.sink.impl.AbstractSink
- All Implemented Interfaces:
AutoCloseable,Markup,Sink
- Direct Known Subclasses:
SinkAdapter,SinkWrapper
An abstract base class that defines some convenience methods for sinks.
Also acts as compatibility bridge for Doxia 1.0 methods which have overloaded variants in Doxia > 1.0 (taking an additional argument
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()final voidfinal voidarticle()final voidauthor()final voidfinal voidbody()final voidcontent()final voidfinal voiddate()final voidfinal voidfinal voidfinal voidfinal voiddivision()final voidfigure()final voidfinal voidfigureGraphics(String name) final voidfooter()static StringformatLocation(Locator locator) Creates a string with line/column information.protected Stringfinal voidhead()final voidheader()final voidprotected 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()final voidfinal voidfinal voidfinal voidlist()final voidlistItem()final voidfinal voidnumberedList(int numbering) final voidfinal voidfinal voidsection1()final voidfinal voidsection2()final voidfinal voidsection3()final voidfinal voidsection4()final voidfinal voidsection5()final voidfinal voidsection6()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidvoidsetDocumentLocator(Locator locator) final voidsidebar()final voidtable()final voidfinal voidfinal voidfinal voidtableRow()final voidfinal voidfinal voidfinal voidtitle()protected static StringParses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL.final voidverbatim()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
-
title
-
author
-
date
-
body
-
article
-
sidebar
-
sectionTitle
- Specified by:
sectionTitlein interfaceSink
-
section1
-
sectionTitle_
- Specified by:
sectionTitle_in interfaceSink
-
section1_
-
sectionTitle1
- Specified by:
sectionTitle1in interfaceSink
-
sectionTitle1_
- Specified by:
sectionTitle1_in interfaceSink
-
section2
-
section2_
-
sectionTitle2
- Specified by:
sectionTitle2in interfaceSink
-
sectionTitle2_
- Specified by:
sectionTitle2_in interfaceSink
-
section3
-
section3_
-
sectionTitle3
- Specified by:
sectionTitle3in interfaceSink
-
sectionTitle3_
- Specified by:
sectionTitle3_in interfaceSink
-
section4
-
section4_
-
sectionTitle4
- Specified by:
sectionTitle4in interfaceSink
-
sectionTitle4_
- Specified by:
sectionTitle4_in interfaceSink
-
section5
-
section5_
-
sectionTitle5
- Specified by:
sectionTitle5in interfaceSink
-
sectionTitle5_
- Specified by:
sectionTitle5_in interfaceSink
-
section6
-
section6_
-
sectionTitle6
- Specified by:
sectionTitle6in interfaceSink
-
sectionTitle6_
- Specified by:
sectionTitle6_in interfaceSink
-
header
-
content
-
list
-
listItem
-
numberedList
- Specified by:
numberedListin interfaceSink
-
numberedListItem
- Specified by:
numberedListItemin interfaceSink
-
definitionList
- Specified by:
definitionListin interfaceSink
-
definitionListItem
- Specified by:
definitionListItemin interfaceSink
-
definition
- Specified by:
definitionin interfaceSink
-
definedTerm
- Specified by:
definedTermin interfaceSink
-
figure
-
figureCaption
- Specified by:
figureCaptionin interfaceSink
-
figureGraphics
- Specified by:
figureGraphicsin interfaceSink
-
table
-
tableRows
-
tableRow
-
tableCell
-
tableHeaderCell
- Specified by:
tableHeaderCellin interfaceSink
-
tableCaption
- Specified by:
tableCaptionin interfaceSink
-
paragraph
-
data
-
time
-
address
-
blockquote
- Specified by:
blockquotein interfaceSink
-
division
-
verbatim
-
horizontalRule
- Specified by:
horizontalRulein interfaceSink
-
anchor
-
link
-
inline
-
lineBreak
-
lineBreakOpportunity
- Specified by:
lineBreakOpportunityin interfaceSink
-
text
-
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
- Specified by:
setDocumentLocatorin interfaceSink
-
getDocumentLocator
- Specified by:
getDocumentLocatorin interfaceSink
-
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.
-