|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tudarmstadt.ukp.jwktl.api.util.TemplateParser
public class TemplateParser
Static helper class for parsing wiki markup text that contains templates.
The template parser identifies templates in the given wiki text and
replaces them as specified by a TemplateParser.ITemplateHandler
.
Nested Class Summary | |
---|---|
static class |
TemplateParser.EtymologyTemplateHandler
Implementation of an TemplateParser.ITemplateHandler for parsing etymology
information in Wiktionary. |
static interface |
TemplateParser.ITemplateHandler
Interface that is expected by the TemplateParser . |
static class |
TemplateParser.Template
A template is a reusable pattern that can be added to any wiki page. |
Constructor Summary | |
---|---|
TemplateParser()
|
Method Summary | |
---|---|
static String |
parse(String wikiText,
TemplateParser.ITemplateHandler handler)
Parse the given wiki text and substitute each template in the text using the specified template handler. |
static TemplateParser.Template |
parseTemplate(String templateText)
Creates a TemplateParser.Template from the given text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateParser()
Method Detail |
---|
public static String parse(String wikiText, TemplateParser.ITemplateHandler handler)
public static TemplateParser.Template parseTemplate(String templateText)
TemplateParser.Template
from the given text. That is, the
template's name and parameters are extracted from the text and
stored in the template instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |