ClassificationPlugin is a taxonomy and folksonomy extension for Foswiki that allows you to
manage knowledge assets stored in your wiki. Users can organize their content by filing
topics into categories and by adding offhand tags. Classifying content using categories and tags
are the key factors to foster sustainable knowledge management. This becomes even more important
in a wiki environment where content is created quickly but has to be made available for a longer period of time.
Categories become the backbone spanning all of your content. Content can then be retrieved by browsing
categories narrowing down search results interactively in addition to the normal full-text search.
Key features
Multilevel facet navigation: Wiki content is displayed dynamically by browsing a category tree or
by means of interactive tag clouds.
Managing taxonomies the wiki way: Categories in a taxonomy are first-class wiki citizens that can be created,
renamed, managed and reused as easily as normal wiki topics.
Expressive knowledge models: Categories may form poly-hierarchies
where categories can have multiple parent categories. Wiki documents can be filed into multiple
categories at the same time.
Multidimensional classification: A wiki document may participate in multiple taxonomies and folksonomies
at the same time. Different facets of a document can be separated in a clean way.
Reusing and merging taxonomies: A category tree once defined in one web space can be imported into another
web space effortless. You are free to chose which part of a tree you want to import. Multiple category trees
from a number of web spaces can be merged and reassembled differently in a new web. That way predefined
taxonomies can be managed in a centralized way and reused as needed in different webs. Any change to a taxonomy
in one place will automatically show up in all webs that imported it.
Tagging for corporate intranets: While categories establish a predefined vocabulary, tags are a way to
assign keywords to wiki content in an ad hoc fashion. This completes category knowledge management in
a natural and fruitful way.
Standardized WikiApplicatons: ClassificationPlugin conforms to the WikiWorkbench application
framework that grants for scalable and long-term maintainable WikiApplications.
Extensibility: ClassificationPlugin serves as a building block for further WikiApplications
to be integrated in an overall knowledge management infrastructure. It serves as a middleware for a couple
of higher order applications, like blogging, forums and skills management available separately.
Document types: ClassificationPlugin adds a couple of document types to the standard set that come with
the WikiWorkbench. This gives you maximum flexibility in your knowledge management initiative. Further
document types can be derived with ease. These will automatically participate in the overall knowledge management
framework.
Facetted Search: ClassificationPlugin integrates well into SolrPlugin using tags and
categories to drill down into search results.
Screenshots
Getting started
The easiest way to get started is to create a new web by using the _ClassificationTemplate web as a template. For this
This will create a new web called "Knowledge" which has got all the means preinstalled to create content under the control of the ClassificationPlugin such as:
create new categories on the Knowledge.Category topic
create new categorizable and taggable content either using the Knowledge.ClassifiedTopic form or by hitting the "New" button on the top of each button
Customize the frontpage of the new "Knowledge" web by describing the key content and thematic fields stored in it as well as their use.
Note that for best findability it is recommended to install SolrPlugin along with ClassificationPlugin. SolrPlugin will
be able to automatically generate recommended links to similar content in your "Knowledge" web based on category and tagging meta data. It also lets you
filter and trim down search results selecting tags and categories in use.
For further information please contact foswiki@michaeldaumconsulting.com.
where categories and tags play a gluing role to extract and link together TopicTypes from various domains. In all of these cases custom TopicTypes have been
implemented by extending the types coming with the ClassificationPlugin. By standardizing these applications using the WikiWorkbench approach and using the
ClassificationApp as a building block, developing wiki apps has reached a new level being long-term maintainable, reusable, extensible and flexible as proven
in many real-live corporate intranets.
ClassificationPlugin plays a central role in rolling out a unified knowledge management undertaking that covers very different kinds of content with varying data models.
For more details see the ClassificationApp itself.
category within the hierarchy to start decending down the hierarchy
TopCategory
sort
sort categories on each step of the hierarchy according to the given property; possible values: order, name, title, ordertitle; order refers to the Order formfield of a category that can be used to influence sorting manually; sorting categories by order ignores their lexical order as would be the case using title; sorting by ordertitle first reads the Order property of a category and then falls back to lexical order
format to be used when no category was found in the web
separator
string to be inserted between categories rendered using format
footer
footer string appended to categories
placeholder
string to be used for the $children variable when a category has no children
(empty string)
indent
indentation string used for the $indent variable
' ' (three spaces)
mindepth
minimum depth from which to start rendering categories
0
depth
maximum depth traversing the hierarchy
0 (infinite)
matchattr
which attribute of a category to be used sorting the hierarchy; possible values: name, title
name
matchcase
case sensitivity sorting categories reading matchattr
on
exclude
regular expression to filter out categories reading matchattr
include
regular expression to filter out non-matching categories
filter
filter expression when counting topics subsumed by a category
unique
if switched on a category will only be listed once if found in multiple places within the hierarchy
off
open
list of category names to be considered open and which are traversed further down the hierarchy
by default all categories are considered "open"
hideclosed
if switched on all "closed" categories, i.e. those not listed in open are hidden/not rendered
off
hidenull
if switched on categories with no topis in them will be hidden
off
nrleafs
counts of leaf nodes of a category; this value is normally computed automatically; you might use this parameter when counts for are available using different means; format: cat:count, cat:count, ... ;
(computed automatically)
nrtopics
counts of all topics subsumed by a category; like nrleafs this value is normally compuited automatically; format: cat:count, cat:count, ...
Format strings such as header, footer, and format may contain the following variables:
comma separated list of categories from the top category down to the current one; note that this is a simplified linear representation of the category's location not taking multile parents into account
$call
number of iteration steps performed while expanding the %HIERARCHY macro
$count
number of topics subsumed by a category; see nrtopics above
$cyclic
boolean flag indicating whether the current category is part of a cycle in the hierarchy, which normally indicates a configuration error
$depth
distance of the current category to the top category
$icon
image url of the icon of the current category
$id
id of the category within the hierarchy
$indent
indentation string; this variable expands to the indent parameter times the depth of the current category
$index
index of the current category among its siblings
$isexpanded
boolean flag indicating whether the current category is "open" or "closed"; see the open and hideclosed parameter above
$leafs
number of leaf nodes of the current category; see also the nrleafs parameter
$link
render anchor markup to render a link to the current category; see also $url
$name
topic name of the current category; this value is unique within a hierarchy
$order
Order property of a category
$origweb
originating web where the category was defined; this value might differ from $web in case the hierarchy has been (partially) imported from another web
$parents
comma separated list of parent categories
$redirect
topic that this category redirect to
$siblings
number of sibling nodes
$subcats
number of subordinated categories
$summary
Summary property of a category
$tags
Tag property of a category
$title
TopicTitle property
$topic
topic name of a category (alias for $name)
$trunctitle
title of a category with the parent topic's title removed from the prefix if found
$url
url to the current category
$web
web of the current hierarchy; see also $origweb
ISA
Predicate that checks if a topic is filed in a specific category or one of its subcategories
and either returns 1 or 0.
The result is 1 because CorporateCategory subsumes CustomerCategory even though
it doesn subsume HumanResourcesCategory.
DISTANCE
A function that returns the numerical distance of two categories or topics being located
in a shared hierarchy. This macro reads the distance matrix being calculated internally
that caches the network topology of the hierarchy. Both, the %ISA as well as %SUBSUMES macro
are based on distance properties of the items being compared.
the starting point where to start measuring from; this can be a category or a topic
current base topic
to
the end point to measure the distance; this can be a category or a topic
TopCategory
abs
boolean flag to switch on/off absolute distances; if switched off results can be negative as well given the order endpoints are specified in from and top
off
web
the web that holds the hierarchy to use
current base web
format
format string
$dist
undef
format string that will be returned in case from or to weren't found or aren't connected at all
(empty string)
The distance is defined as follows:
return 0 if from equals to
returns the minimum number of nodes including the to node to get from category from to category to
if from is a topic (not a category) the result is decreased by one
if to is a topic (not a category) the result is increased by one
if from and to are not connected the result is undef
if from is located "higher" in the hierarchy than to the result is negative unless abs has been set to on
When either from or to are topics (not a category) then the set of categories they are filed into
are taken into consideration to compute the minimum distance.
CATINFO
Render category information for a given category or topic.
The macro either operates in "cat mode" or "topic mode" when either the topic or the cat parameter
has been specified. In "cat mode" the macro returns information about this one category. In "topic mode"
it returns information about all categories the topic is filed into.
returns 0 or 1 depending on the category being part of a cycle or not
$icon
url to icon representing the category
$index
running number of all categories being formated
$leafs
number of leaf nodes of the current category
$link
link to the current category as an html anchor
$more
expands to the morechildren parameter in case maxchildren has been reached
$name, $topic
name of the current category
$order
order of the current category
$origweb
original web where the current category has been defined; this might differ from $web when part of the hierarchy including this category has been imported from another web
$parentitles
list of titles of the parent categories
$parentlinks, $parent, $parents
list of links to the parent categories
$parentnames
list of names of the parent categories
$parenturls
list of urls of the parent categories
$summary
summary property of the current category
$tags
tags of the current category
$title
title of the current category
$trunctitle
title of a category with the parent topic's title removed from the prefix if found
$url
url to the currrent category
$web
web where this category is being located (see also $origweb)
TAGINFO
Render tag information for a given category or topic.
format string to render tag information; see the list of possible variables below
$link
separator
format string used to separate list items
=, = (coma + blank)
header
header string prepended to the result
(empty string)
footer
footer string appended to the result
(empty string)
web
web of the topic, note that this might also be specified in the topic parameter
%!BASEWEB%
exclude
regular expressions to filter out tags
include
regular expression that tags must match to be rendered
limit
maximum number of tags to show
skip
number of tags to skip in the list of tags to be rendered
SIMILARTOPICS
Warning: You are strongly encouraged to use %SOLRSIMILAR feature of SolrPlugin
for better performance and flexibility.
Returns a list of topics that are similar to the current one. Similarity between two
topics is a value expressed in percentage, where 100% means that the topics are extremely
similar and 0% means that the compared topics aren't corelated at all. The similarity
is computed on the base of the categorization and tagging information using a
weighted matching coefficient.
Integration into query language
ClassificationPlugins adds three new operators to the query language to make use of category information in wiki applications.
Note however that for now only the %DBQUERY language is supported (see DBCachePlugin).
returns the distance between two categories, a category and a topic or two topics within the context of the same hierarchy; see the above definition of the %DISTANCE macro
Cache maintenance
When you share categories definied in one place in a couple of other webs, those categories aren't updated in all other webs right away.
For example say you defined a taxonomy in some MetaData web and these categories are imported to a couple of other webs Web1, Web2, etc
in an atempt not having to maintain all categories per each web but just in one spot. If you add, rename, modify, delete some of the categories
in the MetaData web then those changes aren't visuble in Web1, Web2 etc. Categories have to be "refreshed" manually. This can either be
done using an URL parameter refresh=cat in the webs, or click on the "Refresh" button on the Category topic of each web. Instead you might
click below button to update all categories of all webs in one go:
Refresh all categories
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab → "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button.
Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the
search results.
You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install
replacing (optional) dependency on WorkflowPlugin with QMPlugin; improved formfields cat and tag; depending on WikiWorkbenchContrib >= 6.00; improved category based webdav browser using WebDAVContrib; new pagination templates to navigate between topics, e.g. blog postings; new BaseTemplates to make features more modular
02 May 2019:
major rewrite based on latest WikiWorkbench framework
23 Jan 2017:
added support for Foswiki:Extensions/LikePlugin; added "Responsible Person" to Category topics; replace css and js inline with proper files created by AttachContentPlugin; hide the sidebar on categories by default; improvements to ControlledTopics and ClassifiedControlledTopics; added quality checks to ClassifiedTopics: missing tags, missing categories, duplicate h1; improved view template for workflow history; removed old IconSet: now using icon formfield of MoreFormfieldsPlugin; improved visualization of workflows using GraphvizPlugin; fixed WebDAV view for categorized content; some fixes for cat and tag formfields; rewrite of core code to be more oo-ish ; new REST hander updateCache to refresh the classification cache occasionally; new notification handler that lets you subscribe to any changes within a category; auto-subscribe ResponsiblePerson to its category: may be switched on/off by AUTOSCUBSCRIBE_RESPONSIBLE_PERSON preference; fixed memory leaks; implemented special ACLs to control edit rights on categories
add support for WikiWorkbench-3.0er new-topic creator added support; integrate workflows into classification framework; improved Open Graph support for better SEO; added multi-lingual support
03 Nov 2014:
don't init core with base-web and base-topic
28 Aug 2014:
new "icon" formfield from MoreFormfieldsPlugin; added virtual filesystem for WebDAVContrib based on categories; new "redirect" feature for Categories to redirect to a portal page representing this category instead of rendering the plain category view
10 Jun 2014:
added options to disable some parts of a category view template; added tool to list uncategorized topics; fully specify all security switches for rest handlers
22 May 2014:
fixes to Category factory; initial work on a category-based virtual filesystem for webdav
23 Apr 2014:
improved topic info layout; added WebTagList; added back Clear button to category editor
04 Apr 2014:
fixed compatibility with foswiki >= 1.2.0; flag rest handlers that don't require authentication
18 Mar 2014:
fixed syntax error in jstree combponent (Foswiki:Main/DanieleGondoni); added sort paramteter to HIERARCHY macro; sorting all categories by title now (was by order before); fixed infinite recursion on malformed category data ; fixed hierarchy not being properly refreshed using the jstree component; fixed jstree component's way of setting the category title for a new node
11 Feb 2014:
implemented sort paramenter for %HIERARCHY; protect against possible infinite recursion on mal-formed category data
13 Nov 2013:
implement drag&drop interface for hierarchy widget