Class XWikiSerializer
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.PrintTextListener
-
- org.xwiki.rendering.wikimodel.xwiki.xwiki10.XWikiSerializer
-
- All Implemented Interfaces:
IWemListener,IWemListenerDocument,IWemListenerFigure,IWemListenerInline,IWemListenerList,IWemListenerProgramming,IWemListenerSemantic,IWemListenerSimpleBlocks,IWemListenerTable
public class XWikiSerializer extends PrintTextListener
Serializing XWiki 1.0 syntax ...- Since:
- 4.0M1
- Version:
- $Id: fe5b795f2d40177b22ab566c1d67c0bbebd804fc $
- See Also:
XWikiSerializer2
-
-
Field Summary
-
Fields inherited from class org.xwiki.rendering.wikimodel.PrintTextListener
fRefHandler
-
-
Constructor Summary
Constructors Constructor Description XWikiSerializer(IWikiPrinter printer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginHeader(int headerLevel, WikiParameters params)This method is called to notify about a new section header found in the document.voidbeginListItem()This method is used to notify about the beginning of a new item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).voidbeginListItem(WikiParameters params)This method is used to notify about the beginning of a new item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).voidbeginTable(WikiParameters params)This method notifies about the beginning of a new table in the document.voidbeginTableCell(boolean tableHead, WikiParameters params)This method is used to notify about the beginning of a new table cell.voidbeginTableRow(WikiParameters params)This method is used to notify about the beginning of a new table row.voidendHeader(int headerLevel, WikiParameters params)This method is called to notify about the end of a section-level header.voidendList(WikiParameters params, boolean ordered)This method is used to notify about the end of a list.voidendListItem()This method is used to notify about the end of an item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).voidendListItem(WikiParameters params)This method is used to notify about the end of an item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).voidendParagraph(WikiParameters params)End of a simple paragraph.voidendTable(WikiParameters params)This method notifies about the end of a table in the document.voidendTableRow(WikiParameters params)This method is used to notify about the end of a table row.protected StringgetEol()voidonHorizontalLine()voidonLineBreak()This method is called to notify about a forced line break found in the text.voidonReference(String ref)This method is called to notify that an URI (an implicit reference) was found in the parsed wiki document.voidonSpecialSymbol(String str)This method is called to notify about a sequence of special characters.voidonTableCaption(String str)Notifies the table caption.voidonVerbatimInline(String str, WikiParameters params)This method is called to notify about not-interpreted in-line sequence of characters which should be represented in the final text "as is".-
Methods inherited from class org.xwiki.rendering.wikimodel.PrintTextListener
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginFormat, beginInfoBlock, beginList, beginParagraph, beginPropertyBlock, beginPropertyInline, beginQuotation, beginQuotationLine, beginSection, beginSectionContent, endBlock, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFormat, endInfoBlock, endPropertyBlock, endPropertyInline, endQuotation, endQuotationLine, endSection, endSectionContent, endTableCell, isSupportDownload, isSupportImage, newReferenceHandler, onEmptyLines, onEscape, onExtensionBlock, onExtensionInline, onHorizontalLine, onImage, onImage, onMacroBlock, onMacroInline, onNewLine, onReference, onSpace, onVerbatimBlock, onWord, print, println, println
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.rendering.wikimodel.IWemListenerFigure
beginFigure, beginFigureCaption, endFigure, endFigureCaption
-
-
-
-
Constructor Detail
-
XWikiSerializer
public XWikiSerializer(IWikiPrinter printer)
-
-
Method Detail
-
beginHeader
public void beginHeader(int headerLevel, WikiParameters params)Description copied from interface:IWemListenerDocumentThis method is called to notify about a new section header found in the document.- Specified by:
beginHeaderin interfaceIWemListenerDocument- Overrides:
beginHeaderin classPrintTextListener- Parameters:
headerLevel- the level of the found header; valid values: 1-6params- the list of parameters for this event- See Also:
IWemListenerDocument.beginHeader(int, WikiParameters)
-
beginListItem
public void beginListItem()
Description copied from interface:IWemListenerListThis method is used to notify about the beginning of a new item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).- Specified by:
beginListItemin interfaceIWemListenerList- Overrides:
beginListItemin classPrintTextListener- See Also:
IWemListenerList.beginListItem()
-
beginListItem
public void beginListItem(WikiParameters params)
Description copied from interface:IWemListenerListThis method is used to notify about the beginning of a new item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).- Specified by:
beginListItemin interfaceIWemListenerList- Overrides:
beginListItemin classPrintTextListener- See Also:
IWemListenerList.endListItem(WikiParameters)
-
beginTable
public void beginTable(WikiParameters params)
Description copied from interface:IWemListenerTableThis method notifies about the beginning of a new table in the document.- Specified by:
beginTablein interfaceIWemListenerTable- Overrides:
beginTablein classPrintTextListener- Parameters:
params- table parameters- See Also:
IWemListenerTable.beginTable(WikiParameters)
-
beginTableCell
public void beginTableCell(boolean tableHead, WikiParameters params)Description copied from interface:IWemListenerTableThis method is used to notify about the beginning of a new table cell.- Specified by:
beginTableCellin interfaceIWemListenerTable- Overrides:
beginTableCellin classPrintTextListener- Parameters:
tableHead- if this flag istruethen the reported cell corresponds to the table head ("th" element); otherwise it should be considered as a normal table cell ("td" element).params- parameters of this cell- See Also:
IWemListenerTable.beginTableCell(boolean, WikiParameters)
-
beginTableRow
public void beginTableRow(WikiParameters params)
Description copied from interface:IWemListenerTableThis method is used to notify about the beginning of a new table row.- Specified by:
beginTableRowin interfaceIWemListenerTable- Overrides:
beginTableRowin classPrintTextListener- Parameters:
params- parameters of the row.- See Also:
IWemListenerTable.beginTableRow(WikiParameters)
-
endHeader
public void endHeader(int headerLevel, WikiParameters params)Description copied from interface:IWemListenerDocumentThis method is called to notify about the end of a section-level header.- Specified by:
endHeaderin interfaceIWemListenerDocument- Overrides:
endHeaderin classPrintTextListener- Parameters:
headerLevel- the level of the headerparams- the list of parameters for this event- See Also:
IWemListenerDocument.endHeader(int, WikiParameters)
-
endList
public void endList(WikiParameters params, boolean ordered)
Description copied from interface:IWemListenerListThis method is used to notify about the end of a list.- Specified by:
endListin interfaceIWemListenerList- Overrides:
endListin classPrintTextListener- Parameters:
params- parameters of the listordered- if this flag istruethen this method corresponds to a new ordered list ("ol"); otherwise this method notifies a beginning of an unordered list ("ul")- See Also:
IWemListenerList.endList(WikiParameters, boolean)
-
endListItem
public void endListItem()
Description copied from interface:IWemListenerListThis method is used to notify about the end of an item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).- Specified by:
endListItemin interfaceIWemListenerList- Overrides:
endListItemin classPrintTextListener- See Also:
IWemListenerList.endListItem()
-
endListItem
public void endListItem(WikiParameters params)
Description copied from interface:IWemListenerListThis method is used to notify about the end of an item of a simple list (seeIWemListenerList.beginList(WikiParameters, boolean)/IWemListenerList.endList(WikiParameters, boolean)methods).- Specified by:
endListItemin interfaceIWemListenerList- Overrides:
endListItemin classPrintTextListener- See Also:
IWemListenerList.beginListItem(WikiParameters)
-
endParagraph
public void endParagraph(WikiParameters params)
Description copied from interface:IWemListenerSimpleBlocksEnd of a simple paragraph.- Specified by:
endParagraphin interfaceIWemListenerSimpleBlocks- Overrides:
endParagraphin classPrintTextListener- Parameters:
params- paragraph parameters- See Also:
IWemListenerSimpleBlocks.endParagraph(WikiParameters)
-
endTable
public void endTable(WikiParameters params)
Description copied from interface:IWemListenerTableThis method notifies about the end of a table in the document.- Specified by:
endTablein interfaceIWemListenerTable- Overrides:
endTablein classPrintTextListener- Parameters:
params- table parameters- See Also:
IWemListenerTable.endTable(WikiParameters)
-
endTableRow
public void endTableRow(WikiParameters params)
Description copied from interface:IWemListenerTableThis method is used to notify about the end of a table row.- Specified by:
endTableRowin interfaceIWemListenerTable- Overrides:
endTableRowin classPrintTextListener- Parameters:
params- parameters of the row.- See Also:
IWemListenerTable.endTableRow(WikiParameters)
-
getEol
protected String getEol()
-
onHorizontalLine
public void onHorizontalLine()
-
onLineBreak
public void onLineBreak()
Description copied from interface:IWemListenerInlineThis method is called to notify about a forced line break found in the text. Note that the line break symbol can be found in the middle of a "physical" line so this event is not equals to theIWemListenerInline.onNewLine()notification.- Specified by:
onLineBreakin interfaceIWemListenerInline- Overrides:
onLineBreakin classPrintTextListener- See Also:
IWemListenerInline.onLineBreak()
-
onReference
public void onReference(String ref)
Description copied from interface:IWemListenerInlineThis method is called to notify that an URI (an implicit reference) was found in the parsed wiki document.- Specified by:
onReferencein interfaceIWemListenerInline- Overrides:
onReferencein classPrintTextListener- Parameters:
ref- the URI- See Also:
IWemListenerInline.onReference(java.lang.String)
-
onSpecialSymbol
public void onSpecialSymbol(String str)
Description copied from interface:IWemListenerInlineThis method is called to notify about a sequence of special characters. Special symbols are characters which are not interpreted as a part of a word (letters or digits) or as a space. Note that the handling of these symbols requires special attention because these symbols most frequently used to define text formatting. Various wiki syntaxes use combinations of these sequences to define structural elements in wiki documents.The full list of possible special symbols:
"!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", "[", "\\", "]", "^", "_", "`", "{", "|", "}", "~"- Specified by:
onSpecialSymbolin interfaceIWemListenerInline- Overrides:
onSpecialSymbolin classPrintTextListener- Parameters:
str- the sequence of special symbols- See Also:
IWemListenerInline.onSpecialSymbol(java.lang.String)
-
onTableCaption
public void onTableCaption(String str)
Description copied from interface:IWemListenerTableNotifies the table caption.- Specified by:
onTableCaptionin interfaceIWemListenerTable- Overrides:
onTableCaptionin classPrintTextListener- Parameters:
str- the content of the table caption- See Also:
IWemListenerTable.onTableCaption(java.lang.String)
-
onVerbatimInline
public void onVerbatimInline(String str, WikiParameters params)
Description copied from interface:IWemListenerInlineThis method is called to notify about not-interpreted in-line sequence of characters which should be represented in the final text "as is".- Specified by:
onVerbatimInlinein interfaceIWemListenerInline- Overrides:
onVerbatimInlinein classPrintTextListener- Parameters:
str- the sequence of non-interpreted charactersparams- the list of parameters for this event- See Also:
IWemListenerInline.onVerbatimInline(java.lang.String, WikiParameters)
-
-