org.apache.maven.doxia.sink
Class AbstractXmlSink

java.lang.Object
  extended by org.apache.maven.doxia.sink.AbstractSink
      extended by org.apache.maven.doxia.sink.SinkAdapter
          extended by org.apache.maven.doxia.sink.AbstractXmlSink
All Implemented Interfaces:
LogEnabled, Markup, XmlMarkup, Sink
Direct Known Subclasses:
DocBookSink, FoSink, ITextSink, XhtmlBaseSink

public abstract class AbstractXmlSink
extends SinkAdapter
implements XmlMarkup

An abstract Sink for xml markup syntax.

Since:
1.0
Version:
$Id: AbstractXmlSink.java 1185112 2011-10-17 11:33:00Z ltheussl $
Author:
Vincent Siveton

Field Summary
 
Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup
BANG, CDATA, DOCTYPE_START, ENTITY_START, XML_NAMESPACE
 
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
 
Constructor Summary
AbstractXmlSink()
           
 
Method Summary
 String getNameSpace()
          Return the default namespace that is prepended to all tags written by this sink.
 void setNameSpace(String ns)
          Sets the default namespace that is prepended to all tags written by this sink.
protected abstract  void write(String text)
          Write a text to the sink.
protected  void writeEndTag(HTML.Tag t)
          Ends a Tag without writing an EOL.
protected  void writeEOL()
          Writes a system EOL.
protected  void writeSimpleTag(HTML.Tag t)
          Starts a simple Tag.
protected  void writeSimpleTag(HTML.Tag t, MutableAttributeSet att)
          Starts a simple Tag with attributes.
protected  void writeStartTag(HTML.Tag t)
          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.SinkAdapter
anchor_, anchor, anchor, author_, author, author, body_, body, body, bold_, bold, close, comment, date_, date, date, definedTerm_, definedTerm, definedTerm, definition_, definition, definition, definitionList_, definitionList, definitionList, definitionListItem_, definitionListItem, definitionListItem, figure_, figure, figure, figureCaption_, figureCaption, figureCaption, figureGraphics, figureGraphics, flush, head_, head, head, horizontalRule, horizontalRule, italic_, italic, lineBreak, lineBreak, link_, link, link, list_, list, list, listItem_, listItem, listItem, monospaced_, monospaced, nonBreakingSpace, numberedList_, numberedList, numberedList, numberedListItem_, numberedListItem, numberedListItem, pageBreak, paragraph_, paragraph, paragraph, rawText, section_, section, section1_, section1, section2_, section2, section3_, section3, section4_, section4, section5_, section5, sectionTitle_, sectionTitle_, sectionTitle, sectionTitle, sectionTitle1_, sectionTitle1, sectionTitle2_, sectionTitle2, sectionTitle3_, sectionTitle3, sectionTitle4_, sectionTitle4, sectionTitle5_, sectionTitle5, table_, table, table, tableCaption_, tableCaption, tableCaption, tableCell_, tableCell, tableCell, tableCell, tableHeaderCell_, tableHeaderCell, tableHeaderCell, tableHeaderCell, tableRow_, tableRow, tableRow, tableRows_, tableRows, text, text, title_, title, title, unknown, verbatim_, verbatim, verbatim
 
Methods inherited from class org.apache.maven.doxia.sink.AbstractSink
enableLogging, getLog, init, unifyEOLs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXmlSink

public AbstractXmlSink()
Method Detail

setNameSpace

public void setNameSpace(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 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(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(HTML.Tag t,
                             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(HTML.Tag t,
                             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(HTML.Tag t)
Ends a Tag without writing an EOL. For instance:
</tag>
.

Parameters:
t - a tag.

writeSimpleTag

protected void writeSimpleTag(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(HTML.Tag t,
                              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(String text)
Write a text to the sink.

Parameters:
text - the given text to write


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.