org.wikimodel.wem.xwiki.xwiki10
Class XWikiSerializer

java.lang.Object
  extended by org.wikimodel.wem.PrintTextListener
      extended by org.wikimodel.wem.xwiki.xwiki10.XWikiSerializer
All Implemented Interfaces:
IWemListener, IWemListenerDocument, IWemListenerInline, IWemListenerList, IWemListenerProgramming, IWemListenerSemantic, IWemListenerSimpleBlocks, IWemListenerTable

public class XWikiSerializer
extends PrintTextListener


Field Summary
 
Fields inherited from class org.wikimodel.wem.PrintTextListener
fRefHandler
 
Constructor Summary
XWikiSerializer(IWikiPrinter printer)
           
 
Method Summary
 void beginHeader(int headerLevel, WikiParameters params)
          This method is called to notify about a new section header found in the document.
 void beginListItem()
          This method is used to notify about the beginning of a new item of a simple list (see IWemListenerList.beginList(WikiParameters, boolean)/ IWemListenerList.endList(WikiParameters, boolean) methods).
 void beginTable(WikiParameters params)
          This method notifies about the beginning of a new table in the document.
 void beginTableCell(boolean tableHead, WikiParameters params)
          This method is used to notify about the beginning of a new table cell.
 void beginTableRow(WikiParameters params)
          This method is used to notify about the beginning of a new table row.
 void endHeader(int headerLevel, WikiParameters params)
          This method is called to notify about the end of a section-level header.
 void endList(WikiParameters params, boolean ordered)
          This method is used to notify about the end of a list.
 void endListItem()
          This method is used to notify about the end of an item of a simple list (see IWemListenerList.beginList(WikiParameters, boolean)/ IWemListenerList.endList(WikiParameters, boolean) methods).
 void endParagraph(WikiParameters params)
          End of a simple paragraph.
 void endTable(WikiParameters params)
          This method notifies about the end of a table in the document.
 void endTableRow(WikiParameters params)
          This method is used to notify about the end of a table row.
