Skip to main content

Create Custom Attributes

Abstract

Create Custom Attributes

This section contains a short guide on how to create custom attributes for a custom ontology.

Prerequisites for Creating a Custom AttributeHow to Create a Custom Attribute in Your Custom Ontology
  1. In the Details View on the right, click New Attribute.

  2. Alternatively, right-click the Attributes node, select New Attribute from the context-menu.

    51732638.png
  3. 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.

    51732636.png
  4. 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.

  5. Click Save to to confirm your changes.

Optional Settings for Custom Attributes
  • 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.

      23899693.png
  • In the Description tab you can enter a descriptive text for the attribute.

    23899692.png

    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

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