part of UsingNepomuk

Using 3rd Party Ontologies with NEPOMUK

This tutorial is relevant if you want to use 3rd Party ontologies in NEPOMUK. Note that this feature is still a bit experimental in NEPOMUK but should work sooner or later (it did work in predecessor projects, just a matter of our programmers fixing bugs, also SebastianMehrbreier is working on a nice group ontology feature).

For this tutorial, we assume you are receiving the "teaching ontology" by Knud Möller (teaching.turtle download link). The teaching ontology must be in a single RDF file stored on a webserver or on the local filesystem, depending on the way you import it.

There are two ways to add an ontology:

  • using PSEW
  • using the web interface

Adding an ontology using PSEW

You can only add web-hosted ontologies using the GUI.

open the view "ontology viewer". go to the menu:

  • menu - window - views - other. in the "Show View" window scroll down to the category "PIMO" and select the "Ontology Viewer" or search for "ontology". Click on the "Ontology Viewer" and this should add a new view to your PSEW window. The view should have a heading "Ontology Viewer" and contain a list of URIs.
  • In the view, there are four buttons on the top. press the "add ontology +" button.
  • Enter the URI of the ontology, in our example: http://dev.nepomuk.semanticdesktop.org/repos/trunk/testdata/exampleontologies/teaching.turtle. Select the serialization language, in our case "application/x-turtle"
  • press "ok", it should load the ontology.

This can fail on various stages. if it does, fall back to the web interface:

Adding an ontology using the web interface

Open the RdfRepository's web interface.

  • click  repository main or open this using your own ways
  • scroll down to Add graph from a URL and enter
    • URL to add: http://dev.nepomuk.semanticdesktop.org/repos/trunk/testdata/exampleontologies/teaching.turtle
    • base uri: (empty)
    • RDF format: turtle
    • Named graph (opt): http://dev.nepomuk.semanticdesktop.org/repos/trunk/testdata/exampleontologies/teaching.turtle

press "add web document". This works the same way using the Add graph from a file option

to remove the ontology again, remove the named graph. You can switch to the named graph by clicking through the RdfRepository web interface, or use a direct link. For the example ontology.

After adding the ontology, press reload in the gui, the ontology classes should be there. Note that this overrides the GroupOntology features, but works fine for most cases.