Skip to main content

Create Inverse Relations

Abstract

Create Inverse Relations

This section contains a short guide on how to create an inverse relation in a custom ontology.

The Inverse relation expresses a relationship between two concepts where the different properties are used in both directions, similar to the skos:broader and skos:narroewer property.

Creating an inverse relations follows the process outlined here: Create Custom Relations

In the Add Relations dialogue once you have selected Inverse in the relation type drop down (1), an additional row for the definition of the second, inverse relation becomes visible.

You have the following options:

Create the First Part of the Inverse Relation
  • Enter the name of the first relation. (mandatory)

  • The URI for the first relation will be filled with the URI pattern defined creating your custom ontology. The pattern is greyed out per default and will be extended by the specified name which will be used without spaces. You can double-click into the URI field to make it active and define a specific URI if needed.

  • In drop downs, to the left and the right of the relation type selection drop down, represent Domain and Range, respectively. You can select classes that have to be Domain and Range for the defined inverse relation.

  • You can select from all classes available in the ontology.

  • In addition the SKOS classes 'Concept' and 'Concept Scheme' are available.

  • Finally selecting 'No restriction' (default) allows you to use the relation independent from the classes assigned to the resources between which the relation is created.

  • You have to click Add to make a selection.

Create the Second Part of the Inverse Relation
  • Enter the name for the second relation. (mandatory)

  • The URI for the second relation will be filled with the URI pattern defined creating your custom ontology. The pattern is greyed out per default and will be extended by the specified name which will be used without spaces. You can double-click into the URI field to make it active and define a specific URI if needed.

The example below allows to create an inverse relation between two resources, where one has to have the class 'Cocktail' and the other has to have the class 'Ingredients' assigned. That way you can specify all ingredients of a cocktail.

23899686.png

23898884.pngBelow you can find the owl statements created for an inverse relation. As you can see inverse relations are created as owl:ObjectProperty. The inverse relation is indicated by the owl:inverse relation. Besides that all definitions are equal to the creation of all other relations.

<http://doku.poolparty.biz/cocktail-ontology/hasIngredient> a owl:ObjectProperty;
  rdfs:domain <http://doku.poolparty.biz/cocktail-ontology/Cocktail>;
  rdfs:label "hasIngredient"@en;
  rdfs:range <http://doku.poolparty.biz/cocktail-ontology/Ingredients>;
  owl:inverseOf <http://doku.poolparty.biz/cocktail-ontology/ingredientOf> .


<http://doku.poolparty.biz/cocktail-ontology/ingredientOf> a owl:ObjectProperty;
  rdfs:domain <http://doku.poolparty.biz/cocktail-ontology/Ingredients>;
  rdfs:label "ingredientOf"@en;
  rdfs:range <http://doku.poolparty.biz/cocktail-ontology/Cocktail>;
  owl:inverseOf <http://doku.poolparty.biz/cocktail-ontology/hasIngredient> .