Create a Custom Ontology
Create a Custom Ontology
Open the Ontology Management.
Bring up the Edit Ontology dialogue with one of the following actions:
Right click the Ontologies node and select New Custom Ontology.
Right click the Custom Ontologies node and select New Custom Ontology.
Click the Custom Ontologies node and select New Custom Ontology.
The New Custom Ontology dialogue opens with the Metadata tab activated by default.
Enter the title of your ontology.
Optional: Enter the description.
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.
If you selected more than one language in the previous step, select the default language for the ontology.
Select from existing user groups to define which users should be able to access and edit the ontology.
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
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.
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.
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).
Confirm with Create.
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
Create Custom Classes
To create a new class:
Open the Ontology Management by clicking its icon on the toolbar.
Bring up the New Class dialog with one of the following actions:
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.
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.
Double click the Classes node below the node representing the custom ontology to which you want to add a new class.
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.
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.
The New Class dialog opens. In the New Class dialog you have the following options:
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.
Language: Select the language of the new class. This list depends on the language settings for the custom ontology.
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.
Subclass of: Select this option if a class is a subclass of another class. Select the parent class from the dropdown.
Disjoint with: Select this option if the current class and another class cannot share an instance regardless of how the classes are interpreted.
You have more options on the Description tab where you can add a description for the new class.
Click Create.
Below, 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
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
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and right click the node representing the custom ontology where you want to add a new relation.
Select New Relation.
The New Relation dialog opens
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.
Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and expand the node representing the custom ontology to which you want to add a new relation.
Right click Relations.
Select New Relation.
Tip
Alternatively, you can access this option by double clicking the Relations node.
The New Relation dialog opens
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.
Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and select the node representing the custom ontology where you want to add a new relation.
Click Add next to Relations in the ontology Details View.
The New Relation dialog opens
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.
Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and expand the node representing the custom ontology where you want to add a new relation.
Select the Relations node.
Select New Relation.
The New Relation dialog opens
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Relation Dialog section below.
Optional: Specify optional settings. For more information, refer to the Optional Settings on the New Relation Dialog section below.
Confirm with Create.
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
andskos: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.
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).
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
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.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and right click the node representing the custom ontology to which you want to add a new attribute.
Select New Attribute.
The New Attribute dialog opens.
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.
Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and expand the node representing the custom ontology to which you want to add a new attribute.
Right-click Attributes.
Select New Attribute.
Tip
Alternatively, you can access this option by double clicking the Attributes node.
The New Attribute dialog opens.
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.
Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and select the node representing the custom ontology to which you want to add a new attribute.
Click Add next to Attributes on the ontology Details View.
The New Attribute dialog opens.
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.
Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.
Confirm with Create.
Open the Ontology Management by clicking its icon on the toolbar.
Go to Custom Ontologies and expand the node representing the custom ontology to which you want to add a new attribute.
Select the Attributes node.
Select New Attribute.
The New Attribute dialog opens.
Specify all mandatory settings. For more information, refer to the Mandatory Settings on the New Attribute Dialog section below.
Optional: Specify the optional settings. For more information, refer to the Optional Settings on the New Attribute Dialog section below.
Confirm with Create.
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.
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
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. |
| |
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 |
| 4,321.768 / 4.321768×103 |
Integer | May only contain digits and must be between | 12345 | |
Float | May only contain digits and a dash ( |
| 2345.877 |
Date | A date selector helps with the input for this field. |
| 30.09.2015 |
Date/Time | A date and time selector helps with the input for this field. |
| 20.07.2017 - 11:15 |
Boolean | A boolean selector lets the user select true or false. Note: a boolean attribute is always also a |
| 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. |
| "example1234" |
No Restriction | Literal with or without a language tag. |
| "example1234" or "example1234"@en |
Unique Per Language (No Restriction) | Literal with or without a language tag that can only be used once per language. |
| "example1234" or "example1234"@en |
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. |
| "example1234"@en |
Unique Per Language (Requires Language) | Literal with a language tag that can only be used once per language. |
| "example1234"@en |
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.