|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.bliki.wiki.filter.WikipediaScanner
info.bliki.wiki.filter.AbstractParser
public abstract class AbstractParser
Field Summary | |
---|---|
protected char |
fCurrentCharacter
The current scanned character |
protected int |
fCurrentPosition
The current offset in the character source array |
protected boolean |
fWhiteStart
|
protected int |
fWhiteStartPosition
|
Fields inherited from class info.bliki.wiki.filter.WikipediaScanner |
---|
EOF, fScannerPosition, fSource, fStringSource, fWikiModel, TAG_NAME |
Constructor Summary | |
---|---|
AbstractParser(java.lang.String stringSource)
|
Method Summary | |
---|---|
protected boolean |
findWikiLinkEnd()
Read the characters until the end position of the current wiki link is found |
static java.lang.String |
getRedirectedTemplateContent(IWikiModel wikiModel,
java.lang.String redirectedLink,
java.util.Map<java.lang.String,java.lang.String> templateParameters)
|
protected boolean |
isEmptyLine(int diff)
|
protected boolean |
parsePHPBBCode(java.lang.String name,
java.lang.StringBuilder bbCode)
|
TagStack |
parseRecursiveInternal(IWikiModel wikiModel,
boolean createOnlyLocalStack,
boolean noTOC)
|
static java.lang.String |
parseRedirect(java.lang.String rawWikiText,
IWikiModel wikiModel)
Check the text for a #REDIRECT [[...]] |
protected boolean |
readUntil(java.lang.String untilString)
Read the characters until the given string is found |
protected boolean |
readUntilChar(char testedChar)
Read until character is found |
protected boolean |
readUntilCharOrStopAtEOL(char testedChar)
Read until character is found or stop at end-of-line |
protected boolean |
readUntilEOL()
Read until the end-of-line characters (i.e. |
protected boolean |
readUntilIgnoreCase(java.lang.String startString,
java.lang.String endString)
Read the characters until the concatenated start and end substring is found. |
protected int |
readWhitespaceUntilEndOfLine(int diff)
|
protected int |
readWhitespaceUntilStartOfLine(int diff)
|
abstract void |
runParser()
|
abstract void |
setNoToC(boolean noToC)
|
Methods inherited from class info.bliki.wiki.filter.WikipediaScanner |
---|
findNestedEnd, findNestedParamEnd, findNestedTemplateEnd, getPosition, indexEndOfComment, indexEndOfNowiki, indexEndOfTable, indexOfAttributes, indexOfUntilNoLetter, makeTag, nextNewline, parseAttributes, parseTag, readSpecialWikiTags, readUntilIgnoreCase, replaceTemplateParameters, scanWhiteSpace, setModel, setPosition, splitByPipe, splitByPipe, startsWith, tracTable, wpList, wpTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected char fCurrentCharacter
protected int fCurrentPosition
protected boolean fWhiteStart
protected int fWhiteStartPosition
Constructor Detail |
---|
public AbstractParser(java.lang.String stringSource)
Method Detail |
---|
protected final boolean readUntil(java.lang.String untilString)
untilString
-
protected final boolean readUntilIgnoreCase(java.lang.String startString, java.lang.String endString)
startString
- the start string which should be searched in exact case modeendString
- the end string which should be searched in ignore case mode
protected final boolean readUntilChar(char testedChar)
testedChar
- search the next position of this char
true
if the tested character can be foundprotected final boolean readUntilCharOrStopAtEOL(char testedChar)
testedChar
- search the next position of this char
true
if the tested character can be foundprotected final boolean readUntilEOL()
fName
-
true
if the end-of-line characters or the end of the
string is reachedprotected boolean isEmptyLine(int diff)
protected int readWhitespaceUntilEndOfLine(int diff)
protected int readWhitespaceUntilStartOfLine(int diff)
protected boolean parsePHPBBCode(java.lang.String name, java.lang.StringBuilder bbCode)
public TagStack parseRecursiveInternal(IWikiModel wikiModel, boolean createOnlyLocalStack, boolean noTOC)
protected final boolean findWikiLinkEnd()
public abstract void setNoToC(boolean noToC)
public abstract void runParser()
public static java.lang.String getRedirectedTemplateContent(IWikiModel wikiModel, java.lang.String redirectedLink, java.util.Map<java.lang.String,java.lang.String> templateParameters)
public static java.lang.String parseRedirect(java.lang.String rawWikiText, IWikiModel wikiModel)
#REDIRECT [[...]]
or
#redirect [[...]]
link
rawWikiText
- the wiki textwikiModel
-
null
if a redirect was found and further parsing
should be canceled according to the model.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |