org.ceryle.wiki.plugin.assertion
Class TopicMapPlugin

java.lang.Object
  extended by 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

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

Field Summary
static String PARAM_DIR
           
static String PARAM_OBJECT
           
static String PARAM_OUTPUT
           
static String PARAM_PAGE
           
static String PARAM_PREDICATE
           
static String PARAM_SUBJECT
           
static boolean sortOnPageName
          When true, the output will be sorted on page name, otherwise using the ordering of the Assertion's own Comparator.
 
Fields inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin
CORE_PLUGINS_RESOURCEBUNDLE
 
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
 
Constructor Summary
TopicMapPlugin()
           
 
Method Summary
 String execute(WikiContext context, Map params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

TopicMapPlugin

public TopicMapPlugin()
Method Detail

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.