Skip to main content

Create Custom Relations

Abstract

PoolParty allows you to add new relations to your custom ontology. Learn how with this step-by-step guide.

You can add a custom relation to a custom ontology. For more information on how to create a custom ontology, refer to Create a Custom Ontology.

Note

You can also add custom relations to custom schemes. For more information, refer to Add Classes, Relations and Attributes to Your Custom Scheme

Procedure. Create Custom Relations from the Hierarchy Tree – Option 1
  1. Open the Ontology Management by clicking its icon in the toolbar.

  2. Go to Custom Ontologies and right click the node representing the custom ontology to which you want to add a new relation.

  3. Select New Relation.

    805-create-custom-relations.png

    The New Relation dialogue opens

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings in the New Relation Dialogue Box section below.

  5. Optional: Specify optional settings. For more information, refer to the Optional Settings in the New Relation Dialogue Box section below.

  6. Confirm with Create.

Procedure. Create Custom Relations from the Hierarchy Tree – Option 2
  1. Open the Ontology Management by clicking its icon in the toolbar.

  2. Go to Custom Ontologies and expand the node representing the custom ontology to which you want to add a new relation.

  3. Right-click Relations.

  4. Select New Relation.

    805-Create-Custom-Relations-from-the-Hierarchy-Tree-_-Option-2.png

    Tip

    Alternatively, you can access this option by double clicking the Relations node.

    The New Relation dialogue opens

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings in the New Relation Dialogue Box section below.

  6. Optional: Specify optional settings. For more information, refer to the Optional Settings in the New Relation Dialogue Box section below.

  7. Confirm with Create.

Procedure. Create Custom Relations from the Ontology Details View
  1. Open the Ontology Management by clicking its icon in the toolbar.

  2. Go to Custom Ontologies and select the node representing the custom ontology to which you want to add a new relation.

  3. Click Add next to Relations in the ontology Details View.

    805-Create-Custom-Relations-from-the-Ontology-Details-View.png

    The New Relation dialogue opens

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings in the New Relation Dialogue Box section below.

  5. Optional: Specify optional settings. For more information, refer to the Optional Settings in the New Relation Dialogue Box section below.

  6. Confirm with Create.

Procedure. Create Custom Relations from the Relations List
  1. Open the Ontology Management by clicking its icon in the toolbar.

  2. Go to Custom Ontologies and expand the node representing the custom ontology to which you want to add a new relation.

  3. Select the Relations node.

  4. Select New Relation.

    805-Create-Custom-Relations-from-the-Relations-List.png

    The New Relation dialogue opens

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings in the New Relation Dialogue Box section below.

  6. Optional: Specify optional settings. For more information, refer to the Optional Settings in the New Relation Dialogue Box section below.

  7. Confirm with Create.

. Mandatory Settings in the New Relation Dialogue Box
create-custom-relations2-_2_.png
  • Relation name (1)

    The specified name without spaces gets appended to the base URI and scheme identifier forming a relation URI. For more information on how to define the URI pattern, refer to Define the URI Pattern for a Custom Ontology or Custom Scheme.

  • Relation type (2)

    Per default, the Directed relation is selected. A directed relation allows you to define a relationship between two concepts where the property is only defined in one direction similar to skos:inScheme.

    The Symmetric relation expresses a relationship between two concepts where the same property is used in both directions, similar to the skos:related property.

    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 properties.

  • Domain and range classes (3)

    Specify the domain and range classes using the the drop downs to the left and to the right of the relation type.

    Note

    For a Symmetric relation, only the domain class selection is active.

    You can select from all classes available in the ontology. In addition, the SKOS classes 'Concept' and 'Concept Scheme' are available.

    Selecting No restriction (default) allows you to use the relation regardless of the classes assigned to the resources between which you create the relation.

  • Inverse relation name (4)

    This field is available only for inverse relations.

  • Language (5)

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

. Optional Settings in the New Relation Dialogue Box
create-custom-relations2-_3_.png
  • Select Edit to edit the pre-filled relation URI (1).

  • Unique Use: if you want this relation to only be used once between two resources, check the box (2).

  • Is a Sub-Property: if you want this relation to be a sub-property of another, choose the desired parent relation from the relations in the ontology and all SKOS relations. (3).

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

Example OWL Statements

Below you can find the OWL statements created for a directed 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 rdfs:subPropertyOf relation defines the sub-property.

<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> .

Below 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:inverseOf relation. All other definitions are the same as for the 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> .

Below you can find the owl statements created for a symmetric relation. As you can see, symmetric relations are created as owl:SymmetricProperty. All other definitions are the same as for the other relations.

<http://doku.poolparty.biz/cocktail-ontology/variantOf> a owl:SymmetricProperty;
  rdfs:domain <http://doku.poolparty.biz/cocktail-ontology/Cocktail>;
  rdfs:label "variantOf";
  rdfs:range <http://doku.poolparty.biz/cocktail-ontology/Cocktail> .

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