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 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 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 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 voidAdding 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 voidStarts a title heading element.final voidEnds a title heading element.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 voidAdding 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:SinkStarts the head element. Shortcut forSink.head(SinkEventAttributes)with first argument beingnull. -
title
public final void title()Description copied from interface:SinkStarts the title element. Shortcut forSink.title(SinkEventAttributes)with first argument beingnull. -
author
public final void author()Description copied from interface:SinkStarts an author element. Shortcut forSink.author(SinkEventAttributes)with first argument beingnull. -
date
public final void date()Description copied from interface:SinkStarts the date element. Shortcut forSink.date(SinkEventAttributes)with first argument beingnull. -
body
public final void body()Description copied from interface:SinkStarts the body of a document. Shortcut forSink.body(SinkEventAttributes)with first argument beingnull. -
article
public final void article()Description copied from interface:SinkStarts an article within a document. Shortcut forSink.article(SinkEventAttributes)with first argument beingnull. -
sidebar
public final void sidebar()Description copied from interface:SinkStarts a sidebar section within a document. Shortcut forSink.sidebar(SinkEventAttributes)with first argument beingnull. -
sectionTitle
public final void sectionTitle()Description copied from interface:SinkStarts a title heading element. Shortcut forSink.sectionTitle(int, SinkEventAttributes)with first argument being0and second argument beingnull.- Specified by:
sectionTitlein interfaceSink
-
section1
public final void 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_
public final void sectionTitle_()Description copied from interface:SinkEnds 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:SinkEnds a first heading element. Shortcut forSink.section_(int)with argument being1. -
sectionTitle1
public final void 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_
public final void sectionTitle1_()Description copied from interface:SinkEnds 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: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_
public final void section2_()Description copied from interface:SinkEnds a second heading element. Shortcut forSink.section_(int)with argument being2. -
sectionTitle2
public final void 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_
public final void sectionTitle2_()Description copied from interface:SinkEnds 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: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_
public final void section3_()Description copied from interface:SinkEnds a third heading element. Shortcut forSink.section_(int)with argument being3. -
sectionTitle3
public final void 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_
public final void sectionTitle3_()Description copied from interface:SinkEnds 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: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_
public final void section4_()Description copied from interface:SinkEnds a 4th heading element. Shortcut forSink.section_(int)with argument being4. -
sectionTitle4
public final void 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_
public final void sectionTitle4_()Description copied from interface:SinkEnds 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: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_
public final void section5_()Description copied from interface:SinkEnds a 5th heading element. Shortcut forSink.section_(int)with argument being5. -
sectionTitle5
public final void 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_
public final void sectionTitle5_()Description copied from interface:SinkEnds 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: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_
public final void section6_()Description copied from interface:SinkEnds a 6th heading element. Shortcut forSink.section_(int)with argument being6. -
sectionTitle6
public final void 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_
public final void sectionTitle6_()Description copied from interface:SinkEnds 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:SinkStart a new header within the section or body. Shortcut forSink.header(SinkEventAttributes)with argument beingnull. -
content
public final void 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
public final void list()Description copied from interface:SinkStarts an unordered list element. Shortcut forSink.list(SinkEventAttributes)with argument beingnull. -
listItem
public final void listItem()Description copied from interface:SinkStarts 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: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
public final void 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
public final void definitionList()Description copied from interface:SinkStarts a definition list element. Shortcut forSink.definitionList(SinkEventAttributes)with argument beingnull.- Specified by:
definitionListin interfaceSink- See Also:
-
definitionListItem
public final void 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
public final void 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
public final void 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
public final void figure()Description copied from interface:SinkStarts a basic image embedding element. Shortcut forSink.figure(SinkEventAttributes)with argument beingnull. -
figureCaption
public final void 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
public final void 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
public final void 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
public final void 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
public final void tableCell()Description copied from interface:SinkStarts 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: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
public final void 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
public final void 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
public final void address()Description copied from interface:SinkStarts an address element. Shortcut forSink.address(SinkEventAttributes)with argument beingnull. -
blockquote
public final void blockquote()Description copied from interface:SinkStarts a blockquote element. Shortcut forSink.blockquote(SinkEventAttributes)with argument beingnull.- Specified by:
blockquotein interfaceSink- See Also:
-
division
public final void division()Description copied from interface:SinkStarts a division element grouping together other elements. Shortcut forSink.division(SinkEventAttributes)with argument beingnull. -
verbatim
public final void 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
public final void horizontalRule()Description copied from interface:SinkAdding 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
public final void inline()Description copied from interface:SinkStarts an inline element. Shortcut forSink.inline(SinkEventAttributes)with argument beingnull. -
lineBreak
public final void lineBreak()Description copied from interface:SinkAdds a line break. Shortcut forSink.lineBreak(SinkEventAttributes)with argument beingnull. -
lineBreakOpportunity
public final void 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:SinkAdding 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
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: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
-