Create Custom Attributes
Create Custom Attributes
This section contains a short guide on how to create custom attributes for a custom ontology.
In the Details View on the right, click New Attribute.
Alternatively, right-click the Attributes node, select New Attribute from the context-menu.
In the New Attribute dialogue you have the following options:
Label: enter the name of the attribute. (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.
URI: the URI will be filled with URI pattern defined creating your custom ontology. The pattern is greyed out per default and will be extended by the specified label 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.
Select the Type of attribute, for example URI.
The selected type determines the data type of your relation.
You can find a list of available data types here: Available Attribute Types
All other settings are optional.
Click Save to to confirm your changes.
In the Usage section you find the Multiple Use (Default) and Unique Use radio buttons. Select to define whether an attribute can be used multiple times or only once per resource.
Is a Sub-Property: if you want this attribute to be a sub-property of another, check the box.
A new drop down will enable you to choose the desired parent attribute from the relations in the ontology and all SKOS relations.
You have to click Add to make a selection.
In the Description tab you can enter a descriptive text for the attribute.
Depending on the languages you have defined for the ontology you can also select the language for that description from a drop down.
You can also add custom relations to custom schemes. Details find here: Add Classes, Relations and Attributes to Your Custom Scheme
Below you can find 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 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>.