protected  java.lang.String getEol()
           
 void onHorizontalLine()
           
 void onLineBreak()
          This method is called to notify about a forced line break found in the text.
 void onReference(java.lang.String ref)
          This method is called to notify that an URI (an implicit reference) was found in the parsed wiki document.
 void onSpecialSymbol(java.lang.String str)
          This method is called to notify about a sequence of special characters.
 void onTableCaption(java.lang.String str)
          Notifies the table caption.
 void onVerbatimInline(java.lang.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.wikimodel.wem.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, 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
 

Constructor Detail

XWikiSerializer

public XWikiSerializer(IWikiPrinter printer)
Method Detail

beginHeader

public void beginHeader(int headerLevel,
                        WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is called to notify about a new section header found in the document.

Specified by:
beginHeader in interface IWemListenerDocument
Overrides:
beginHeader in class PrintTextListener
Parameters:
headerLevel - the level of the found header; valid values: 1-6
params - wiki parameters associated with the
See Also:
IWemListenerDocument.beginHeader(int, WikiParameters)

beginListItem

public void beginListItem()
Description copied from interface: IWemListenerList
This method is used to notify about the beginning of a new item of a simple list (see IWemListenerList.beginList(WikiParameters, boolean)/ IWemListenerList.endList(WikiParameters, boolean) methods).

Specified by:
beginListItem in interface IWemListenerList
Overrides:
beginListItem in class PrintTextListener
See Also:
IWemListenerList.beginListItem()

beginTable

public void beginTable(WikiParameters params)
Description copied from interface: IWemListenerTable
This method notifies about the beginning of a new table in the document.

Specified by:
beginTable in interface IWemListenerTable
Overrides:
beginTable in class PrintTextListener
Parameters:
params - table parameters
See Also:
IWemListenerTable.beginTable(org.wikimodel.wem.WikiParameters)

beginTableCell

public void beginTableCell(boolean tableHead,
                           WikiParameters params)
Description copied from interface: IWemListenerTable
This method is used to notify about the beginning of a new table cell.

Specified by:
beginTableCell in interface IWemListenerTable
Overrides:
beginTableCell in class PrintTextListener
Parameters:
tableHead - if this flag is true then 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: IWemListenerTable
This method is used to notify about the beginning of a new table row.

Specified by:
beginTableRow in interface IWemListenerTable
Overrides:
beginTableRow in class PrintTextListener
Parameters:
params - parameters of the row.
See Also:
IWemListenerTable.beginTableRow(org.wikimodel.wem.WikiParameters)

endHeader

public void endHeader(int headerLevel,
                      WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is called to notify about the end of a section-level header.

Specified by:
endHeader in interface IWemListenerDocument
Overrides:
endHeader in class PrintTextListener
Parameters:
headerLevel - the level of the header
params - wiki parameters of the header
See Also:
IWemListenerDocument.endHeader(int, WikiParameters)

endList

public void endList(WikiParameters params,
                    boolean ordered)
Description copied from interface: IWemListenerList
This method is used to notify about the end of a list.

Specified by:
endList in interface IWemListenerList
Overrides:
endList in class PrintTextListener
Parameters:
params - parameters of the list
ordered - if this flag is true then this method corresponds to a new ordered list ("ol"); otherwise this method notifies a beginning of an unordered list ("ul")
See Also:
IWemListenerList.endList(org.wikimodel.wem.WikiParameters, boolean)

endListItem

public void endListItem()
Description copied from interface: IWemListenerList
This method is used to notify about the end of an item of a simple list (see IWemListenerList.beginList(WikiParameters, boolean)/ IWemListenerList.endList(WikiParameters, boolean) methods).

Specified by:
endListItem in interface IWemListenerList
Overrides:
endListItem in class PrintTextListener
See Also:
IWemListenerList.endListItem()

endParagraph

public void endParagraph(WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
End of a simple paragraph.

Specified by:
endParagraph in interface IWemListenerSimpleBlocks
Overrides:
endParagraph in class PrintTextListener
Parameters:
params - paragraph parameters
See Also:
IWemListenerSimpleBlocks.endParagraph(org.wikimodel.wem.WikiParameters)

endTable

public void endTable(WikiParameters params)
Description copied from interface: IWemListenerTable
This method notifies about the end of a table in the document.

Specified by:
endTable in interface IWemListenerTable
Overrides:
endTable in class PrintTextListener
Parameters:
params - table parameters
See Also:
IWemListenerTable.endTable(org.wikimodel.wem.WikiParameters)

endTableRow

public void endTableRow(WikiParameters params)
Description copied from interface: IWemListenerTable
This method is used to notify about the end of a table row.

Specified by:
endTableRow in interface IWemListenerTable
Overrides:
endTableRow in class PrintTextListener
Parameters:
params - parameters of the row.
See Also:
IWemListenerTable.endTableRow(org.wikimodel.wem.WikiParameters)

getEol

protected java.lang.String getEol()

onHorizontalLine

public void onHorizontalLine()

onLineBreak

public void onLineBreak()
Description copied from interface: IWemListenerInline
This 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 the IWemListenerInline.onNewLine() notification.

Specified by:
onLineBreak in interface IWemListenerInline
Overrides:
onLineBreak in class PrintTextListener
See Also:
IWemListenerInline.onLineBreak()

onReference

public void onReference(java.lang.String ref)
Description copied from interface: IWemListenerInline
This method is called to notify that an URI (an implicit reference) was found in the parsed wiki document.

Specified by:
onReference in interface IWemListenerInline
Overrides:
onReference in class PrintTextListener
Parameters:
ref - the URI
See Also:
IWemListenerInline.onReference(java.lang.String)

onSpecialSymbol

public void onSpecialSymbol(java.lang.String str)
Description copied from interface: IWemListenerInline
This 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:
onSpecialSymbol in interface IWemListenerInline
Overrides:
onSpecialSymbol in class PrintTextListener
Parameters:
str - the sequence of special symbols
See Also:
IWemListenerInline.onSpecialSymbol(java.lang.String)

onTableCaption

public void onTableCaption(java.lang.String str)
Description copied from interface: IWemListenerTable
Notifies the table caption.

Specified by:
onTableCaption in interface IWemListenerTable
Overrides:
onTableCaption in class PrintTextListener
Parameters:
str - the content of the table caption
See Also:
IWemListenerTable.onTableCaption(java.lang.String)

onVerbatimInline

public void onVerbatimInline(java.lang.String str,
                             WikiParameters params)
Description copied from interface: IWemListenerInline
This 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:
onVerbatimInline in interface IWemListenerInline
Overrides:
onVerbatimInline in class PrintTextListener
Parameters:
str - the sequence of non-interpreted characters
params - TODO
See Also:
IWemListenerInline.onVerbatimInline(java.lang.String, WikiParameters)


Copyright © 2005-2010. All Rights Reserved.