An ontology is created in a similar way as a d3web knowledge base using the ontology markup.

  @uses: myPackageName

For the name myPackageName please use the name of the package that you used for the ontology definitions.

Creating Ontology Entities within the Local Namespace#

Ontologies in KnowWE are based on the RDF standard ( In RDF every resource is identified by a full qualified URI name. For brevity, KnowWE uses shortened identifier such as rdf for The resource therefore is called rdf:type in KnowWE. Ontology entities newly created within the wiki are created in the ontology repository under the so-called local namespace, that is the URL referring to the wiki installation URL. On the wiki pages, the local namespace (lns) is ommitted.


The following example defines the package name myPackageName and creates a new ontology using this package.

@uses: myPackageName

%%Package myPackageName

:System rdf:type owl:Class .

:KnowWE rdf:type :System ; 
    rdfs:label "KnowWE Wiki" .

On the same page, the Turtle markup is used to define an owl:Class System (in the local namespace) and an instance of System with the name KnowWE. Additionally, the label "KnowWE Wiki" is defined.

Importing existing ontologies into a KnowWE ontology#

By attaching an ontology-file to this page (containing the ontology in any standard ontology format) an ontology can be imported into the KnowWE ontology repository as follows:

@import: movie-ontology.owl

Note: For this example a file named movie-ontology.owl needs to be attached to this page!

See Also #

The following markups can be used to create ontology entities (under local namespace if the namespace prefix is omitted):

Beside the local namespace, also other namespaces may freely be defined using the Namespace markup. For sparql queries in the SPARQL markup, always a namespace needs to be defined (including lns: for the local namespace) for triple patterns of a query.

Add new attachment

Only authorized users are allowed to upload new attachments.
This page (revision-24) was last changed on 10-Feb-2017 10:50 by Albrecht Striffler