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:
LogEnabled
,Markup
,XmlMarkup
,Sink
- Direct Known Subclasses:
DocBookSink
,Xhtml5BaseSink
,XhtmlBaseSink
An abstract
Sink
for xml markup syntax.- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private String
Default namespace prepended to all tagsFields 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, ROLE, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
Fields 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.void
setInsertNewline
(boolean insertNewline) Setter for the fieldinsertNewline
.void
setNameSpace
(String ns) Sets the default namespace that is prepended to all tags written by this sink.protected abstract void
Write a text to the sink.protected void
Ends a Tag without writing an EOL.protected void
writeEOL()
Writes a system EOL.protected void
Starts a simple Tag.protected void
Starts a simple Tag with attributes.protected void
Starts a Tag.protected void
writeStartTag
(HTML.Tag t, MutableAttributeSet att) Starts a Tag with attributes.protected void
writeStartTag
(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, address_, anchor, anchor, anchor_, article, article, article_, author, author, author_, blockquote, blockquote, blockquote_, body, body, body_, bold, bold_, close, comment, content, content, content_, data, data, data_, date, date, date_, definedTerm, definedTerm, definedTerm_, definition, definition, definition_, definitionList, definitionList, definitionList_, definitionListItem, definitionListItem, definitionListItem_, division, division, division_, figure, figure, figure_, figureCaption, figureCaption, figureCaption_, figureGraphics, figureGraphics, flush, footer, footer, footer_, head, head, head_, header, header, header_, horizontalRule, horizontalRule, inline, inline, inline_, italic, italic_, lineBreak, lineBreak, lineBreakOpportunity, lineBreakOpportunity, link, link, link_, list, list, list_, listItem, listItem, listItem_, monospaced, monospaced_, navigation, navigation, navigation_, nonBreakingSpace, numberedList, numberedList, numberedList_, numberedListItem, numberedListItem, numberedListItem_, pageBreak, paragraph, paragraph, paragraph_, rawText, section, section_, section1, section1_, section2, section2_, section3, section3_, section4, section4_, section5, section5_, section6, section6_, sectionTitle, sectionTitle, sectionTitle_, sectionTitle_, sectionTitle1, sectionTitle1_, sectionTitle2, sectionTitle2_, sectionTitle3, sectionTitle3_, sectionTitle4, sectionTitle4_, sectionTitle5, sectionTitle5_, sectionTitle6, sectionTitle6_, sidebar, sidebar, sidebar_, table, table, table_, tableCaption, tableCaption, tableCaption_, tableCell, tableCell, tableCell, tableCell_, tableHeaderCell, tableHeaderCell, tableHeaderCell, tableHeaderCell_, tableRow, tableRow, tableRow_, tableRows, tableRows_, text, text, time, time, time_, title, title, title_, unknown, verbatim, verbatim, verbatim_
Methods inherited from class org.apache.maven.doxia.sink.impl.AbstractSink
enableLogging, getLog, init, unifyEOLs
-
Field Details
-
nameSpace
Default namespace prepended to all tags -
firstTag
private boolean firstTag -
insertNewline
private boolean insertNewline
-
-
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
-