Package org.apache.maven.doxia.sink.impl
Class AbstractXmlSink
java.lang.Object
org.apache.maven.doxia.sink.impl.AbstractSink
org.apache.maven.doxia.sink.impl.SinkAdapter
org.apache.maven.doxia.sink.impl.AbstractXmlSink
- All Implemented Interfaces:
AutoCloseable,Markup,XmlMarkup,org.apache.maven.doxia.sink.Sink
- Direct Known Subclasses:
Xhtml5BaseSink
An abstract
Sink for xml markup syntax.- Since:
- 1.0
- Author:
- 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_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_6Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup
BANG, CDATA, DOCTYPE_START, ENTITY_START, XML_NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the default namespace that is prepended to all tags written by this sink.voidsetInsertNewline(boolean insertNewline) Setter for the fieldinsertNewline.voidsetNameSpace(String ns) Sets the default namespace that is prepended to all tags written by this sink.protected abstract voidWrite a text to the sink.protected voidEnds a Tag without writing an EOL.protected voidwriteEOL()Writes a system EOL.protected voidStarts a simple Tag.protected voidStarts a simple Tag with attributes.protected voidStarts a Tag.protected voidwriteStartTag(HTML.Tag t, MutableAttributeSet att) Starts a Tag with attributes.protected voidwriteStartTag(HTML.Tag t, MutableAttributeSet att, boolean isSimpleTag) Starts a Tag with attributes.Methods inherited from class org.apache.maven.doxia.sink.impl.SinkAdapter
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_Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractSink
address, anchor, article, author, blockquote, body, content, data, date, definedTerm, definition, definitionList, definitionListItem, division, figure, figureCaption, figureGraphics, footer, formatLocation, getDocumentLocator, getLocationLogPrefix, head, header, horizontalRule, init, inline, lineBreak, lineBreakOpportunity, link, list, listItem, navigation, numberedList, numberedListItem, paragraph, section1, section1_, section2, section2_, section3, section3_, section4, section4_, section5, section5_, section6, section6_, sectionTitle, sectionTitle_, sectionTitle1, sectionTitle1_, sectionTitle2, sectionTitle2_, sectionTitle3, sectionTitle3_, sectionTitle4, sectionTitle4_, sectionTitle5, sectionTitle5_, sectionTitle6, sectionTitle6_, setDocumentLocator, sidebar, table, tableCaption, tableCell, tableHeaderCell, tableRow, tableRows, text, time, title, unifyEOLs, verbatim
-
Constructor Details
-
AbstractXmlSink
public AbstractXmlSink()
-
-
Method Details
-
setInsertNewline
public void setInsertNewline(boolean insertNewline) Setter for the field
insertNewline.- Parameters:
insertNewline- a boolean.
-
setNameSpace
Sets the default namespace that is prepended to all tags written by this sink.- Parameters:
ns- the default namespace.- Since:
- 1.1
-
getNameSpace
Return the default namespace that is prepended to all tags written by this sink.- Returns:
- the current default namespace.
- Since:
- 1.1
-
writeStartTag
Starts a Tag. For instance:<tag>
- Parameters:
t- a non null tag- See Also:
-
writeStartTag
Starts a Tag with attributes. For instance:<tag attName="attValue">
- Parameters:
t- a non null tag.att- a set of attributes. May be null.- See Also:
-
writeStartTag
Starts a Tag with attributes. For instance:<tag attName="attValue">
- Parameters:
t- a non null tag.att- a set of attributes. May be null.isSimpleTag- boolean to write as a simple tag.
-
writeEOL
protected void writeEOL()Writes a system EOL.- Since:
- 1.1
-
writeEndTag
Ends a Tag without writing an EOL. For instance:</tag>
.- Parameters:
t- a tag.
-
writeSimpleTag
Starts a simple Tag. For instance:<tag />
- Parameters:
t- a non null tag- See Also:
-
writeSimpleTag
Starts a simple Tag with attributes. For instance:<tag attName="attValue" />
- Parameters:
t- a non null tag.att- a set of attributes. May be null.- See Also:
-
write
Write a text to the sink.- Parameters:
text- the given text to write
-