org.wikimodel.wem.xml
Class WemInlineTagNotifier

java.lang.Object
  extended by org.wikimodel.wem.xml.AbstractTagNotifier
      extended by org.wikimodel.wem.xml.WemInlineTagNotifier
All Implemented Interfaces:
IWemListenerInline, ISaxConst

public class WemInlineTagNotifier
extends AbstractTagNotifier
implements IWemListenerInline

Author:
kotelnikov

Field Summary
 
Fields inherited from class org.wikimodel.wem.xml.AbstractTagNotifier
EMPTY_MAP, fListener
 
Fields inherited from interface org.wikimodel.wem.xml.ISaxConst
DEFINITION_DESCRIPTION, DEFINITION_LIST, DEFINITION_TERM, DOCUMENT, EMPTY_LINES, EMPTY_LINES_SIZE, ESCAPE, EXTENSION_BLOCK, EXTENSION_INLINE, EXTENSION_NAME, FORMAT, HEADER, HEADER_LEVEL, HORIZONTAL_LINE, IMAGE, IMAGE_IMPLICIT, INFO_BLOCK, INFO_BLOCK_TYPE, LINE_BREAK, LIST_ITEM, LIST_ORDERED, LIST_UNORDERED, MACRO_BLOCK, MACRO_INLINE, MACRO_NAME, NEW_LINE, PARAGRAPH, PROPERTY_BLOCK, PROPERTY_DOC, PROPERTY_INLINE, PROPERTY_URL, QUOTATION, QUOTATION_LINE, REF_EXPLICIT, REF_IMPLICIT, SECTION, SECTION_CONTENT, SECTION_DOC_LEVEL, SECTION_HEADER_LEVEL, SECTION_LEVEL, STYLES, TABLE, TABLE_CAPTION, TABLE_CAPTION_PARAM, TABLE_CELL, TABLE_HEAD, TABLE_ROW, VERBATIM_BLOCK, VERBATIM_INLINE
 
Constructor Summary
WemInlineTagNotifier(ITagListener listener)
           
 
Method Summary
 void beginFormat(WikiFormat format)
          This method is called at the beginning of a sequence of in-line elements having the specified formatting parameters.
 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 onEscape(java.lang.String str)
          Escaped symbols.
 void onImage(java.lang.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 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(java.lang.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(java.lang.String str)
          This method is called to notify about a sequence of space symbols (like " " or "\t" symbols).
 void onSpecialSymbol(java.lang.String str)
          This method is called to notify about a sequence of special characters.
 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".
 void onWord(java.lang.String str)
          This method is called to notify about a "word" found in the document.
 
Methods inherited from class org.wikimodel.wem.xml.AbstractTagNotifier
newParamMap, tagParams, tagParams, tagParams, tagParams, userParams, userParams, userParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WemInlineTagNotifier

public WemInlineTagNotifier(ITagListener listener)
Parameters:
listener -
Method Detail

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.

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

onEscape

public void onEscape(java.lang.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

onImage

public void onImage(java.lang.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

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

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.onNewLine()

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.onSpace(String), IWemListenerInline.onWord(String), IWemListenerInline.onSpecialSymbol(String), 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
Parameters:
ref - the URI

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

onSpace

public void onSpace(java.lang.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.onWord(String), IWemListenerInline.onSpecialSymbol(String), IWemListenerInline.onNewLine()

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
Parameters:
str - the sequence of special symbols
See Also:
IWemListenerInline.onSpace(String), IWemListenerInline.onWord(String), IWemListenerInline.onNewLine()

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
Parameters:
str - the sequence of non-interpreted characters
params - TODO

onWord

public void onWord(java.lang.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.onSpace(String), IWemListenerInline.onSpecialSymbol(String), IWemListenerInline.onNewLine()


Copyright © 2005-2010. All Rights Reserved.