Package org.getalp.dbnary.wiki
Class WikiText
- java.lang.Object
-
- org.getalp.dbnary.wiki.WikiText
-
public class WikiText extends Object
Created by serasset on 24/01/16.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WikiText.ExternalLink
class
WikiText.Heading
class
WikiText.HTMLComment
class
WikiText.Indentation
class
WikiText.IndentedItem
class
WikiText.InternalLink
class
WikiText.Item
static class
WikiText.LevelBasedWikiSectionsIterator
class
WikiText.Link
class
WikiText.ListItem
class
WikiText.NoWiki
class
WikiText.NumberedListItem
class
WikiText.Segment
A segment of text identifies a substring whose first character is at position start and last character is at position end-1;class
WikiText.Template
class
WikiText.Text
class
WikiText.Token
class
WikiText.WikiContent
Upper element containing text/links/templates and comments interleavedclass
WikiText.WikiDocument
A wiki content structured as a document, i.e.class
WikiText.WikiSection
-
Field Summary
Fields Modifier and Type Field Description String
sourceContent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WikiText.WikiDocument
asStructuredDocument()
WikiText.WikiContent
content()
WikiText.Text
endOfContent()
WikiEventsSequence
filteredTokens(WikiEventFilter filter)
int
getEndOffset()
int
getStartOffset()
WikiEventsSequence
headers()
WikiEventsSequence
headers(int level)
WikiEventsSequence
headersMatching(int level, Pattern pattern)
WikiEventsSequence
headersMatching(Pattern pattern)
WikiEventsSequence
links()
WikiSectionsSequence
sections(int level)
WikiEventsSequence
templates()
WikiEventsSequence
templatesOnUpperLevel()
List<WikiText.Token>
tokens()
returns all tokens in the wikiText, that is all special media wiki constructs, along with special Text tokens containing textual content.List<WikiText.Token>
tokensWithHtmlComments()
returns all tokens in the wikiText, that is all special media wiki constructs, along with special Text tokens containing textual content.String
toString()
List<WikiText.Token>
wikiTokens()
returns all wikiTokens in the wikiText, that is all special media wiki constructs, excluding html comments.List<WikiText.Token>
wikiTokensWithHtmlComments()
returns all wikiTokens in the wikiText, that is all special media wiki constructs, including html comments.
-
-
-
Field Detail
-
sourceContent
public final String sourceContent
-
-
Method Detail
-
getStartOffset
public int getStartOffset()
-
getEndOffset
public int getEndOffset()
-
content
public WikiText.WikiContent content()
-
wikiTokens
public List<WikiText.Token> wikiTokens()
returns all wikiTokens in the wikiText, that is all special media wiki constructs, excluding html comments.- Returns:
- a sequence of Tokens
-
wikiTokensWithHtmlComments
public List<WikiText.Token> wikiTokensWithHtmlComments()
returns all wikiTokens in the wikiText, that is all special media wiki constructs, including html comments.- Returns:
- a sequence of Tokens
-
tokens
public List<WikiText.Token> tokens()
returns all tokens in the wikiText, that is all special media wiki constructs, along with special Text tokens containing textual content.- Returns:
- a sequence of Tokens (including Text tokens)
-
tokensWithHtmlComments
public List<WikiText.Token> tokensWithHtmlComments()
returns all tokens in the wikiText, that is all special media wiki constructs, along with special Text tokens containing textual content. The List will include Html Comments- Returns:
- a sequence of Tokens (including Text tokens)
-
endOfContent
public WikiText.Text endOfContent()
-
filteredTokens
public WikiEventsSequence filteredTokens(WikiEventFilter filter)
-
links
public WikiEventsSequence links()
-
templatesOnUpperLevel
public WikiEventsSequence templatesOnUpperLevel()
-
templates
public WikiEventsSequence templates()
-
headers
public WikiEventsSequence headers()
-
headers
public WikiEventsSequence headers(int level)
-
headersMatching
public WikiEventsSequence headersMatching(Pattern pattern)
-
headersMatching
public WikiEventsSequence headersMatching(int level, Pattern pattern)
-
sections
public WikiSectionsSequence sections(int level)
-
asStructuredDocument
public WikiText.WikiDocument asStructuredDocument()
-
-