org.xwiki.rendering.wikimodel
Class AgregatingWemListener

java.lang.Object
  extended by org.xwiki.rendering.wikimodel.AgregatingWemListener
All Implemented Interfaces:
IWemListener, IWemListenerDocument, IWemListenerInline, IWemListenerList, IWemListenerProgramming, IWemListenerSemantic, IWemListenerSimpleBlocks, IWemListenerTable
Direct Known Subclasses:
WemTagNotifier

public class AgregatingWemListener
extends Object
implements IWemListener

Since:
4.0M1

Field Summary
protected  IWemListenerSimpleBlocks fBlockListener
           
protected  IWemListenerDocument fDocumentListener
           
protected  IWemListenerInline fInlineListener
           
protected  IWemListenerList fListListener
           
protected  IWemListenerProgramming fProgrammingListener
           
protected  IWemListenerSemantic fSemanticListener
           
protected  IWemListenerTable fTableListener
           
 
Constructor Summary
AgregatingWemListener()
           
 
Method Summary
 void beginDefinitionDescription()
          This method is used to notify about a definition description.
 void beginDefinitionList(WikiParameters params)
          This method is used to notify about a new definition list.
 void beginDefinitionTerm()
          A definition term.
 void beginDocument(WikiParameters params)
          This method is called to notify about the beginning of the top-level parsed document or about the beginning of an embedded document (contained in the main one).
 void beginFormat(WikiFormat format)
          This method is called at the beginning of a sequence of in-line elements having the specified formatting parameters.
 void beginHeader(int headerLevel, WikiParameters params)
          This method is called to notify about a new section header found in the document.
 void beginInfoBlock(String infoType, WikiParameters params)
          This method is used to notify about the beginning of a "typed" paragraph.
 void beginList(WikiParameters params, boolean ordered)
          This method is used to notify about a new list.
 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 beginParagraph(WikiParameters params)
          Begin of a simple paragraph.
 void beginPropertyBlock(String propertyUri, boolean doc)
          This method is called to notify about the beginning of a new property found in the parsed document.
 void beginPropertyInline(String propertyUri)
          This method is called to notify about the beginning of a new inline property found in the text of the parsed document.
 void beginQuotation(WikiParameters params)
          Notifies about the beginning of a quotation elements.
 void beginQuotationLine()
          A list containing quotation.
 void beginSection(int docLevel, int headerLevel, WikiParameters params)
          This method is used to notify about the beginning of a section.
 void beginSectionContent(int docLevel, int headerLevel, WikiParameters params)
          This method is used to notify about the beginning of a section.
 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 endDefinitionDescription()
          This method is used to notify about the end of a definition description.
 void endDefinitionList(WikiParameters params)
          This method is used to notify about the end of a definition list.
 void endDefinitionTerm()
          The end of a definition term.
 void endDocument(WikiParameters params)
          This method is used to notify about the end of a top-level or an internal document.
 void endFormat(WikiFormat format)
          This method is called to notify about the end of a sequence of in-line elements having common formatting parameters.
 void endHeader(int headerLevel, WikiParameters params)
          This method is called to notify about the end of a section-level header.
 void endInfoBlock(String infoType, WikiParameters params)
          This method is used to notify about the end of a "typed" paragraph.
 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 endPropertyBlock(String propertyUri, boolean doc)
          This method is called to notify about the end of a block property found in the parsed document.
 void endPropertyInline(String propertyUri)
          This method is called to notify about the end of an inline property found in the text of the parsed document.
 void endQuotation(WikiParameters params)
          Notifies about the end of a quotation element sequence.
 void endQuotationLine()
          This method is used to notify about the end of a quotation line.
 void endSection(int docLevel, int headerLevel, WikiParameters params)
          This method is used to notify about the end of a document section.
 void endSectionContent(int docLevel, int headerLevel, WikiParameters params)
          This method is used to notify about the end of a document section.
 void endTable(WikiParameters params)
          This method notifies about the end of a table in the document.
 void endTableCell(boolean tableHead, WikiParameters params)
          This method is used to notify about the end of a table cell.
 void endTableRow(WikiParameters params)
          This method is used to notify about the end of a table row.
 IWemListenerSimpleBlocks getBlockListener()
           
 IWemListenerDocument getDocumentListener()
           
 IWemListenerInline getInlineListener()
           
 IWemListenerList getListListener()
           
 IWemListenerProgramming getProgrammingListener()
           
 IWemListenerSemantic getSemanticListener()
           
 IWemListenerTable getTableListener()
           
 void onEmptyLines(int count)
          This method is used to notify about a sequence of empty lines.
 void onEscape(String str)
          Escaped symbols.
 void onExtensionBlock(String extensionName, WikiParameters params)
          This method is used to notify about a new extension which CAN generate block elements as a result of its interpretation.
 void onExtensionInline(String extensionName, WikiParameters params)
          This method is used to notify about a new extension which CAN generate in-line elements as a result of its interpretation.
 void onHorizontalLine(WikiParameters params)
          This method notifies horizontal lines defined in the text.
 void onImage(String ref)
          This method is called to notify that an free standing image was found in the parsed wiki document.
 void onImage(WikiReference ref)
          This method is called to notify that a structured reference was found in the text
 void onLineBreak()
          This method is called to notify about a forced line break found in the text.
 void onMacroBlock(String macroName, WikiParameters params, String content)
          This method is used to notify about a new in-line macro which CAN generate block elements as a result of its interpretation.
 void onMacroInline(String macroName, WikiParameters params, String content)
          This method is used to notify about a new in-line macro which CAN generate only in-line elements as a result of its interpretation.
 void onNewLine()
          This method is called to notify that the parsed block contains a new line sequence ("\r\n" or "\r" or "\n" character sequence).
 void onReference(String ref)
          This method is called to notify that an URI (an implicit reference) was found in the parsed wiki document.
 void onReference(WikiReference ref)
          This method is called to notify that a structured reference was found in the text
 void onSpace(String str)
          This method is called to notify about a sequence of space symbols (like " " or "\t" symbols).
 void onSpecialSymbol(String str)
          This method is called to notify about a sequence of special characters.
 void onTableCaption(String str)
          Notifies the table caption.
 void onVerbatimBlock(String str, WikiParameters params)
          This method notifies about a verbatim (pre-formatted) block defined in the text
 void onVerbatimInline(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".
 void onWord(String str)
          This method is called to notify about a "word" found in the document.
 void setBlockListener(IWemListenerSimpleBlocks blockListener)
           
 void setDocumentListener(IWemListenerDocument documentListener)
           
 void setInlineListener(IWemListenerInline inlineListener)
           
 void setListListener(IWemListenerList listListener)
           
 void setProgrammingListener(IWemListenerProgramming programmingListener)
           
 void setSemanticListener(IWemListenerSemantic semanticListener)
           
 void setTableListener(IWemListenerTable tableListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fBlockListener

protected IWemListenerSimpleBlocks fBlockListener

fDocumentListener

protected IWemListenerDocument fDocumentListener

fInlineListener

protected IWemListenerInline fInlineListener

fListListener

protected IWemListenerList fListListener

fProgrammingListener

protected IWemListenerProgramming fProgrammingListener

fSemanticListener

protected IWemListenerSemantic fSemanticListener

fTableListener

protected IWemListenerTable fTableListener
Constructor Detail

AgregatingWemListener

public AgregatingWemListener()
Method Detail

beginDefinitionDescription

public void beginDefinitionDescription()
Description copied from interface: IWemListenerList
This method is used to notify about a definition description. All definition descriptions are contained in definition lists and can contain text, embedded lists or an embedded document.

Specified by:
beginDefinitionDescription in interface IWemListenerList
See Also:
IWemListenerList.beginDefinitionDescription()

beginDefinitionList

public void beginDefinitionList(WikiParameters params)
Description copied from interface: IWemListenerList
This method is used to notify about a new definition list.

Specified by:
beginDefinitionList in interface IWemListenerList
Parameters:
params - list of parameters for the list
See Also:
IWemListenerList.beginDefinitionList(WikiParameters)

beginDefinitionTerm

public void beginDefinitionTerm()
Description copied from interface: IWemListenerList
A definition term. Definition terms can contain only formatted texts. Note that it is impossible to have an embedded list or a document inside of definition terms.

Specified by:
beginDefinitionTerm in interface IWemListenerList
See Also:
IWemListenerList.beginDefinitionTerm()

beginDocument

public void beginDocument(WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is called to notify about the beginning of the top-level parsed document or about the beginning of an embedded document (contained in the main one).

Specified by:
beginDocument in interface IWemListenerDocument
See Also:
IWemListenerDocument.beginDocument(WikiParameters)

beginFormat

public void beginFormat(WikiFormat format)
Description copied from interface: IWemListenerInline
This method is called at the beginning of a sequence of in-line elements having the specified formatting parameters.

Specified by:
beginFormat in interface IWemListenerInline
Parameters:
format - the object defining formatting parameters of in-line elements.
See Also:
IWemListenerInline.beginFormat(WikiFormat)

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
Parameters:
headerLevel - the level of the found header; valid values: 1-6
params - wiki parameters associated with the
See Also:
IWemListenerDocument.beginHeader(int, WikiParameters)

beginInfoBlock

public void beginInfoBlock(String infoType,
                           WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
This method is used to notify about the beginning of a "typed" paragraph. Some wiki syntaxes have special markups to define simple block elements corresponding to "warnings", "info blocks" and so on. Blocks of this type can have formatted inline elements.

Specified by:
beginInfoBlock in interface IWemListenerSimpleBlocks
Parameters:
infoType - the "type" of the special block
params - parameters of this block
See Also:
IWemListenerSimpleBlocks.beginInfoBlock(java.lang.String, WikiParameters)

beginList

public void beginList(WikiParameters params,
                      boolean ordered)
Description copied from interface: IWemListenerList
This method is used to notify about a new list. Each list contain at least one list item. All list items are notified using the IWemListenerList.beginListItem()/IWemListenerList.endListItem() method pair. Items of lists of this type can contain the following sequence of elements:
  1. formatted text - the text can be empty; in this case it is not notified
  2. Just after the text the list item can have:
    • an embedded list - in this way it is possible to build hierarchical structures
    • an embedded document - it should be defined explicitly and it can have all valid elements of the top-level document

Specified by:
beginList in interface IWemListenerList
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.beginList(WikiParameters, boolean)

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
See Also:
IWemListenerList.beginListItem()

beginParagraph

public void beginParagraph(WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
Begin of a simple paragraph. Paragraphs can contain only formatted inline elements.

Specified by:
beginParagraph in interface IWemListenerSimpleBlocks
Parameters:
params - paragraph parameters
See Also:
IWemListenerSimpleBlocks.beginParagraph(WikiParameters)

beginPropertyBlock

public void beginPropertyBlock(String propertyUri,
                               boolean doc)
Description copied from interface: IWemListenerSemantic
This method is called to notify about the beginning of a new property found in the parsed document.

Specified by:
beginPropertyBlock in interface IWemListenerSemantic
Parameters:
propertyUri - the URI of the semantic block property found in the document
doc - this flag is true if the found property contains a whole document; if this flag is false then expected property value contains a paragraph
See Also:
IWemListenerSemantic.beginPropertyBlock(java.lang.String, boolean)

beginPropertyInline

public void beginPropertyInline(String propertyUri)
Description copied from interface: IWemListenerSemantic
This method is called to notify about the beginning of a new inline property found in the text of the parsed document.

Specified by:
beginPropertyInline in interface IWemListenerSemantic
Parameters:
propertyUri - the URI of the semantic inline property found in the document
See Also:
IWemListenerSemantic.beginPropertyInline(java.lang.String)

beginQuotation

public void beginQuotation(WikiParameters params)
Description copied from interface: IWemListenerList
Notifies about the beginning of a quotation elements.

Specified by:
beginQuotation in interface IWemListenerList
Parameters:
params - parameters of the list
See Also:
IWemListenerList.beginQuotation(WikiParameters)

beginQuotationLine

public void beginQuotationLine()
Description copied from interface: IWemListenerList
A list containing quotation. This is a part of quotation lists. Each quotation item can have other quotation lists.

Specified by:
beginQuotationLine in interface IWemListenerList
See Also:
IWemListenerList.beginQuotationLine()

beginSection

public void beginSection(int docLevel,
                         int headerLevel,
                         WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is used to notify about the beginning of a section. Document sections delimits a set of structural elements at the same "level". A new level starts with a new document or a new header.

Specified by:
beginSection in interface IWemListenerDocument
Parameters:
docLevel - the level (depth) of the document containing this section
headerLevel - the level of the header defining this section
params - parameters parameters of the document or the header
See Also:
IWemListenerDocument.beginSection(int, int, WikiParameters)

beginSectionContent

public void beginSectionContent(int docLevel,
                                int headerLevel,
                                WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is used to notify about the beginning of a section. Document sections delimits a set of structural elements at the same "level". A new level starts with a new document or a new header.

Specified by:
beginSectionContent in interface IWemListenerDocument
Parameters:
docLevel - the level (depth) of the document containing this section
headerLevel - the level of the header defining this section
params - parameters parameters of the document or the header
See Also:
IWemListenerDocument.beginSectionContent(int, int, WikiParameters)

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
Parameters:
params - table parameters
See Also:
IWemListenerTable.beginTable(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
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
Parameters:
params - parameters of the row.
See Also:
IWemListenerTable.beginTableRow(WikiParameters)

endDefinitionDescription

public void endDefinitionDescription()
Description copied from interface: IWemListenerList
This method is used to notify about the end of a definition description.

Specified by:
endDefinitionDescription in interface IWemListenerList
See Also:
IWemListenerList.endDefinitionDescription()

endDefinitionList

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

Specified by:
endDefinitionList in interface IWemListenerList
Parameters:
params - list of parameters for the list
See Also:
IWemListenerList.endDefinitionList(WikiParameters)

endDefinitionTerm

public void endDefinitionTerm()
Description copied from interface: IWemListenerList
The end of a definition term.

Specified by:
endDefinitionTerm in interface IWemListenerList
See Also:
IWemListenerList.endDefinitionTerm()

endDocument

public void endDocument(WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is used to notify about the end of a top-level or an internal document.

Specified by:
endDocument in interface IWemListenerDocument
See Also:
IWemListenerDocument.endDocument(WikiParameters)

endFormat

public void endFormat(WikiFormat format)
Description copied from interface: IWemListenerInline
This method is called to notify about the end of a sequence of in-line elements having common formatting parameters.

Specified by:
endFormat in interface IWemListenerInline
Parameters:
format - the formatting object defining how contained in-line elements should be formatted
See Also:
IWemListenerInline.endFormat(WikiFormat)

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
Parameters:
headerLevel - the level of the header
params - wiki parameters of the header
See Also:
IWemListenerDocument.endHeader(int, WikiParameters)

endInfoBlock

public void endInfoBlock(String infoType,
                         WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
This method is used to notify about the end of a "typed" paragraph.

Specified by:
endInfoBlock in interface IWemListenerSimpleBlocks
Parameters:
infoType - the "type" of the special block
params - parameters of this block
See Also:
IWemListenerSimpleBlocks.endInfoBlock(java.lang.String, 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
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(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
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
Parameters:
params - paragraph parameters
See Also:
IWemListenerSimpleBlocks.endParagraph(WikiParameters)

endPropertyBlock

public void endPropertyBlock(String propertyUri,
                             boolean doc)
Description copied from interface: IWemListenerSemantic
This method is called to notify about the end of a block property found in the parsed document.

Specified by:
endPropertyBlock in interface IWemListenerSemantic
Parameters:
propertyUri - the URI of the semantic block property found in the document
doc - this flag is true if the found property contains a whole document; otherwise (if this flag is false) the value of the property is a simple paragraph
See Also:
IWemListenerSemantic.endPropertyBlock(java.lang.String, boolean)

endPropertyInline

public void endPropertyInline(String propertyUri)
Description copied from interface: IWemListenerSemantic
This method is called to notify about the end of an inline property found in the text of the parsed document.

Specified by:
endPropertyInline in interface IWemListenerSemantic
Parameters:
propertyUri - the URI of the semantic inline property found in the document
See Also:
IWemListenerSemantic.endPropertyInline(java.lang.String)

endQuotation

public void endQuotation(WikiParameters params)
Description copied from interface: IWemListenerList
Notifies about the end of a quotation element sequence.

Specified by:
endQuotation in interface IWemListenerList
Parameters:
params - parameters of the list
See Also:
IWemListenerList.endQuotation(WikiParameters)

endQuotationLine

public void endQuotationLine()
Description copied from interface: IWemListenerList
This method is used to notify about the end of a quotation line.

Specified by:
endQuotationLine in interface IWemListenerList
See Also:
IWemListenerList.endQuotationLine()

endSection

public void endSection(int docLevel,
                       int headerLevel,
                       WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is used to notify about the end of a document section.

Specified by:
endSection in interface IWemListenerDocument
Parameters:
docLevel - the level (depth) of the document containing this section
headerLevel - the level of the header defining this section
params - parameters parameters of the document or the header
See Also:
IWemListenerDocument.endSection(int, int, WikiParameters)

endSectionContent

public void endSectionContent(int docLevel,
                              int headerLevel,
                              WikiParameters params)
Description copied from interface: IWemListenerDocument
This method is used to notify about the end of a document section.

Specified by:
endSectionContent in interface IWemListenerDocument
Parameters:
docLevel - the level (depth) of the document containing this section
headerLevel - the level of the header defining this section
params - parameters parameters of the document or the header
See Also:
IWemListenerDocument.endSectionContent(int, int, 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
Parameters:
params - table parameters
See Also:
IWemListenerTable.endTable(WikiParameters)

endTableCell

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

Specified by:
endTableCell in interface IWemListenerTable
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.endTableCell(boolean, 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
Parameters:
params - parameters of the row.
See Also:
IWemListenerTable.endTableRow(WikiParameters)

getBlockListener

public IWemListenerSimpleBlocks getBlockListener()
Returns:
the blockListener

getDocumentListener

public IWemListenerDocument getDocumentListener()
Returns:
the documentListener

getInlineListener

public IWemListenerInline getInlineListener()
Returns:
the inlineListener

getListListener

public IWemListenerList getListListener()
Returns:
the listListener

getProgrammingListener

public IWemListenerProgramming getProgrammingListener()
Returns:
the programmingListener

getSemanticListener

public IWemListenerSemantic getSemanticListener()
Returns:
the semanticListener

getTableListener

public IWemListenerTable getTableListener()
Returns:
the tableListener

onEmptyLines

public void onEmptyLines(int count)
Description copied from interface: IWemListenerSimpleBlocks
This method is used to notify about a sequence of empty lines. This event can be interpreted as an "empty paragraph".

Specified by:
onEmptyLines in interface IWemListenerSimpleBlocks
Parameters:
count - the number of empty lines found in the text
See Also:
IWemListenerSimpleBlocks.onEmptyLines(int)

onEscape

public void onEscape(String str)
Description copied from interface: IWemListenerInline
Escaped symbols. More frequently the given string has just one symbol.

Specified by:
onEscape in interface IWemListenerInline
Parameters:
str - the escaped sequence of characters
See Also:
IWemListenerInline.onEscape(java.lang.String)

onExtensionBlock

public void onExtensionBlock(String extensionName,
                             WikiParameters params)
Description copied from interface: IWemListenerProgramming
This method is used to notify about a new extension which CAN generate block elements as a result of its interpretation.

Specified by:
onExtensionBlock in interface IWemListenerProgramming
Parameters:
extensionName - the name of the extension
params - parameters for the extension
See Also:
IWemListenerProgramming.onExtensionBlock(java.lang.String, WikiParameters)

onExtensionInline

public void onExtensionInline(String extensionName,
                              WikiParameters params)
Description copied from interface: IWemListenerProgramming
This method is used to notify about a new extension which CAN generate in-line elements as a result of its interpretation. This method CAN NOT generate block elements.

Specified by:
onExtensionInline in interface IWemListenerProgramming
Parameters:
extensionName - the name of the extension
params - parameters for the extension
See Also:
IWemListenerProgramming.onExtensionInline(java.lang.String, WikiParameters)

onHorizontalLine

public void onHorizontalLine(WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
This method notifies horizontal lines defined in the text.

Specified by:
onHorizontalLine in interface IWemListenerSimpleBlocks
Parameters:
params - parameters of the horizontal line
See Also:
IWemListenerSimpleBlocks.onHorizontalLine(WikiParameters)

onImage

public void onImage(String ref)
Description copied from interface: IWemListenerInline
This method is called to notify that an free standing image was found in the parsed wiki document.

Specified by:
onImage in interface IWemListenerInline
Parameters:
ref - the reference the reference
See Also:
IWemListenerInline.onImage(java.lang.String)

onImage

public void onImage(WikiReference ref)
Description copied from interface: IWemListenerInline
This method is called to notify that a structured reference was found in the text

Specified by:
onImage in interface IWemListenerInline
Parameters:
ref - the reference the reference
See Also:
IWemListenerInline.onImage(WikiReference)

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
See Also:
IWemListenerInline.onLineBreak()

onMacroBlock

public void onMacroBlock(String macroName,
                         WikiParameters params,
                         String content)
Description copied from interface: IWemListenerProgramming
This method is used to notify about a new in-line macro which CAN generate block elements as a result of its interpretation.

Specified by:
onMacroBlock in interface IWemListenerProgramming
Parameters:
macroName - the name of the macro
params - parameters of the macro
content - the content of the macro
See Also:
IWemListenerProgramming.onMacroBlock(java.lang.String, WikiParameters, java.lang.String)

onMacroInline

public void onMacroInline(String macroName,
                          WikiParameters params,
                          String content)
Description copied from interface: IWemListenerProgramming
This method is used to notify about a new in-line macro which CAN generate only in-line elements as a result of its interpretation. This method CAN NOT generate block elements.

Specified by:
onMacroInline in interface IWemListenerProgramming
Parameters:
macroName - the name of the macro
params - parameters of the macro
content - the content of the macro
See Also:
IWemListenerProgramming.onMacroInline(java.lang.String, WikiParameters, java.lang.String)

onNewLine

public void onNewLine()
Description copied from interface: IWemListenerInline
This method is called to notify that the parsed block contains a new line sequence ("\r\n" or "\r" or "\n" character sequence). Note that the new line symbols are not the same as a forced line break sequence notified by the IWemListenerInline.onLineBreak() event.

Specified by:
onNewLine in interface IWemListenerInline
See Also:
IWemListenerInline.onNewLine()

onReference

public void onReference(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
Parameters:
ref - the URI
See Also:
IWemListenerInline.onReference(java.lang.String)

onReference

public void onReference(WikiReference ref)
Description copied from interface: IWemListenerInline
This method is called to notify that a structured reference was found in the text

Specified by:
onReference in interface IWemListenerInline
Parameters:
ref - the reference the reference
See Also:
IWemListenerInline.onReference(WikiReference)

onSpace

public void onSpace(String str)
Description copied from interface: IWemListenerInline
This method is called to notify about a sequence of space symbols (like " " or "\t" symbols).

Specified by:
onSpace in interface IWemListenerInline
Parameters:
str - the sequence of space characters
See Also:
IWemListenerInline.onSpace(java.lang.String)

onSpecialSymbol

public void onSpecialSymbol(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
Parameters:
str - the sequence of special symbols
See Also:
IWemListenerInline.onSpecialSymbol(java.lang.String)

onTableCaption

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

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

onVerbatimBlock

public void onVerbatimBlock(String str,
                            WikiParameters params)
Description copied from interface: IWemListenerSimpleBlocks
This method notifies about a verbatim (pre-formatted) block defined in the text

Specified by:
onVerbatimBlock in interface IWemListenerSimpleBlocks
Parameters:
str - the content of the verbatim (pre-formatted) block
params - parameters of the verbatim block
See Also:
IWemListenerSimpleBlocks.onVerbatimBlock(java.lang.String, WikiParameters)

onVerbatimInline

public void onVerbatimInline(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
Parameters:
str - the sequence of non-interpreted characters
params - TODO
See Also:
IWemListenerInline.onVerbatimInline(java.lang.String, WikiParameters)

onWord

public void onWord(String str)
Description copied from interface: IWemListenerInline
This method is called to notify about a "word" found in the document. Words are formed by all characters which are not considered as spaces or special symbols.
 Words are formed by the all characters excluding the following ones:

  "\t",    "\n",     "\r",    " ",
  "!",     "\"",     "#",     "$",     "%",     "&",     "'",     "(",
  ")",     "*",      "+",     ",",     "-",     ".",     "/",     ":",
  ";",     "<",      "=",     ">",     "?",     "@",     "[",     "\\",
  "]",     "^",      "_",     "`",     "{",     "|",     "}",     "~"
 

Specified by:
onWord in interface IWemListenerInline
Parameters:
str - the sequence of characters forming a word
See Also:
IWemListenerInline.onWord(java.lang.String)

setBlockListener

public void setBlockListener(IWemListenerSimpleBlocks blockListener)
Parameters:
blockListener - the blockListener to set

setDocumentListener

public void setDocumentListener(IWemListenerDocument documentListener)
Parameters:
documentListener - the documentListener to set

setInlineListener

public void setInlineListener(IWemListenerInline inlineListener)
Parameters:
inlineListener - the inlineListener to set

setListListener

public void setListListener(IWemListenerList listListener)
Parameters:
listListener - the listListener to set

setProgrammingListener

public void setProgrammingListener(IWemListenerProgramming programmingListener)
Parameters:
programmingListener - the programmingListener to set

setSemanticListener

public void setSemanticListener(IWemListenerSemantic semanticListener)
Parameters:
semanticListener - the semanticListener to set

setTableListener

public void setTableListener(IWemListenerTable tableListener)
Parameters:
tableListener - the tableListener to set