org.ceryle.wiki.plugin.assertion
Class TopicMapPlugin
java.lang.Object
org.ceryle.wiki.plugin.assertion.TopicMapPlugin
- All Implemented Interfaces:
- WikiPlugin, PluginConstants
- Direct Known Subclasses:
- TopicMap
public class TopicMapPlugin
- extends Object
- implements WikiPlugin, PluginConstants
A query plugin that uses various methods from the
WikiMapManager
to list the entire set of wiki Assertions, or applies
one or more filters upon that set. The output can either
mimic the original Assertions or be formatted as a bullet
or numbered list, count only, etc.
The difference between this plugin and
AssertedPlugin
is that this class does post-query filtering on the entire
set of Assertions (permitting regular expression matching
on parameters), whereas the latter performs a query based
on exact string matches of the parameters.
This currently uses native TM4J objects rather than TMAPI.
Parameters
- page = 'pagename'.
An optional parameter, filtering on page name when present.
- subject = 'name'.
An optional parameter, filtering on subject when present.
- predicate = 'name'.
An optional parameter, filtering on predicate when present.
- object = 'name'.
An optional parameter, filtering on object when present.
- output = 'value'.
An optional parameter. One of 'none', 'count', 'list', 'bullet', 'number',
'space', 'comma', or 'table'. The result is a list of wiki page names;
this alters the output presentation (a description of each can be found
at
PluginTextUtils). In the absence
of a parameter value the output will resemble a list of the original
assertions.
If following any parameters an assertion expression is included, it will
override the subject, predicate and object parameters (i.e., all three are
ignored). The wild card "[*]" will match any page. E.g.,
"[*] [*] [*]" will match all pages — the same as providing
no parameters or expression. "[*] [IsA] [Book]" will match all
pages asserted as being a Book.
Example
The first example lists all Assertions, the second applies the specific
filter, returning all wiki pages that have been asserted as instances of
the class "Book".
[{Assertions}]
[{Assertions predicate='IsA' object='[Book]' }]
- Author:
- Murray Altheim
| Fields inherited from interface org.ceryle.wiki.plugin.util.PluginConstants |
ACL, AOP, APOS_ENT, ASTERISK, BCL, BOP, BR, CAPCL, CAPOP, CLATT, COLON, COMMA, DIV_class, DIV_style, DIVCL, DOT, EQ, EQQUO, EQSQUO, FALSE, FORMCL, FORMOP, GET, ICL, INPUTOP, IOP, LABELCL, LABELFOR, LABELOP, LCURL, LICL, LIOP, LPAR, LSBR, MT, NBSP, NL, OLCL, OLOP, P_class, PCL, PLUGCL, PLUGO, POP, POST, QUO, QUOCL, QUOETCL, RCURL, RPAR, RSBR, SEMI, SP, SPAN_class, SPANCL, SPANOP, SQUO, TABLECL, TABLEOP, TDCL, TDOP, THCL, THOP, TRCL, TROP, TRUE, TTCL, TTOP, ULCL, ULOP, UNDER |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sortOnPageName
public static boolean sortOnPageName
- When true, the output will be sorted on page name, otherwise
using the ordering of the Assertion's own Comparator.
PARAM_PAGE
public static final String PARAM_PAGE
- See Also:
- Constant Field Values
PARAM_SUBJECT
public static final String PARAM_SUBJECT
- See Also:
- Constant Field Values
PARAM_PREDICATE
public static final String PARAM_PREDICATE
- See Also:
- Constant Field Values
PARAM_OBJECT
public static final String PARAM_OBJECT
- See Also:
- Constant Field Values
PARAM_DIR
public static final String PARAM_DIR
- See Also:
- Constant Field Values
PARAM_OUTPUT
public static final String PARAM_OUTPUT
- See Also:
- Constant Field Values
TopicMapPlugin
public TopicMapPlugin()
execute
public String execute(WikiContext context,
Map params)
- Specified by:
execute in interface WikiPlugin
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.