Skip to main content

Create Custom Relations

Abstract

Create Custom Relations

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

Prerequisites for Creating a Custom Relation
How to Create a Custom Relation in Your Custom Ontology
  1. Open the Ontology Management by clicking its icon in the toolbar.

  2. Select the Custom Ontologies node and activate the desired ontology's node. Expand it and activate the Relations node.

  3. In the Details View on the right, click Create Relation.

    • Alternatively, double click or right-click the Relations node, select Create Relation from the context-menu.

    • You can also use the Add icon in the Statistics section of the ontology's Details View.

      23899668.png
  4. The Add Relation dialogue opens.

    • In the Add Relation dialogue there are three different relationship types available you can define in the relation type drop down.

    • Per default Directed is selected which will create a directed relation between two resources, which means a relation in one direction from the subject to the object.

      23899674.png
  5. Enter the name of the relation. (mandatory)

    • The URI 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. Double-click into the URI field to make it active and define a specific URI if needed.

  6. The 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 direct 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) as value allows you to use the relation, regardless of the classes assigned to the resources, between which you create the relation.

    • You have to click Add to confirm a selection.

  7. Click Save to confirm your changes.

The following topics provide details on these relation types:

Optional Settings for Custom Relations
  • Unique Use: if you want this relation to only be used once between two resources, check the box.

  • Is a Sub-Property: if you want this relation to be a sub-property of another, check the box

    A new drop down will then enable you to choose the desired parent relation from the relations in the ontology and all SKOS relations. You have to click Add to make a selection.

    23899675.png
  • To add a description for the new relation, select the Description tab (1).

    Depending on the language settings for the project, select the language of the description from the drop down.

    23899673.png

You can also add custom relations to custom schemes. Details find here: Add Classes, Relations and Attributes to Your Custom Scheme

23898884.pngBelow you can find the owl statements created for a relation. As you can see a directed relation is defined as an owl:ObjectProperty and rdfs:label is used for the name. The rdfs:domain and rdfs:range are used to define the respective class restrictions. Finally rdfs:comment is used for the description. To indicated Unique Use the relation in addition becomes a owl:FunctionalProperty. The definition of a sub-property is done via the rdfs:subPropertyOf relation.

<http://doku.poolparty.biz/cocktail-ontology/Uses-Garnish> a owl:ObjectProperty;
  dcterms:created "2019-02-03T12:41:42.037Z"^^xsd:dateTime;
  dcterms:creator <http://resource.semantic-web.at/user/admin>;
  rdfs:domain <http://doku.poolparty.biz/cocktail-ontology/Cocktail>;
  rdfs:label "Uses Garnish"@en;
  rdsf:comment "Directed relation between a Cocktail and it's Garnish."@en
  rdfs:range <http://doku.poolparty.biz/cocktail-ontology/Garnish> .

Tip

If you would like to learn more about this topic, please watch this PoolParty Academy Tutorial video:

2.9 Extending Your Taxonomy With Custom Schemes & Ontologies

When the video is not available, you can sign up to the PoolParty Academy