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
public abstract class AbstractXmlSink extends SinkAdapter implements XmlMarkup
An abstractSink
for xml markup syntax.- Since:
- 1.0
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
firstTag
private boolean
insertNewline
private java.lang.String
nameSpace
Default namespace prepended to all tags-
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, 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 Constructor Description AbstractXmlSink()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getNameSpace()
Return the default namespace that is prepended to all tags written by this sink.void
setInsertNewline(boolean insertNewline)
void
setNameSpace(java.lang.String ns)
Sets the default namespace that is prepended to all tags written by this sink.protected abstract void
write(java.lang.String text)
Write a text to the sink.protected void
writeEndTag(javax.swing.text.html.HTML.Tag t)
Ends a Tag without writing an EOL.protected void
writeEOL()
Writes a system EOL.protected void
writeSimpleTag(javax.swing.text.html.HTML.Tag t)
Starts a simple Tag.protected void
writeSimpleTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att)
Starts a simple Tag with attributes.protected void
writeStartTag(javax.swing.text.html.HTML.Tag t)
Starts a Tag.protected void
writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att)
Starts a Tag with attributes.protected void
writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.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
-
-
-
-
Method Detail
-
setInsertNewline
public void setInsertNewline(boolean insertNewline)
-
setNameSpace
public void setNameSpace(java.lang.String ns)
Sets the default namespace that is prepended to all tags written by this sink.- Parameters:
ns
- the default namespace.- Since:
- 1.1
-
getNameSpace
public java.lang.String getNameSpace()
Return the default namespace that is prepended to all tags written by this sink.- Returns:
- the current default namespace.
- Since:
- 1.1
-
writeStartTag
protected void writeStartTag(javax.swing.text.html.HTML.Tag t)
Starts a Tag. For instance:<tag>
- Parameters:
t
- a non null tag- See Also:
writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
-
writeStartTag
protected void writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att)
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(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean)
-
writeStartTag
protected void writeStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att, boolean isSimpleTag)
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
protected void writeEndTag(javax.swing.text.html.HTML.Tag t)
Ends a Tag without writing an EOL. For instance:</tag>
.- Parameters:
t
- a tag.
-
writeSimpleTag
protected void writeSimpleTag(javax.swing.text.html.HTML.Tag t)
Starts a simple Tag. For instance:<tag />
- Parameters:
t
- a non null tag- See Also:
writeSimpleTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet)
-
writeSimpleTag
protected void writeSimpleTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet att)
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:
writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean)
-
write
protected abstract void write(java.lang.String text)
Write a text to the sink.- Parameters:
text
- the given text to write
-
-