@Persistent public class WikiString extends Object implements IWikiString
IWikiString
that parses the original text (in
wiki markup language) on demand instead of storing the parsed information
in the database. Note that this used to be different prior to JWKTL 0.15.4.Modifier and Type | Field and Description |
---|---|
protected static Pattern |
COMMENT_PATTERN |
protected static Pattern |
HTML_PATTERN |
protected static Pattern |
QUOTES_PATTERN |
protected static Pattern |
REFERENCES_PATTERN |
protected static Pattern |
TEMPLATE_PATTERN |
protected String |
text |
protected static Pattern |
WHITESPACE_PATTERN |
protected static Pattern |
WIKILINK_PATTERN |
Constructor and Description |
---|
WikiString()
Create a new, empty wiki string.
|
WikiString(String text)
Create a new wiki string for the given wiki markup text.
|
Modifier and Type | Method and Description |
---|---|
String |
getPlainText()
Parses the original text to filter out all wiki markup and thus
returns a human-readable version of the text.
|
String |
getText()
Returns the original text including all wiki markup.
|
String |
getTextIncludingWikiMarkup() |
List<String> |
getWikiLinks()
Returns a list of wiki-internal links.
|
static String |
makePlainText(String wikiText)
Transforms the given wiki markup text into a plain text version.
|
static String |
removeWikiLinks(String text) |
void |
setText(String text)
Assign the given text as the new wiki markup text.
|
String |
toString() |
protected String text
protected static final Pattern COMMENT_PATTERN
protected static final Pattern QUOTES_PATTERN
protected static final Pattern WIKILINK_PATTERN
protected static final Pattern TEMPLATE_PATTERN
protected static final Pattern REFERENCES_PATTERN
protected static final Pattern HTML_PATTERN
protected static final Pattern WHITESPACE_PATTERN
public WikiString()
public WikiString(String text)
public String getText()
IWikiString
getText
in interface IWikiString
public void setText(String text)
public String getTextIncludingWikiMarkup()
getText().
public String getPlainText()
IWikiString
getPlainText
in interface IWikiString
public List<String> getWikiLinks()
IWikiString
getWikiLinks
in interface IWikiString
public static String makePlainText(String wikiText)
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.