The basics of the extension and miscellaneous information. You can find information about rest handlers and macros at
OntologyPlugin. Information about the included skin are supplied under
OntologySkin.
Usage
This extension can be used to build and maintain ontologies. This enables you to build different kinds of structures between your Foswiki topics. You can use it to classify or tag topics, to define sets of topics, to build parent-child relationships and many other structures. It is extensible.
Installation
Install and enable the
OntologyPlugin via /bin/configure. Manual installation should be possible too. The Extension
OntologyPlugin contains the macro and rest handlers, the skins and the additional topics. So at the moment there are three topics which describe the macros and rest handlers (
OntologyPlugin), the skin (
OntologySkin) and the additional topics (
OntologyContrib) BUT they are installed as ONE extension (
OntologyPlugin). Still thinking about separating them...
Define preferences
To be able to use the
OntologyPlugin you have to set some preferences in
SitePreferences, in the topic
WebPreferences or in a topic; e.g. (remove the #):
- Define the web which contains the Ontologies:
- #Set ONTOLOGIESWEB = Ontologies [TODO]
- Define the web which contains the basic topics needed to use the OntologyPlugin
- Define the names of the formfields which contain title and description of elements. You can e.g. use different form field names for those in individual webs, e.g. "!TopicTitle", "!TopicDescirption" or something like "Titel" and "Beschreibung" (? not really tested). You have
- #Set OTITLE = Title
- #Set ODESCRIPTION = Description
- Define the names of the formfields which contains subject and object of relations (? untested)
- #Set OSUBJECT = Subject
- #Set OOBJECT = Object
Set up some basic groups
Create some groups in
WikiGroups:
TODO: More details needed!
Assign some member to the groups.
Structure of Ontologies
The basic entities of ontologies created with this extension are
elements,
relations,
sets,
relationsets and the
ontologies themselves. All entities build on the existing foswiki entities
topics and
webs. Each ontology can be viewed as a kind of separate semantic store. You could call it a brain
For example there could be following structure:
- Web "Ontologies"
- Web "EN"
- Web "ElementOf"
- Web "Tasks"
- Topic "FirstTask1234567890"
- Topic "SecondTask2345678901"
- ...
- Web "Events"
- Web ...
- Web "RelatedTo"
- Web "Main.WikiGuest"
- Topic "AnEvent3456789012"
- ...
- Web ...
- Web ...
- Web "OtherOntology" ...
Ontologies
An ontology consists of two parts:
- an ontology element
- an ontology web
Relationsets
A relationset is a set of relations. It is defined by creating a relation ElementOf to an element "Relationsets". For each relationset there will be additionally created web in an ontology web with the name of the relationset. Relationsets must be contained in an specific ontology web. A relationset is defined within an ontology and consists of two parts:
- a relationset element
- a relationset web
Sets
An elements is defined as a set by creating a relation ElementOf to an element "Sets". Sets can be contained in any web. A set is defined within an ontology by two things:
- a set element
- a defined relation (usually ElementOf) to the element Sets
Relations
Individual relations are stored within the relationset web in an ontology. A relation is (at least) a triple consisting of a subject, an object and the relation itself. To make each relation unique the time of its creation is added as epoch to its name. Relations must be stored within its relationset web (see below). A relation is defined by a defined topic within the relationset of an ontology
Elements
An element is a topics with an attached
DataForm which at least has the formfields "Title" and "Description". The name of the
DataForm and its additional fields don't matter. Elements can be contained in any web.
Topic templates, data forms and tempate webs
Topic Templates & Forms
Template Webs
Multiple Ontologies or Ontology Mapping
You can create and use one or multiple ontologies. There is a mechanism to provide a mapping between the different semantics of the different ontologies:
- The Meta-Ontology (Ontologies.Meta.Meta): This ontology stores the definition of other ontologies and enables a mapping to other ontologies.
- The OntologyDataForm: In this data form there a defined four properties of an ontology:
Known issues & TODOs
There are a lot of known and unknown bugs in this monstrous extension. Bug reports on
http://foswiki.org/Tasks/WebHome are very welcome! Also, feel free to give feedback and to improve and enhance this extension!
Status: Testing
This extension is still in Proof of Concept or alpha phase. It is available here to enable feedback, testing and further development. There are a lot of smaller and bigger SMELLs and TODOs in the perl, TML and javascript code! It's unfinished, not optimized, most probably contains some unsecure code and is NOT production ready! Nevertheless I use it in my personal private wiki and it helps me sorting my harddrive brain

.
The
OntologyPlugin does not use any real database or some fancy
semantic-rdf-trupel-object-database-thing as a store. It just uses (plain file) topics and webs! While this simplicity has some advantages, it for sure also has some disadvantages. There are faster
semantic web or ontology solutions and a lot of them might scale much better. If you or the users can't stand waiting at least one or two seconds for each page to be returned, or if you prefer a tested and approved extension for your Foswiki you should consider using some other solution:
ClassificationPlugin,
TagMePlugin,
TagsPlugin or
TopicClassificationAddOn are some well written, well tested and well tried solutions! Some fitting non-Foswiki solutions for collaborative ontology development within wikis might be
OntoWiki or Semantic Media Wiki (+). You can find an overview over available tools at
http://semanticweb.org/wiki/Tools.
StrikeOne problems
The Perl code to handle
StrikeOne is commented out, because it doesn't work.
Rest handlers lacking error feedback
The code to return proper errors when calling the rest handlers is unfinished and therefor not working.
Translations
Some parts of the contents and wiki applications are translated. Some not. And I'm sure there are a lot of contents which need some review by someone capable of writing proper english

.
Missing features in RELATIONSETS and ONTOLOGIES macros
At the moment the ontology mapping has to be done via nesting of the macros. Would be nice to support it directly via the RELATIONSETS and ONTOLOGIES macros. Something like a includesames="on" parameter.
Lazy Loading of JS in TABs and SubTABs
When selecting
CreateTabRelationTab in
ActionMenu: some JS doesn't get loaded which leads to some functionality missing: List for selected elements
Weiteres Testen:
Make usage of autocomplete faster and less resource intensiv.
- select-auswahl (webs) wie beim absenden eines Forms per URL übergeben?
- ja zwei sections von ctrt_subjectselector und von ctrt_objectselector machen (bzgl. ?section=ctrtelement):
- eine für thewebs=all
- eine für thewebs=Opps
- bei Auswahl einer der beiden Varianten muss dann jeweils die andere Variante per JS ausgeblendet werden
- optionally reduce search to the actual web
- optionally create two separate tabs: Relations (intra-web) and Relations (all)
Lazy Loading of contents of the SideBar
Visualisierung der Relationen
ViewTabVisualisationTab erstellen zur Darstellung aller Relationen und der darüber verbundenen Elemente:
- Strukturierung nach Art der Relation z.B.:
- evtl. Alle Elemente, die über eine Relation Element_Von verbunden sind in einem Zweig zu entsprechendem "Kasten" zeigen; analog mit den anderen
- oder: Obermengen oberhalb, Unterelemente unterhalb, ansonsten: eingehende Relationen links, ausgehende Relationen rechts, letztere jeweils in eigenem "Kasten" mit Relationsbezeichnung
- evtl. den Visualisierungs-Tab als Hautdarstellung wählen und den Topic-Text als "Anmerkungen" zu diesem Knoten