Skip to main content

Create a Custom Ontology

Abstract

Create a Custom Ontology

  1. Open the Ontology Management.

    Create-a-Custom-Ontology.png
  2. Bring up the Edit Ontology dialogue with one of the following actions:

    1. Right click the Ontologies node and select New Custom Ontology.

      Create-a-Custom-Ontology---2a.png
    2. Right click the Custom Ontologies node and select New Custom Ontology.

    3. Click the Custom Ontologies node and select New Custom Ontology.

      Create-a-Custom-Ontology2bc.png

    The New Custom Ontology dialogue opens with the Metadata tab activated by default.

  3. Enter the title of your ontology.

  4. Optional: Enter the description.

  5. Select one or more languages for the ontology. The languages you select here will be available to define labels and descriptions for classes, relations and attributes respectively.

  6. If you selected more than one language in the previous step, select the default language for the ontology.

  7. Select from existing user groups to define which users should be able to access and edit the ontology.

    Create-a-Custom-Ontology3-7.png
  8. Optional: In the Advanced tab, you can define the URI pattern used for your ontology. Details find in this topic: Define the URI Pattern for a Custom Ontology or Custom Scheme

    1. Base URI: this is pre-filled according to the setting defined for ontologies in the The poolparty.properties File but you can change it to a Base URI of your choice after you click the pencil icon.

    2. Scheme Identifier: this is pre-filled with the title of the ontology you chose, which will be used without spaces as part of the URI. You can change it after you click the pencil icon.

    3. Resource Separator: use the radio buttons to specify the type of separator you want to be used in the URIs based on this ontology (default: Slash).

  9. Confirm with Create.

    Create-a-Custom-Ontology89.png

    A new custom ontology is created. You can find it in the Custom Ontologies list.

Once the ontology has been created, you can:

Create Custom Classes

Abstract

Create Custom Classes

Prerequisites for Creating a Custom ClassHow to Create a New Custom Class in a Custom Ontology

To create a new class:

  1. Open the Ontology Management by clicking its icon on the toolbar.

    Create-a-Custom-Ontology.png
  2. Bring up the New Class dialog with one of the following actions:

    1. Right click the custom ontology to which you want to add a new class in the Hierarchy Tree and select New Class from the context menu.

      Create-Custom-Classes2a.png
    2. Select the custom ontology to which you want to add a new class in the Hierarchy Tree. On the Details View on the right find the section Statistics. Click the Add icon next to Classes.

      Create-Custom-Classes2b.png
    3. Double click the Classes node below the node representing the custom ontology to which you want to add a new class.

    4. Right click the Classes node below the node representing the custom ontology to which you want to add a new class and select New Class from the context menu.

    5. Select the Classes node below the node representing the custom ontology to which you want to add a new class and click New Class on the Details View.

      Create-Custom-Classes2c.png
  3. The New Class dialog opens. In the New Class dialog you have the following options:

    1. Label: Enter a name for the class (mandatory).

      Available classes from all active predefined and custom ontologies are displayed as you start typing in the Label field via autocomplete. That way you can reuse existing classes.

    2. Language: Select the language of the new class. This list depends on the language settings for the custom ontology.

    3. URI: The URI will be filled with URI pattern defined creating your custom ontology. The pattern is non-editable per default and will be extended by the specified label which will be used without spaces. You can click the pencil icon to make it editable and define a specific URI if needed.

    4. Subclass of: Select this option if a class is a subclass of another class. Select the parent class from the dropdown.

    5. Disjoint with: Select this option if the current class and another class cannot share an instance regardless of how the classes are interpreted.

  4. You have more options on the Description tab where you can add a description for the new class.

  5. Click Create.

    Custom-classes-_-New-class.png

23898884.pngBelow, you can see the OWL statements created for a class. As you can see a class is defined as owl:Class and rdfs:label is used for the name. The rdfs:subClassOf relation is used to specify the sub-class relation and owl:disjointWith to specify the disjoint classes. Finally, rdfs:comment is used for the description.

<http://doku.poolparty.biz/cocktail-ontology/Syrup> a owl:Class;
  dcterms:created "2019-02-03T12:16:12.662Z"^^xsd:dateTime;
  dcterms:creator <http://resource.semantic-web.at/user/admin>;
  rdfs:label "Syrup"@en;
  rdfs:comment "A condiment that is a thick, viscous liquid consisting primarily of a solution of sugar in water."@en
  rdfs:subClassOf <http://doku.poolparty.biz/cocktail-ontology/Sweeteners>;
  owl:disjointWith <http://doku.poolparty.biz/cocktail-ontology/Souces> .

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

Create Custom Relations

Abstract

PoolParty allows you to add new relations to your custom ontology.

Note

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 on the Hierarchy Tree – Option 1
  1. Open the Ontology Management by clicking its icon on the toolbar.

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

  3. Select New Relation.

    805-create-custom-relations.png

    The New Relation dialog opens

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.

  5. Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.

  6. Confirm with Create.

Procedure. Create Custom Relations on the Hierarchy Tree – Option 2
  1. Open the Ontology Management by clicking its icon on 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 dialog opens

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.

  6. Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.

  7. Confirm with Create.

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

  2. Go to Custom Ontologies and select the node representing the custom ontology where 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 dialog opens

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.

  5. Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.

  6. Confirm with Create.

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

  2. Go to Custom Ontologies and expand the node representing the custom ontology where 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 dialog opens

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.

  6. Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.

  7. Confirm with Create.

. Mandatory Settings on the New Relation Dialog
New-relation.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:narrower 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', 'Label' 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.

  • Usage (5)

    If you want this relation to only be used once between two resources, select Unique Use .

  • Language (6)

    Language of the new relation. This list depends on the language settings for the custom ontology.

