Class WikiScannerContext
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.impl.WikiScannerContext
-
- All Implemented Interfaces:
IWikiScannerContext
,IWemConstants
public class WikiScannerContext extends Object implements IWikiScannerContext
- Since:
- 4.0M1
- Version:
- $Id: cb0f9a470f7b47a12a7fd45d527912ed37c765b3 $
-
-
Field Summary
Fields Modifier and Type Field Description protected IWemListener
fListener
protected SectionBuilder<WikiParameters>
fSectionBuilder
protected Deque<IWikiScannerContext>
fStack
-
Constructor Summary
Constructors Constructor Description WikiScannerContext(IWemListener listener)
-
Method Summary
-
-
-
Field Detail
-
fListener
protected final IWemListener fListener
-
fSectionBuilder
protected SectionBuilder<WikiParameters> fSectionBuilder
-
fStack
protected final Deque<IWikiScannerContext> fStack
-
-
Constructor Detail
-
WikiScannerContext
public WikiScannerContext(IWemListener listener)
-
-
Method Detail
-
getfListener
public IWemListener getfListener()
-
beginDocument
public void beginDocument()
- Specified by:
beginDocument
in interfaceIWikiScannerContext
-
beginDocument
public void beginDocument(WikiParameters params)
- Specified by:
beginDocument
in interfaceIWikiScannerContext
-
beginFigure
public void beginFigure(WikiParameters params)
Description copied from interface:IWikiScannerContext
Starts a new figure.- Specified by:
beginFigure
in interfaceIWikiScannerContext
- Parameters:
params
- Parameters of the figure.
-
endFigure
public void endFigure()
Description copied from interface:IWikiScannerContext
Ends a figure.- Specified by:
endFigure
in interfaceIWikiScannerContext
-
beginFigureCaption
public void beginFigureCaption(WikiParameters params)
Description copied from interface:IWikiScannerContext
Starts a figure caption. This must only be used inside a figure.- Specified by:
beginFigureCaption
in interfaceIWikiScannerContext
- Parameters:
params
- The parameters of the caption.
-
endFigureCaption
public void endFigureCaption()
Description copied from interface:IWikiScannerContext
Ends a figure caption.- Specified by:
endFigureCaption
in interfaceIWikiScannerContext
-
beginFormat
public void beginFormat(WikiParameters params)
- Specified by:
beginFormat
in interfaceIWikiScannerContext
-
beginFormat
public void beginFormat(WikiStyle wikiStyle)
- Specified by:
beginFormat
in interfaceIWikiScannerContext
-
beginHeader
public void beginHeader(int level)
- Specified by:
beginHeader
in interfaceIWikiScannerContext
-
beginHeader
public void beginHeader(int level, WikiParameters params)
- Specified by:
beginHeader
in interfaceIWikiScannerContext
-
beginInfo
public void beginInfo(String type, WikiParameters params)
- Specified by:
beginInfo
in interfaceIWikiScannerContext
-
beginList
public void beginList()
- Specified by:
beginList
in interfaceIWikiScannerContext
-
beginList
public void beginList(WikiParameters params)
- Specified by:
beginList
in interfaceIWikiScannerContext
-
beginListItem
public void beginListItem(String item)
- Specified by:
beginListItem
in interfaceIWikiScannerContext
-
beginListItem
public void beginListItem(String item, WikiParameters listParams)
- Specified by:
beginListItem
in interfaceIWikiScannerContext
-
beginListItem
public void beginListItem(String item, WikiParameters listParams, WikiParameters itemParams)
- Specified by:
beginListItem
in interfaceIWikiScannerContext
-
beginParagraph
public void beginParagraph()
- Specified by:
beginParagraph
in interfaceIWikiScannerContext
-
beginParagraph
public void beginParagraph(WikiParameters params)
- Specified by:
beginParagraph
in interfaceIWikiScannerContext
-
beginPropertyBlock
public void beginPropertyBlock(String property, boolean doc)
- Specified by:
beginPropertyBlock
in interfaceIWikiScannerContext
-
beginPropertyInline
public void beginPropertyInline(String str)
- Specified by:
beginPropertyInline
in interfaceIWikiScannerContext
-
beginQuot
public void beginQuot()
- Specified by:
beginQuot
in interfaceIWikiScannerContext
-
beginQuot
public void beginQuot(WikiParameters params)
- Specified by:
beginQuot
in interfaceIWikiScannerContext
-
beginQuotLine
public void beginQuotLine(int depth)
- Specified by:
beginQuotLine
in interfaceIWikiScannerContext
-
beginTable
public void beginTable()
- Specified by:
beginTable
in interfaceIWikiScannerContext
-
beginTable
public void beginTable(WikiParameters params)
- Specified by:
beginTable
in interfaceIWikiScannerContext
-
beginTableCell
public void beginTableCell(boolean headCell)
- Specified by:
beginTableCell
in interfaceIWikiScannerContext
-
beginTableCell
public void beginTableCell(boolean headCell, WikiParameters params)
- Specified by:
beginTableCell
in interfaceIWikiScannerContext
-
beginTableRow
public void beginTableRow(boolean headCell)
Description copied from interface:IWikiScannerContext
Starts a new table row and adds the first cell to the table.- Specified by:
beginTableRow
in interfaceIWikiScannerContext
- Parameters:
headCell
- if this parameter istrue
then this method starts the header cell at the beginning of the line
-
beginTableRow
public void beginTableRow(boolean head, WikiParameters rowParams, WikiParameters cellParams)
Description copied from interface:IWikiScannerContext
Starts a new table row and adds the first cell to the table.- Specified by:
beginTableRow
in interfaceIWikiScannerContext
- Parameters:
head
- if this parameter istrue
then this method starts the header cell at the beginning of the linerowParams
- parameters of the rowcellParams
- parameters of the first row cell
-
beginTableRow
public void beginTableRow(WikiParameters rowParams)
Description copied from interface:IWikiScannerContext
Starts a new table row (but doesn't add a cell).- Specified by:
beginTableRow
in interfaceIWikiScannerContext
-
canApplyDefintionSplitter
public boolean canApplyDefintionSplitter()
- Specified by:
canApplyDefintionSplitter
in interfaceIWikiScannerContext
-
checkFormatStyle
public boolean checkFormatStyle(WikiStyle style)
- Specified by:
checkFormatStyle
in interfaceIWikiScannerContext
-
closeBlock
public void closeBlock()
- Specified by:
closeBlock
in interfaceIWikiScannerContext
-
endDocument
public void endDocument()
- Specified by:
endDocument
in interfaceIWikiScannerContext
-
endFormat
public void endFormat(WikiParameters params)
- Specified by:
endFormat
in interfaceIWikiScannerContext
-
endFormat
public void endFormat(WikiStyle wikiStyle)
- Specified by:
endFormat
in interfaceIWikiScannerContext
-
endHeader
public void endHeader()
- Specified by:
endHeader
in interfaceIWikiScannerContext
-
endInfo
public void endInfo()
- Specified by:
endInfo
in interfaceIWikiScannerContext
-
endList
public void endList()
- Specified by:
endList
in interfaceIWikiScannerContext
-
endListItem
public void endListItem()
- Specified by:
endListItem
in interfaceIWikiScannerContext
-
endParagraph
public void endParagraph()
- Specified by:
endParagraph
in interfaceIWikiScannerContext
-
endPropertyBlock
public void endPropertyBlock()
- Specified by:
endPropertyBlock
in interfaceIWikiScannerContext
-
endPropertyInline
public void endPropertyInline()
- Specified by:
endPropertyInline
in interfaceIWikiScannerContext
-
endQuot
public void endQuot()
- Specified by:
endQuot
in interfaceIWikiScannerContext
-
endQuotLine
public void endQuotLine()
- Specified by:
endQuotLine
in interfaceIWikiScannerContext
-
endTable
public void endTable()
- Specified by:
endTable
in interfaceIWikiScannerContext
-
endTableCell
public void endTableCell()
- Specified by:
endTableCell
in interfaceIWikiScannerContext
-
endTableExplicit
public void endTableExplicit()
- Specified by:
endTableExplicit
in interfaceIWikiScannerContext
-
endTableRow
public void endTableRow()
- Specified by:
endTableRow
in interfaceIWikiScannerContext
-
getContext
public IWikiScannerContext getContext()
-
getInlineState
public InlineState getInlineState()
- Specified by:
getInlineState
in interfaceIWikiScannerContext
-
getTableCellCounter
public int getTableCellCounter()
- Specified by:
getTableCellCounter
in interfaceIWikiScannerContext
-
getTableRowCounter
public int getTableRowCounter()
- Specified by:
getTableRowCounter
in interfaceIWikiScannerContext
-
isInDefinitionList
public boolean isInDefinitionList()
- Specified by:
isInDefinitionList
in interfaceIWikiScannerContext
-
isInDefinitionTerm
public boolean isInDefinitionTerm()
- Specified by:
isInDefinitionTerm
in interfaceIWikiScannerContext
-
isInHeader
public boolean isInHeader()
- Specified by:
isInHeader
in interfaceIWikiScannerContext
-
isInInlineProperty
public boolean isInInlineProperty()
- Specified by:
isInInlineProperty
in interfaceIWikiScannerContext
-
isInList
public boolean isInList()
- Specified by:
isInList
in interfaceIWikiScannerContext
-
isInTable
public boolean isInTable()
- Specified by:
isInTable
in interfaceIWikiScannerContext
-
isInTableCell
public boolean isInTableCell()
- Specified by:
isInTableCell
in interfaceIWikiScannerContext
-
isInTableRow
public boolean isInTableRow()
- Specified by:
isInTableRow
in interfaceIWikiScannerContext
-
newInternalContext
protected InternalWikiScannerContext newInternalContext()
- Returns:
-
onDefinitionListItemSplit
public void onDefinitionListItemSplit()
- Specified by:
onDefinitionListItemSplit
in interfaceIWikiScannerContext
-
onEmptyLines
public void onEmptyLines(int count)
- Specified by:
onEmptyLines
in interfaceIWikiScannerContext
-
onEscape
public void onEscape(String str)
- Specified by:
onEscape
in interfaceIWikiScannerContext
-
onExtensionBlock
public void onExtensionBlock(String extensionName, WikiParameters params)
- Specified by:
onExtensionBlock
in interfaceIWikiScannerContext
-
onExtensionInline
public void onExtensionInline(String extensionName, WikiParameters params)
- Specified by:
onExtensionInline
in interfaceIWikiScannerContext
-
onFormat
public void onFormat(WikiParameters params)
- Specified by:
onFormat
in interfaceIWikiScannerContext
-
onFormat
public void onFormat(WikiStyle wikiStyle)
- Specified by:
onFormat
in interfaceIWikiScannerContext
-
onFormat
public void onFormat(WikiStyle wikiStyle, boolean forceClose)
- Specified by:
onFormat
in interfaceIWikiScannerContext
- See Also:
onFormat(org.xwiki.rendering.wikimodel.WikiStyle, boolean)
-
onHorizontalLine
public void onHorizontalLine()
- Specified by:
onHorizontalLine
in interfaceIWikiScannerContext
-
onHorizontalLine
public void onHorizontalLine(WikiParameters params)
- Specified by:
onHorizontalLine
in interfaceIWikiScannerContext
-
onImage
public void onImage(String ref)
- Specified by:
onImage
in interfaceIWikiScannerContext
-
onImage
public void onImage(WikiReference ref)
- Specified by:
onImage
in interfaceIWikiScannerContext
-
onLineBreak
public void onLineBreak()
- Specified by:
onLineBreak
in interfaceIWikiScannerContext
-
onMacro
public void onMacro(String name, WikiParameters params, String content)
- Specified by:
onMacro
in interfaceIWikiScannerContext
-
onMacro
public void onMacro(String macroName, WikiParameters params, String content, boolean inline)
- Specified by:
onMacro
in interfaceIWikiScannerContext
-
onMacroBlock
public void onMacroBlock(String macroName, WikiParameters params, String content)
- Specified by:
onMacroBlock
in interfaceIWikiScannerContext
-
onMacroInline
public void onMacroInline(String macroName, WikiParameters params, String content)
- Specified by:
onMacroInline
in interfaceIWikiScannerContext
-
onNewLine
public void onNewLine()
- Specified by:
onNewLine
in interfaceIWikiScannerContext
-
onQuotLine
public void onQuotLine(int depth)
- Specified by:
onQuotLine
in interfaceIWikiScannerContext
-
onReference
public void onReference(String ref)
- Specified by:
onReference
in interfaceIWikiScannerContext
-
onReference
public void onReference(WikiReference ref)
- Specified by:
onReference
in interfaceIWikiScannerContext
-
onSpace
public void onSpace(String str)
- Specified by:
onSpace
in interfaceIWikiScannerContext
-
onSpecialSymbol
public void onSpecialSymbol(String str)
- Specified by:
onSpecialSymbol
in interfaceIWikiScannerContext
-
onTableCaption
public void onTableCaption(String str)
- Specified by:
onTableCaption
in interfaceIWikiScannerContext
-
onTableCell
public void onTableCell(boolean headCell)
- Specified by:
onTableCell
in interfaceIWikiScannerContext
-
onTableCell
public void onTableCell(boolean head, WikiParameters cellParams)
- Specified by:
onTableCell
in interfaceIWikiScannerContext
-
onTableRow
public void onTableRow(WikiParameters params)
Description copied from interface:IWikiScannerContext
Explicitly starts a new table row. This method should not create a new cell at the beginning of the line. To automatically create the first row cell the methodsIWikiScannerContext.beginTableCell(boolean)
orIWikiScannerContext.beginTableRow(boolean, WikiParameters, WikiParameters)
should be used.- Specified by:
onTableRow
in interfaceIWikiScannerContext
- See Also:
onTableRow(org.xwiki.rendering.wikimodel.WikiParameters)
-
onVerbatim
public void onVerbatim(String str, boolean inline)
- Specified by:
onVerbatim
in interfaceIWikiScannerContext
- See Also:
onVerbatim(java.lang.String, boolean)
-
onVerbatim
public void onVerbatim(String str, boolean inline, WikiParameters params)
- Specified by:
onVerbatim
in interfaceIWikiScannerContext
-
onVerbatim
public void onVerbatim(String str, WikiParameters params)
- Specified by:
onVerbatim
in interfaceIWikiScannerContext
-
onWord
public void onWord(String str)
- Specified by:
onWord
in interfaceIWikiScannerContext
-
-