Class InternalWikiScannerContext
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.impl.InternalWikiScannerContext
-
- All Implemented Interfaces:
IWikiScannerContext
,IWemConstants
public class InternalWikiScannerContext extends Object implements IWikiScannerContext
- Since:
- 4.0M1
- Version:
- $Id: 021cf3d0188600f7456fdbc0e2f565355ae4c6de $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
InternalWikiScannerContext.IBlockTypes
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InternalWikiScannerContext(SectionBuilder<WikiParameters> sectionBuilder, IWemListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDocument()
void
beginDocument(WikiParameters params)
void
beginFigure(WikiParameters params)
Starts a new figure.void
beginFigureCaption(WikiParameters params)
Starts a figure caption.void
beginFormat(WikiParameters params)
void
beginFormat(WikiStyle wikiStyle)
void
beginHeader(int level)
void
beginHeader(int level, WikiParameters params)
void
beginInfo(String type, WikiParameters params)
void
beginList()
void
beginList(WikiParameters params)
void
beginListItem(String item)
void
beginListItem(String item, WikiParameters listParams)
void
beginListItem(String item, WikiParameters listParams, WikiParameters itemParams)
void
beginParagraph()
void
beginParagraph(WikiParameters params)
void
beginPropertyBlock(String property, boolean doc)
void
beginPropertyInline(String str)
void
beginQuot()
void
beginQuot(WikiParameters params)
void
beginQuotLine(int depth)
protected void
beginStyleContainer()
void
beginTable()
void
beginTable(WikiParameters params)
void
beginTableCell(boolean headCell)
void
beginTableCell(boolean headCell, WikiParameters params)
void
beginTableRow(boolean headCell)
Starts a new table row and adds the first cell to the table.void
beginTableRow(boolean head, WikiParameters rowParams, WikiParameters cellParams)
Starts a new table row and adds the first cell to the table.void
beginTableRow(WikiParameters rowParams)
Starts a new table row (but doesn't add a cell).boolean
canApplyDefintionSplitter()
boolean
checkFormatStyle(WikiStyle style)
protected void
checkStyleOpened()
void
closeBlock()
void
closeFormat()
void
endDocument()
void
endFigure()
Ends a figure.void
endFigureCaption()
Ends a figure caption.void
endFormat(WikiParameters params)
void
endFormat(WikiStyle wikiStyle)
void
endHeader()
void
endInfo()
void
endList()
void
endListItem()
void
endParagraph()
void
endPropertyBlock()
void
endPropertyInline()
void
endQuot()
void
endQuotLine()
protected void
endStyleContainer()
void
endTable()
void
endTableCell()
void
endTableExplicit()
void
endTableRow()
InlineState
getInlineState()
int
getTableCellCounter()
Returns the tableCellCounter.int
getTableRowCounter()
Returns the tableRowCounter.boolean
isInDefinitionList()
Returns the inDefinitionList.boolean
isInDefinitionTerm()
boolean
isInHeader()
Returns the inHeader.boolean
isInInlineProperty()
boolean
isInList()
Returns the inList.boolean
isInQuotation()
boolean
isInTable()
boolean
isInTableCell()
boolean
isInTableRow()
void
onDefinitionListItemSplit()
void
onEmptyLines(int count)
void
onEscape(String str)
void
onExtensionBlock(String extensionName, WikiParameters params)
void
onExtensionInline(String extensionName, WikiParameters params)
void
onFormat(WikiParameters params)
void
onFormat(WikiStyle wikiStyle)
void
onFormat(WikiStyle wikiStyle, boolean forceClose)
void
onHorizontalLine()
void
onHorizontalLine(WikiParameters params)
void
onImage(String ref)
void
onImage(WikiReference ref)
void
onLineBreak()
void
onMacro(String name, WikiParameters params, String content)
Waiting for following events to know if the macro is inline or not.void
onMacro(String macroName, WikiParameters params, String content, boolean inline)
void
onMacroBlock(String macroName, WikiParameters params, String content)
void
onMacroInline(String macroName, WikiParameters params, String content)
void
onNewLine()
void
onQuotLine(int depth)
void
onReference(String ref)
void
onReference(WikiReference ref)
void
onSpace(String str)
void
onSpecialSymbol(String str)
void
onTableCaption(String str)
void
onTableCell(boolean headCell)
void
onTableCell(boolean head, WikiParameters params)
void
onTableRow(WikiParameters params)
Explicitly starts a new table row.void
onVerbatim(String str, boolean inline)
void
onVerbatim(String str, boolean inline, WikiParameters params)
void
onVerbatim(String str, WikiParameters params)
Waiting for following events to know if the verbatim is inline or not.void
onWord(String str)
-
-
-
Field Detail
-
fBlockType
protected int fBlockType
-
fFormat
protected WikiFormat fFormat
-
fHeaderLevel
protected int fHeaderLevel
-
fInfoParams
protected WikiParameters fInfoParams
-
fInfoType
protected String fInfoType
-
fInlineProperty
protected String fInlineProperty
-
fInlineState
protected InlineState fInlineState
-
fListBuilder
protected ListBuilder fListBuilder
-
fListener
protected final IWemListener fListener
-
fListParams
protected WikiParameters fListParams
-
fListItem
protected WikiParameters fListItem
-
fMacroContent
protected String fMacroContent
-
fMacroName
protected String fMacroName
-
fMacroParameters
protected WikiParameters fMacroParameters
-
fNewFormat
protected WikiFormat fNewFormat
-
fParagraphParams
protected WikiParameters fParagraphParams
-
fQuotBuilder
protected ListBuilder fQuotBuilder
-
fQuoteDepth
protected int fQuoteDepth
-
fQuotParams
protected WikiParameters fQuotParams
-
fSectionBuilder
protected SectionBuilder<WikiParameters> fSectionBuilder
-
fTableCellCounter
protected int fTableCellCounter
-
fTableCellParams
protected WikiParameters fTableCellParams
-
fTableHead
protected boolean fTableHead
-
fTableParams
protected WikiParameters fTableParams
-
fTableRowCounter
protected int fTableRowCounter
-
fTableRowParams
protected WikiParameters fTableRowParams
-
fVerbatimContent
protected String fVerbatimContent
-
fVerbatimParameters
protected WikiParameters fVerbatimParameters
-
fFigureCaptionParameters
protected WikiParameters fFigureCaptionParameters
-
-
Constructor Detail
-
InternalWikiScannerContext
public InternalWikiScannerContext(SectionBuilder<WikiParameters> sectionBuilder, IWemListener listener)
-
-
Method Detail
-
beginDocument
public void beginDocument()
- Specified by:
beginDocument
in interfaceIWikiScannerContext
-
beginDocument
public void beginDocument(WikiParameters params)
- Specified by:
beginDocument
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
-
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.
-
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.
-
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
- See Also:
IWikiScannerContext.beginQuotLine(int)
-
beginStyleContainer
protected void beginStyleContainer()
-
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
-
checkStyleOpened
protected void checkStyleOpened()
-
closeBlock
public void closeBlock()
- Specified by:
closeBlock
in interfaceIWikiScannerContext
-
closeFormat
public void closeFormat()
-
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
-
endStyleContainer
protected void endStyleContainer()
-
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
-
endFigure
public void endFigure()
Description copied from interface:IWikiScannerContext
Ends a figure.- Specified by:
endFigure
in interfaceIWikiScannerContext
-
endFigureCaption
public void endFigureCaption()
Description copied from interface:IWikiScannerContext
Ends a figure caption.- Specified by:
endFigureCaption
in interfaceIWikiScannerContext
-
getInlineState
public InlineState getInlineState()
- Specified by:
getInlineState
in interfaceIWikiScannerContext
-
getTableCellCounter
public int getTableCellCounter()
Returns the tableCellCounter.- Specified by:
getTableCellCounter
in interfaceIWikiScannerContext
- Returns:
- the tableCellCounter.
-
getTableRowCounter
public int getTableRowCounter()
Returns the tableRowCounter.- Specified by:
getTableRowCounter
in interfaceIWikiScannerContext
- Returns:
- the tableRowCounter.
-
isInDefinitionList
public boolean isInDefinitionList()
Returns the inDefinitionList.- Specified by:
isInDefinitionList
in interfaceIWikiScannerContext
- Returns:
- the inDefinitionList.
-
isInDefinitionTerm
public boolean isInDefinitionTerm()
- Specified by:
isInDefinitionTerm
in interfaceIWikiScannerContext
-
isInHeader
public boolean isInHeader()
Returns the inHeader.- Specified by:
isInHeader
in interfaceIWikiScannerContext
- Returns:
- the inHeader.
-
isInInlineProperty
public boolean isInInlineProperty()
- Specified by:
isInInlineProperty
in interfaceIWikiScannerContext
-
isInList
public boolean isInList()
Returns the inList.- Specified by:
isInList
in interfaceIWikiScannerContext
- Returns:
- the inList.
-
isInQuotation
public boolean isInQuotation()
-
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
-
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:
WikiScannerContext.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)
Waiting for following events to know if the macro is inline or not.- 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 params)
- 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
-
onVerbatim
public void onVerbatim(String str, boolean inline)
- Specified by:
onVerbatim
in interfaceIWikiScannerContext
- See Also:
WikiScannerContext.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)
Waiting for following events to know if the verbatim is inline or not.- Specified by:
onVerbatim
in interfaceIWikiScannerContext
-
onWord
public void onWord(String str)
- Specified by:
onWord
in interfaceIWikiScannerContext
-
-