|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.doxia.sink.SinkAdapter
org.apache.maven.doxia.sink.AbstractXmlSink
org.apache.maven.doxia.module.docbook.DocBookSink
public class DocBookSink
A doxia Sink which produces a Docbook
model.
Field Summary | |
---|---|
static String |
DEFAULT_SGML_PUBLIC_ID
DocBook V4.1 SGML public id: "-//OASIS//DTD DocBook V4.1//EN" |
static String |
DEFAULT_XML_PUBLIC_ID
DocBook XML V4.1.2 XML public id: "-//OASIS//DTD DocBook XML V4.1.2//EN" |
static String |
DEFAULT_XML_SYSTEM_ID
DocBook XML V4.0 XML system id: "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" |
Fields inherited from interface org.apache.maven.doxia.module.docbook.DocbookMarkup |
---|
ANCHOR_TAG, ARABIC_STYLE, ARTICLE_TAG, ARTICLEINFO_TAG, BOOK_TAG, BOOKINFO_TAG, CHAPTER_TAG, COLS_ATTRIBUTE, COLSEP_ATTRIBUTE, COLSPEC_TAG, CORPAUTHOR_TAG, DATE_TAG, EMAIL_TAG, ENTRY_TAG, FIGURE_TAG, FILEREF_ATTRIBUTE, FORMALPARA_TAG, FORMAT_ATTRIBUTE, FRAME_ATTRIBUTE, IMAGEDATA_TAG, IMAGEOBJECT_TAG, INFO_TAG, INFORMALFIGURE_TAG, INFORMALTABLE_TAG, ITEMIZEDLIST_TAG, LINK_TAG, LINKEND_ATTRIBUTE, LISTITEM_TAG, LOWERALPHA_STYLE, LOWERROMAN_STYLE, MEDIAOBJECT_TAG, NUMERATION_ATTRIBUTE, ORDEREDLIST_TAG, PARA_TAG, PROGRAMLISTING_TAG, ROW_TAG, ROWSEP_ATTRIBUTE, SECTION_TAG, SIMPARA_TAG, TBODY_TAG, TERM_TAG, TGROUP_TAG, THEAD_TAG, ULINK_TAG, UPPERALPHA_STYLE, UPPERROMAN_STYLE, URL_ATTRIBUTE, URL_TAG, VARIABLELIST_TAG, VARLISTENTRY_TAG, XREF_TAG |
Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup |
---|
BANG, CDATA |
Fields inherited from interface org.apache.maven.doxia.markup.Markup |
---|
EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SLASH, SPACE, STAR |
Fields inherited from interface org.apache.maven.doxia.sink.Sink |
---|
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 | |
---|---|
DocBookSink(Writer writer)
|
|
DocBookSink(Writer out,
boolean isBook)
|
Method Summary | |
---|---|
void |
anchor_()
Ending an anchor element. |
void |
anchor(String name)
Starting an element which defines an anchor. |
void |
author_()
Ending the author element. |
void |
author()
Starting the author element which is used to identify the author of the document. |
void |
body_()
Ending the body element. |
void |
bold_()
Ending a bold element. |
void |
bold()
Starting a bold element. |
void |
book_()
|
void |
book()
|
void |
close()
Close the writer or the stream, if needed. |
protected void |
content(String text)
Write SGML escaped text to output, not preserving white space. |
void |
date_()
Ending the date element. |
void |
date()
Starting the date element which is used to identify the date of the document. |
void |
definedTerm_()
Starting a definition term element within a definition list. |
void |
definedTerm()
Starting a definition term element within a definition list. |
void |
definition_()
Ending a definition element within a definition list. |
void |
definition()
Starting a definition element within a definition list. |
void |
definitionList_()
Ending a definition list element. |
void |
definitionList()
Starting a definition list element. |
void |
definitionListItem_()
Ending a list item element within a definition list. |
void |
definitionListItem()
Starting a list item element within a definition list. |
static String |
escapeSGML(String text,
boolean xmlMode)
|
void |
figure_()
Ending a basic image embedding element. |
void |
figureCaption_()
Ending a caption of an image. |
void |
figureCaption()
Starting a caption of an image element. |
void |
figureGraphics(String name)
Adding a source of a graphic. |
void |
flush()
Flush the writer or the stream, if needed. |
String |
getBoldElement()
Returns the current boldBeginTag. |
String |
getEncoding()
Returns the current encoding. |
String |
getHorizontalRuleElement()
Returns the current horizontalRuleElement. |
String |
getItalicElement()
Returns the current italicBeginTag. |
String |
getLanguage()
Returns the current language. |
String |
getLineBreakElement()
Returns the current lineBreakElement. |
String |
getMonospacedElement()
Returns the current monospacedBeginTag. |
String |
getPageBreakElement()
Returns the current pageBreakElement. |
String |
getPublicId()
Returns the current publicId. |
String |
getStyleSheet()
Returns the current styleSheet. |
String |
getSystemId()
Returns the current systemId. |
protected void |
graphicElement()
|
void |
head_()
Ending the head element. |
void |
head()
Starting the head element which contains information about the current document, such as its title, that is not considered document content. |
void |
horizontalRule()
Adding a separator of sections from a text to each other. |
boolean |
isXMLMode()
Returns the current xmlMode. |
void |
italic_()
Ending an italic element. |
void |
italic()
Starting an italic element. |
void |
lineBreak()
Adding a line breaks. |
void |
link_()
Ending a link element. |
void |
link(String name)
Starting an element which defines a link. |
void |
list_()
Ending an unordered list element. |
void |
list()
Starting an unordered list element. |
void |
listItem_()
Ending a list item element within an unordered list. |
void |
listItem()
Starting a list item element within an unordered list. |
protected void |
markup(String text)
Write text to output, preserving white space. |
void |
monospaced_()
Ending a monospaced element. |
void |
monospaced()
Starting a monospaced element. |
void |
nonBreakingSpace()
Adding a non breaking space, ie a space without any special formatting operations. |
void |
numberedList_()
Ending an ordered list element. |
void |
numberedList(int numbering)
Starting an ordered list element. |
void |
numberedListItem_()
Ending a list item element within an ordered list. |
void |
numberedListItem()
Starting a list item element within an ordered list. |
void |
pageBreak()
Adding a new page separator. |
void |
paragraph_()
Ending a paragraph element. |
void |
paragraph()
Starting an element which represents a paragraph. |
void |
section1_()
Ending a first heading element. |
void |
section1()
Starting a first heading element which contains the topic of the section. |
void |
section2_()
Ending a second heading element. |
void |
section2()
Starting a second heading element which contains the topic of the section. |
void |
section3_()
Ending a third heading element. |
void |
section3()
Starting a third heading element which contains the topic of the section. |
void |
section4_()
Ending a 4th heading element. |
void |
section4()
Starting a 4th heading element which contains the topic of the section. |
void |
section5_()
Ending a 5th heading element. |
void |
section5()
Starting a 5th heading element which contains the topic of the section. |
void |
sectionTitle_()
Ending a title heading element. |
void |
sectionTitle()
Starting a title heading element. |
void |
setBoldElement(String tag)
Sets the current boldBeginTag and constructs the corresponding end tag from it. |
void |
setEncoding(String enc)
Sets the encoding. |
void |
setHorizontalRuleElement(String element)
Sets the current horizontalRuleElement. |
void |
setItalicElement(String tag)
Sets the current italicBeginTag and constructs the corresponding end tag from it. |
void |
setLanguage(String language)
Sets the language. |
void |
setLineBreakElement(String element)
Sets the current lineBreakElement. |
void |
setMonospacedElement(String tag)
Sets the current monospacedBeginTag and constructs the corresponding end tag from it. |
void |
setPageBreakElement(String element)
Sets the current pageBreakElement. |
void |
setPublicId(String id)
Sets the publicId. |
void |
setStyleSheet(String sheet)
Sets the styleSheet. |
void |
setSystemId(String id)
Sets the systemId. |
void |
setXMLMode(boolean mode)
Sets the xml mode. |
void |
table_()
Ending a table element. |
void |
table()
Starting a table element for marking up tabular information in a document. |
void |
tableCaption_()
Ending a caption element of a table. |
void |
tableCaption()
Starting a caption element of a table. |
void |
tableCell_()
Ending a cell element. |
void |
tableCell()
Starting a cell element which defines a cell that contains data. |
void |
tableRow_()
Ending a row element. |
void |
tableRow()
Starting a row element which acts as a container for a row of table cells. |
void |
tableRows_()
Ending an element contains rows of table data. |
void |
tableRows(int[] justification,
boolean grid)
Starting an element contains rows of table data. |
void |
text(String text)
Adding a text. |
void |
title_()
Ending the title element. |
void |
title()
Starting the title element which is used to identify the document. |
void |
verbatim_()
Ending a verbatim element. |
void |
verbatim(boolean boxed)
Starting an element which indicates that whitespace in the enclosed text has semantic relevance. |
protected void |
verbatimContent(String text)
Write SGML escaped text to output, preserving white space. |
protected void |
write(String text)
TODO DOXIA-59 Need to uniform writing |
Methods inherited from class org.apache.maven.doxia.sink.AbstractXmlSink |
---|
writeEndTag, writeEndTagWithoutEOL, writeSimpleTag, writeSimpleTag, writeStartTag, writeStartTag, writeStartTag |
Methods inherited from class org.apache.maven.doxia.sink.SinkAdapter |
---|
body, figure, rawText, sectionTitle1_, sectionTitle1, sectionTitle2_, sectionTitle2, sectionTitle3_, sectionTitle3, sectionTitle4_, sectionTitle4, sectionTitle5_, sectionTitle5, tableCell, tableHeaderCell_, tableHeaderCell, tableHeaderCell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_SGML_PUBLIC_ID
public static final String DEFAULT_XML_PUBLIC_ID
public static final String DEFAULT_XML_SYSTEM_ID
Constructor Detail |
---|
public DocBookSink(Writer out, boolean isBook)
public DocBookSink(Writer writer)
writer
- the default writer.Method Detail |
---|
public static final String escapeSGML(String text, boolean xmlMode)
text
- The text to escape.xmlMode
- xmlMode.
public void setXMLMode(boolean mode)
mode
- the mode to set.public boolean isXMLMode()
public void setEncoding(String enc)
enc
- the encoding to set.public String getEncoding()
public void setStyleSheet(String sheet)
sheet
- the styleSheet to set.public String getStyleSheet()
public void setPublicId(String id)
id
- the publicId to set.public String getPublicId()
public void setSystemId(String id)
id
- the systemId to set.public String getSystemId()
public void setLanguage(String language)
language
- the language to set.public String getLanguage()
public void setItalicElement(String tag)
tag
- the tag to set. If tag is null, the empty string is used.public String getItalicElement()
public void setBoldElement(String tag)
tag
- the tag to set. If tag is null, the empty string is used.public String getBoldElement()
public void setMonospacedElement(String tag)
tag
- the tag to set. If tag is null, the empty string is used.public String getMonospacedElement()
public void setHorizontalRuleElement(String element)
element
- the element to set.public String getHorizontalRuleElement()
public void setPageBreakElement(String element)
element
- the element to set.public String getPageBreakElement()
public void setLineBreakElement(String element)
element
- the element to set.public String getLineBreakElement()
public void head()
head
in interface Sink
head
in class SinkAdapter
DEFAULT_XML_PUBLIC_ID
,
DEFAULT_SGML_PUBLIC_ID
,
DEFAULT_XML_SYSTEM_ID
,
DocbookMarkup.ARTICLE_TAG
public void head_()
head_
in interface Sink
head_
in class SinkAdapter
DocbookMarkup.ARTICLEINFO_TAG
public void title()
title
in interface Sink
title
in class SinkAdapter
DocbookMarkup.ARTICLEINFO_TAG
,
HTML.Tag.TITLE
public void title_()
title_
in interface Sink
title_
in class SinkAdapter
HTML.Tag.TITLE
public void author()
author
in interface Sink
author
in class SinkAdapter
DocbookMarkup.CORPAUTHOR_TAG
public void author_()
author_
in interface Sink
author_
in class SinkAdapter
DocbookMarkup.CORPAUTHOR_TAG
public void date()
date
in interface Sink
date
in class SinkAdapter
DocbookMarkup.DATE_TAG
public void date_()
date_
in interface Sink
date_
in class SinkAdapter
DocbookMarkup.DATE_TAG
public void body_()
body_
in interface Sink
body_
in class SinkAdapter
DocbookMarkup.ARTICLE_TAG
public void book()
DocbookMarkup.BOOK_TAG
public void book_()
DocbookMarkup.BOOK_TAG
public void section1()
section1
in interface Sink
section1
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section1_()
section1_
in interface Sink
section1_
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section2()
section2
in interface Sink
section2
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section2_()
section2_
in interface Sink
section2_
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section3()
section3
in interface Sink
section3
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section3_()
section3_
in interface Sink
section3_
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section4()
section4
in interface Sink
section4
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section4_()
section4_
in interface Sink
section4_
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section5()
section5
in interface Sink
section5
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void section5_()
section5_
in interface Sink
section5_
in class SinkAdapter
DocbookMarkup.SECTION_TAG
public void sectionTitle()
sectionTitle
in interface Sink
sectionTitle
in class SinkAdapter
HTML.Tag.TITLE
public void sectionTitle_()
sectionTitle_
in interface Sink
sectionTitle_
in class SinkAdapter
HTML.Tag.TITLE
public void list()
list
in interface Sink
list
in class SinkAdapter
DocbookMarkup.ITEMIZEDLIST_TAG
public void list_()
list_
in interface Sink
list_
in class SinkAdapter
DocbookMarkup.ITEMIZEDLIST_TAG
public void listItem()
listItem
in interface Sink
listItem
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void listItem_()
listItem_
in interface Sink
listItem_
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void numberedList(int numbering)
numberedList
in interface Sink
numberedList
in class SinkAdapter
numbering
- the numbering wantedDocbookMarkup.ORDEREDLIST_TAG
,
DocbookMarkup.NUMERATION_ATTRIBUTE
public void numberedList_()
numberedList_
in interface Sink
numberedList_
in class SinkAdapter
DocbookMarkup.ORDEREDLIST_TAG
public void numberedListItem()
numberedListItem
in interface Sink
numberedListItem
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void numberedListItem_()
numberedListItem_
in interface Sink
numberedListItem_
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void definitionList()
definitionList
in interface Sink
definitionList
in class SinkAdapter
DocbookMarkup.VARIABLELIST_TAG
public void definitionList_()
definitionList_
in interface Sink
definitionList_
in class SinkAdapter
DocbookMarkup.VARIABLELIST_TAG
public void definitionListItem()
definitionListItem
in interface Sink
definitionListItem
in class SinkAdapter
DocbookMarkup.VARLISTENTRY_TAG
public void definitionListItem_()
definitionListItem_
in interface Sink
definitionListItem_
in class SinkAdapter
DocbookMarkup.VARLISTENTRY_TAG
public void definedTerm()
definedTerm
in interface Sink
definedTerm
in class SinkAdapter
DocbookMarkup.TERM_TAG
public void definedTerm_()
definedTerm_
in interface Sink
definedTerm_
in class SinkAdapter
DocbookMarkup.TERM_TAG
public void definition()
definition
in interface Sink
definition
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void definition_()
definition_
in interface Sink
definition_
in class SinkAdapter
DocbookMarkup.LISTITEM_TAG
public void paragraph()
paragraph
in interface Sink
paragraph
in class SinkAdapter
DocbookMarkup.PARA_TAG
public void paragraph_()
paragraph_
in interface Sink
paragraph_
in class SinkAdapter
DocbookMarkup.PARA_TAG
public void verbatim(boolean boxed)
verbatim
in interface Sink
verbatim
in class SinkAdapter
boxed
- true to add a box, false otherwiseDocbookMarkup.PROGRAMLISTING_TAG
public void verbatim_()
verbatim_
in interface Sink
verbatim_
in class SinkAdapter
DocbookMarkup.PROGRAMLISTING_TAG
public void horizontalRule()
horizontalRule
in interface Sink
horizontalRule
in class SinkAdapter
public void pageBreak()
pageBreak
in interface Sink
pageBreak
in class SinkAdapter
public void figure_()
figure_
in interface Sink
figure_
in class SinkAdapter
protected void graphicElement()
DocbookMarkup.MEDIAOBJECT_TAG
,
DocbookMarkup.IMAGEOBJECT_TAG
,
DocbookMarkup.IMAGEDATA_TAG
,
DocbookMarkup.FORMAT_ATTRIBUTE
,
DocbookMarkup.FILEREF_ATTRIBUTE
public void figureGraphics(String name)
figureGraphics
in interface Sink
figureGraphics
in class SinkAdapter
name
- the sourcepublic void figureCaption()
figureCaption
in interface Sink
figureCaption
in class SinkAdapter
DocbookMarkup.FIGURE_TAG
,
HTML.Tag.TITLE
public void figureCaption_()
figureCaption_
in interface Sink
figureCaption_
in class SinkAdapter
DocbookMarkup.FIGURE_TAG
,
HTML.Tag.TITLE
public void table()
table
in interface Sink
table
in class SinkAdapter
public void table_()
table_
in interface Sink
table_
in class SinkAdapter
DocbookMarkup.INFORMALTABLE_TAG
,
DocbookMarkup.FRAME_ATTRIBUTE
,
DocbookMarkup.ROWSEP_ATTRIBUTE
,
DocbookMarkup.COLSEP_ATTRIBUTE
,
HTML.Tag.TABLE
public void tableRows(int[] justification, boolean grid)
tableRows
in interface Sink
tableRows
in class SinkAdapter
justification
- the justification wantedgrid
- true to provide a grid, false otherwiseDocbookMarkup.TGROUP_TAG
,
DocbookMarkup.COLS_ATTRIBUTE
,
DocbookMarkup.COLSPEC_TAG
public void tableRows_()
tableRows_
in interface Sink
tableRows_
in class SinkAdapter
DocbookMarkup.TGROUP_TAG
,
DocbookMarkup.TBODY_TAG
public void tableRow()
tableRow
in interface Sink
tableRow
in class SinkAdapter
DocbookMarkup.ROW_TAG
public void tableRow_()
tableRow_
in interface Sink
tableRow_
in class SinkAdapter
DocbookMarkup.ROW_TAG
public void tableCell()
tableCell
in interface Sink
tableCell
in class SinkAdapter
DocbookMarkup.ENTRY_TAG
,
DocbookMarkup.PARA_TAG
public void tableCell_()
tableCell_
in interface Sink
tableCell_
in class SinkAdapter
DocbookMarkup.ENTRY_TAG
,
DocbookMarkup.PARA_TAG
public void tableCaption()
tableCaption
in interface Sink
tableCaption
in class SinkAdapter
HTML.Tag.TABLE
,
DocbookMarkup.FRAME_ATTRIBUTE
,
DocbookMarkup.ROWSEP_ATTRIBUTE
,
DocbookMarkup.COLSEP_ATTRIBUTE
,
HTML.Tag.TITLE
public void tableCaption_()
tableCaption_
in interface Sink
tableCaption_
in class SinkAdapter
HTML.Tag.TITLE
public void anchor(String name)
anchor
in interface Sink
anchor
in class SinkAdapter
name
- the name of the anchorDocbookMarkup.ANCHOR_TAG
public void anchor_()
anchor_
in interface Sink
anchor_
in class SinkAdapter
DocbookMarkup.ANCHOR_TAG
public void link(String name)
link
in interface Sink
link
in class SinkAdapter
name
- the name of the linkDocbookMarkup.ULINK_TAG
,
DocbookMarkup.URL_ATTRIBUTE
,
DocbookMarkup.LINK_TAG
,
DocbookMarkup.LINKEND_ATTRIBUTE
public void link_()
link_
in interface Sink
link_
in class SinkAdapter
DocbookMarkup.ULINK_TAG
,
DocbookMarkup.LINK_TAG
public void italic()
italic
in interface Sink
italic
in class SinkAdapter
public void italic_()
italic_
in interface Sink
italic_
in class SinkAdapter
public void bold()
bold
in interface Sink
bold
in class SinkAdapter
public void bold_()
bold_
in interface Sink
bold_
in class SinkAdapter
public void monospaced()
monospaced
in interface Sink
monospaced
in class SinkAdapter
public void monospaced_()
monospaced_
in interface Sink
monospaced_
in class SinkAdapter
public void lineBreak()
lineBreak
in interface Sink
lineBreak
in class SinkAdapter
public void nonBreakingSpace()
nonBreakingSpace
in interface Sink
nonBreakingSpace
in class SinkAdapter
public void text(String text)
text
in interface Sink
text
in class SinkAdapter
text
- The text to write.protected void markup(String text)
text
- The text to write.protected void content(String text)
text
- The text to write.protected void verbatimContent(String text)
text
- The text to write.public void flush()
flush
in interface Sink
flush
in class SinkAdapter
public void close()
close
in interface Sink
close
in class SinkAdapter
protected void write(String text)
write
in class AbstractXmlSink
text
- the given text to write
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |