info.bliki.wiki.template
Class Time
java.lang.Object
info.bliki.wiki.template.AbstractTemplateFunction
info.bliki.wiki.template.Time
- All Implemented Interfaces:
- ITemplateFunction
public class Time
- extends AbstractTemplateFunction
A template parser function for {{ #time: ... }}
syntax.
Supporting more control flags, but still not complete though.
See
Mediwiki's Help:Extension:ParserFunctions - #time
Constructor Summary |
Time()
Creates a new parser for the #time template function. |
Method Summary |
java.lang.String |
parseFunction(java.util.List<java.lang.String> list,
IWikiModel model,
char[] src,
int beginIndex,
int endIndex)
Parse a template function (like for example {{ #if: ... }} )
The result is also a text string in Wikipedia syntax notation which will be
parsed again (recursively) in the TemplateParser step. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONST
public static final ITemplateFunction CONST
- Static instance of this template function parser.
FORMAT_WIKI_TO_JAVA
protected static java.util.Map<java.lang.String,java.lang.String> FORMAT_WIKI_TO_JAVA
RFC822DATEFORMAT
protected final java.text.SimpleDateFormat RFC822DATEFORMAT
Time
public Time()
- Creates a new parser for the #time template function.
parseFunction
public java.lang.String parseFunction(java.util.List<java.lang.String> list,
IWikiModel model,
char[] src,
int beginIndex,
int endIndex)
- Description copied from interface:
ITemplateFunction
- Parse a template function (like for example
{{ #if: ... }}
)
The result is also a text string in Wikipedia syntax notation which will be
parsed again (recursively) in the TemplateParser step.
- Specified by:
parseFunction
in interface ITemplateFunction
- Specified by:
parseFunction
in class AbstractTemplateFunction
- Parameters:
list
- the parser function arguments (extracted from the wiki text by
splitting the string at the pipe symbol ´|´)model
- the wiki modelsrc
- the array of the current Wikipedia source textbeginIndex
- the beginning index, inclusive.endIndex
- the ending index, exclusive.
- Returns:
- the result string of this template function or
null
if
the parsing fails or isn't valid - See Also:
TemplateParser#parseTemplate(StringBuffer)
Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.