Skip to content

Commit

Permalink
chore: improve ontology schema and extend tests (DEV-313) (#140)
Browse files Browse the repository at this point in the history
* Remove invalid anything onto from test data

* extend test for get command

* add tests for gui element to ontology schema

* add conditionals for gui_attributes to schema

* Remove code smell

* fix errors in schema

* Refactor test_tools.py

* Add documentation for subject attribute
  • Loading branch information
irinaschubert committed Jan 10, 2022
1 parent cbe1876 commit 656ccff
Show file tree
Hide file tree
Showing 6 changed files with 570 additions and 1,044 deletions.
27 changes: 23 additions & 4 deletions docs/dsp-tools-create-ontologies.md
Expand Up @@ -83,6 +83,10 @@ The following fields are mandatory:
- `object`
- `gui_element`

The following fields are optional:

- `subject`

A detailed description of `properties` can be found [below](#properties-object-in-detail).


Expand Down Expand Up @@ -140,6 +144,15 @@ By convention, property names start with a lower case letter.
Collection of `labels` for the property as strings with language tag (currently "en", "de", "fr"
and "it" are supported).

### Subject

(optional)

`"subject": "<resource-class>"`

The `subject` defines the resource class the property can be used on. It has to be provided as prefixed name of the
resource class (see [below](#referencing-ontologies) on how prefixed names are used).

### Object / gui_element / gui_attributes

- `object`: required
Expand Down Expand Up @@ -636,13 +649,16 @@ Example of a `properties` object:
{
"properties": [
{
"name": "schulcode",
"name": "id",
"subject": ":School",
"object": "TextValue",
"super": [
"hasValue"
],
"labels": {
"de": "Schulcode"
"en": "School ID",
"de": "ID der Schule"
"fr": "ID de l'école"
},
"gui_element": "SimpleText",
"gui_attributes": {
Expand All @@ -651,13 +667,16 @@ Example of a `properties` object:
}
},
{
"name": "schulname",
"name": "name",
"subject": ":School",
"object": "TextValue",
"super": [
"hasValue"
],
"labels": {
"de": "Name der Schule"
"en": "Name of the school",
"de": "Name der Schule",
"fr": "Nom de l'école"
},
"gui_element": "SimpleText",
"gui_attributes": {
Expand Down

0 comments on commit 656ccff

Please sign in to comment.