. Optional Settings on the New Relation Dialog
New-relation-optional.png
  • Select Edit to edit the prefilled relation URI (1).

  • Sub-Property of

    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 (2).

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

Sample OWL Statements

Below you see 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 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 see 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 see 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

Create Custom Attributes

Abstract

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

You can add custom attributes 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 attributes to custom schemes. For more information, refer to Add Classes, Relations and Attributes to Your Custom Scheme.

Procedure. Create Custom Attributes on the Hierarchy Tree – Option 1
  1. Open the Ontology Management by clicking its icon on the toolbar.

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

  3. Select New Attribute.

    817-new-attribute.png

    The New Attribute dialog opens.

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.

  5. Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.

  6. Confirm with Create.

Procedure. Create Custom Attributes on the Hierarchy Tree – Option 2
  1. Open the Ontology Management by clicking its icon on the toolbar.

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

  3. Right-click Attributes.

  4. Select New Attribute.

    817-new-attribute---from-HT-option-2.png

    Tip

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

    The New Attribute dialog opens.

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.

  6. Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.

  7. Confirm with Create.

Procedure. Create Custom Attributes on the Ontology Details View
  1. Open the Ontology Management by clicking its icon on the toolbar.

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

  3. Click Add next to Attributes on the ontology Details View.

    817-new-attribute-from-ontology-details-view.png

    The New Attribute dialog opens.

  4. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.

  5. Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.

  6. Confirm with Create.

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

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

  3. Select the Attributes node.

  4. Select New Attribute.

    817-create-new-attribute-from-the-attributes-list.png

    The New Attribute dialog opens.

  5. Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.

  6. Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.

  7. Confirm with Create.

. Mandatory Settings on the New Attribute Dialog
New-Attribute-mandatory.png
  • Label (1): name of the attribute.

    When you start typing, PoolParty displays every available class from every active predefined and custom ontology via autocomplete. That way you can reuse existing classes.

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

  • Language(2)

    Language of the new attribute. This list depends on the language settings for the custom ontology.

  • Domain (3)

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

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

  • Type (4): type of the attribute.

    The selected type determines the data type of your attribute. You can find a list of available data types here: Available Attribute Types.

  • Usage (5): defines whether an attribute can be used multiple times or only once per resource.

. Optional Settings on the New Attribute Dialog
New-Attribute-optional.png
  • Use the Edit icon (1) to edit the pre-filled attribute URI.

  • Sub-Property of (2)

    If you want this attribute to be a sub-property of another, select the parent attribute from the relations in the ontology and all SKOS relations.

  • To add a description for the new attribute, go to the Description tab (3).

Note

Below you can see the OWL statements created for an attribute. As you can see a directed relation is defined as an owl:DataTypeProperty and rdfs:label is used for the name. rdfs:domain is used to define the respective class restrictions for the Domain. rdfs:range is used to define the data type restriction for the Range e.g. rdfs:Resource for attribute type URI. Finally, rdfs:comment is used for the description. To indicate Unique Use the relation in addition becomes an owl:FunctionalProperty. The definition of a sub-property is done via the rdfs:subPropertyOf relation.

<http://doku.poolparty.biz/cocktail-ontology/primaryImage> a owl:DatatypeProperty, owl:FunctionalProperty;
  rdfs:domain <http://doku.poolparty.biz/cocktail-ontology/Cocktail>;
  rdfs:label "Primary Image"@en;
  rdfs:comment "Image to be primary used to illustrate the resource."@en
  rdfs:range rdfs:Resource;
  rdfs:subPropertyOf <http://doku.poolparty.biz/cocktail-ontology/Image>.

Available Attribute Types

Abstract

Available Attribute Types

This section contains an overview of attribute types available while creating custom attributes for a custom ontology.

The following table gives an overview of available attribute types and the respective data types.

Attribute Type

Description

Data Type

Example

URI

A valid URI.

rdfs:Resource

http://www.example.com

Literal

A string that based on the defined restrictions can be with or without a language tag.

"example1234"

Long

May only contain digits or scientific notation and must be between -9223372036854775808 and +9223372036854775807

xsd:long

4,321.768 / 4.321768×103

Integer

May only contain digits and must be between -2147483648 and +2147483647.

12345

Float

May only contain digits and a dash (-). A dot (.) is required.

xsd:float

2345.877

Date

A date selector helps with the input for this field.

xsd:date

30.09.2015

Date/Time

A date and time selector helps with the input for this field.

xsd:dateTime

20.07.2017 - 11:15

Boolean

A boolean selector lets the user select true or false.

Note: a boolean attribute is always also a owl:FunctionalProperty as it can be only assigned once to a resource.

xsd:boolean

true

Literal

The literal attribute has more configuration options and can have several characteristics based on those.

No Language Options

Literal without a language tag.

xsd:string

"example1234"

No-Language-Options.png

No Restriction

Literal with or without a language tag.

rdfs:Literal

"example1234" or "example1234"@en

No-Restriction.png

Unique Per Language (No Restriction)

Literal with or without a language tag that can only be used once per language.

rdfs:Literal

"example1234" or "example1234"@en

Unique-Per-Language-_No-Restriction_.png

Note

A literal with the unique per language attribute is always also a swc:FunctionalLanguageProperty as it can only be assigned to a resource once.

Requires Language

Literal with a language tag.

rdf:langString

"example1234"@en

Requires-Language.png

Unique Per Language (Requires Language)

Literal with a language tag that can only be used once per language.

rdf:langString

"example1234"@en

Unique-Per-Language-_Requires-Language_.png

Note

A literal with the 'unique per language' attribute is always also a swc:FunctionalLanguageProperty as it can only be assigned to a resource once.