From 16ba335c1e8bb687a53dd8e376d88a39f2f0aa44 Mon Sep 17 00:00:00 2001 From: irinaschubert Date: Mon, 20 Sep 2021 11:39:02 +0200 Subject: [PATCH] chore(schemas): update schemas (DSP-1902) (#92) * enforce schema reference to ontology * update schema version and id * update schema titles and descriptions * correct typo * restructure schemas * test external xsd schema * update schema reference * update schema reference url in xml * use uri-prop --- knora/dsplib/schemas/__init__.py | 0 .../data.xsd} | 178 +- .../lists-only.json} | 8 +- .../lists.json} | 23 +- .../ontology.json} | 128 +- .../resources-only.json} | 8 +- knora/dsplib/utils/excel_to_json_lists.py | 2 +- knora/dsplib/utils/excel_to_json_resources.py | 2 +- knora/dsplib/utils/onto_validate.py | 4 +- knora/dsplib/utils/xml_upload.py | 2 +- testdata/anything-onto.json | 1935 +++++++++-------- testdata/test-data.xml | 50 +- testdata/test-onto.json | 75 +- 13 files changed, 1251 insertions(+), 1164 deletions(-) create mode 100644 knora/dsplib/schemas/__init__.py rename knora/dsplib/{utils/knora-data-schema.xsd => schemas/data.xsd} (82%) rename knora/dsplib/{utils/knora-schema-lists-only.json => schemas/lists-only.json} (84%) rename knora/dsplib/{utils/knora-schema-lists.json => schemas/lists.json} (80%) rename knora/dsplib/{utils/knora-schema.json => schemas/ontology.json} (85%) rename knora/dsplib/{utils/knora-schema-resources-only.json => schemas/resources-only.json} (90%) diff --git a/knora/dsplib/schemas/__init__.py b/knora/dsplib/schemas/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/knora/dsplib/utils/knora-data-schema.xsd b/knora/dsplib/schemas/data.xsd similarity index 82% rename from knora/dsplib/utils/knora-data-schema.xsd rename to knora/dsplib/schemas/data.xsd index 208c27bcc..adbdaea0d 100644 --- a/knora/dsplib/utils/knora-data-schema.xsd +++ b/knora/dsplib/schemas/data.xsd @@ -1,43 +1,46 @@ - - + + - + - + - + - + - - + + - + - + - + - + @@ -54,7 +57,7 @@ - + @@ -62,17 +65,17 @@ - + - + - + @@ -82,27 +85,27 @@ - + - + - + - + - + @@ -112,86 +115,86 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -201,11 +204,11 @@ - + - + @@ -237,7 +240,7 @@ - + @@ -245,7 +248,7 @@ - + @@ -253,7 +256,7 @@ - + @@ -262,7 +265,7 @@ - + @@ -278,7 +281,7 @@ - + @@ -286,7 +289,7 @@ - + @@ -310,7 +313,7 @@ - + @@ -318,7 +321,7 @@ - + @@ -326,7 +329,7 @@ - + @@ -334,7 +337,7 @@ - + @@ -356,14 +359,14 @@ - + - + @@ -373,47 +376,47 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -424,7 +427,7 @@ - + @@ -433,7 +436,7 @@ - + @@ -441,12 +444,12 @@ - + - + @@ -457,8 +460,9 @@ - + + diff --git a/knora/dsplib/utils/knora-schema-lists-only.json b/knora/dsplib/schemas/lists-only.json similarity index 84% rename from knora/dsplib/utils/knora-schema-lists-only.json rename to knora/dsplib/schemas/lists-only.json index 393277a17..13de9047f 100644 --- a/knora/dsplib/utils/knora-schema-lists-only.json +++ b/knora/dsplib/schemas/lists-only.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://knora.org/pyknora/ontology/knora-schema-list-only.json", - "title": "Knora JSON schema for lists only", - "description": "JSON schema for lists used in Knora ontologies", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://dasch.swiss/schema/knora-schema-list-only.json", + "title": "JSON schema for DSP lists", + "description": "JSON schema for the lists section used in DSP ontologies", "definitions": { "label": { "type": "object", diff --git a/knora/dsplib/utils/knora-schema-lists.json b/knora/dsplib/schemas/lists.json similarity index 80% rename from knora/dsplib/utils/knora-schema-lists.json rename to knora/dsplib/schemas/lists.json index 83446212f..5fcb020a3 100644 --- a/knora/dsplib/utils/knora-schema-lists.json +++ b/knora/dsplib/schemas/lists.json @@ -1,9 +1,8 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://knora.org/pyknora/ontology/knora-schema.json", - "title": "Knora JSON schema", - "description": "JSON Schema for Knora ontologies", - + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://dasch.swiss/schema/knora-schema.json", + "title": "JSON schema for DSP lists", + "description": "JSON schema for lists used in DSP ontologies", "definitions": { "label": { "type": "object", @@ -74,17 +73,25 @@ } } }, - "required": ["shortcode", "lists"], + "required": [ + "shortcode", + "lists" + ], "additionalProperties": false }, "prefixes": { "type": "object", "patternProperties": { - "^[\\w-]+$": { "format" : "uri" } + "^[\\w-]+$": { + "format": "uri" + } }, "additionalProperties": false } }, - "required": ["prefixes", "project"], + "required": [ + "prefixes", + "project" + ], "additionalProperties": false } diff --git a/knora/dsplib/utils/knora-schema.json b/knora/dsplib/schemas/ontology.json similarity index 85% rename from knora/dsplib/utils/knora-schema.json rename to knora/dsplib/schemas/ontology.json index 36373ad5b..53bc71205 100644 --- a/knora/dsplib/utils/knora-schema.json +++ b/knora/dsplib/schemas/ontology.json @@ -1,11 +1,9 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://knora.org/pyknora/ontology/knora-schema.json", - "title": "knora-py JSON schema", - "description": "JSON Schema for Knora ontologies", - + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://dasch.swiss/schema/knora-schema.json", + "title": "JSON schema for DSP ontologies", + "description": "JSON schema for DSP ontologies", "definitions": { - "langstring": { "anyOf": [ { @@ -22,32 +20,29 @@ } ] }, - "label": { "$ref": "#/definitions/langstring" }, - "description": { "$ref": "#/definitions/langstring" }, - "comment": { "$ref": "#/definitions/langstring" }, - "groupdef": { "type": "string", "pattern": "^(([\\w-]*)?:([\\w ]+))|(SystemAdmin)$", "additionalProperties": false }, - "projectdef": { "type": "string", "pattern": "^([\\w-]*)?:(member|admin)$" }, - "resourcedef": { - "type": ["string", "array"], + "type": [ + "string", + "array" + ], "oneOf": [ { "enum": [ @@ -74,7 +69,6 @@ "$ref": "#/definitions/resourcedef" } }, - "excelref": { "type": "object", "properties": { @@ -91,9 +85,11 @@ "type": "integer" } }, - "required": ["file", "worksheet"] + "required": [ + "file", + "worksheet" + ] }, - "user": { "type": "object", "properties": { @@ -128,9 +124,14 @@ } } }, - "required": ["username", "email", "givenName", "familyName", "password"] + "required": [ + "username", + "email", + "givenName", + "familyName", + "password" + ] }, - "group": { "type": "object", "properties": { @@ -147,9 +148,11 @@ "type": "boolean" } }, - "required": ["name", "description"] + "required": [ + "name", + "description" + ] }, - "node": { "type": "object", "properties": { @@ -177,10 +180,12 @@ ] } }, - "required": ["name", "labels"], + "required": [ + "name", + "labels" + ], "additionalProperties": false }, - "ontology": { "type": "object", "properties": { @@ -199,17 +204,21 @@ "$ref": "#/definitions/property" } }, - "resources": { + "resources": { "type": "array", "items": { "$ref": "#/definitions/resource" } } }, - "required": ["name", "label", "properties", "resources"], + "required": [ + "name", + "label", + "properties", + "resources" + ], "additionalProperties": false }, - "property": { "type": "object", "properties": { @@ -275,11 +284,9 @@ "type": "string", "pattern": "^([\\w-]+)?:(\\w+)$" }, - "labels": { "$ref": "#/definitions/label" }, - "gui_element": { "type": "string", "enum": [ @@ -302,7 +309,6 @@ "Fileupload" ] }, - "gui_attributes": { "type": "object", "properties": { @@ -333,7 +339,10 @@ }, "wrap": { "type": "string", - "enum": ["soft", "hard"] + "enum": [ + "soft", + "hard" + ] }, "max": { "type": "number" @@ -343,23 +352,30 @@ } } }, - "comments": { "$ref": "#/definitions/comment" } }, - "required": ["name", "object", "labels", "gui_element"], + "required": [ + "name", + "object", + "labels", + "gui_element" + ], "additionalProperties": false }, - - "cardinality":{ + "cardinality": { "type": "object", "properties": { "propname": { "type": "string", "oneOf": [ { - "enum": ["Region", "isPartOf", "seqnum"] + "enum": [ + "Region", + "isPartOf", + "seqnum" + ] }, { "pattern": "^(([\\w-]*)?:([\\w ]+))$" @@ -368,16 +384,23 @@ }, "cardinality": { "type": "string", - "enum": ["1", "0-1", "1-n", "0-n"] + "enum": [ + "1", + "0-1", + "1-n", + "0-n" + ] }, "gui_order": { "type": "integer" } }, - "required": ["propname", "cardinality"], + "required": [ + "propname", + "cardinality" + ], "additionalProperties": false }, - "resource": { "type": "object", "properties": { @@ -400,21 +423,29 @@ } } }, - "required": ["name", "super", "labels", "cardinalities"], + "required": [ + "name", + "super", + "labels", + "cardinalities" + ], "additionalProperties": false } }, - "type": "object", "properties": { "prefixes": { "type": "object", "patternProperties": { - "^[\\w-]+$": { "format" : "uri" } + "^[\\w-]+$": { + "format": "uri" + } }, "additionalProperties": false }, - + "$schema": { + "type": "string" + }, "project": { "type": "object", "properties": { @@ -449,14 +480,12 @@ "$ref": "#/definitions/user" } }, - "lists": { "type": "array", "items": { "$ref": "#/definitions/node" } }, - "ontologies": { "type": "array", "items": { @@ -464,10 +493,19 @@ } } }, - "required": ["shortcode", "shortname", "longname", "ontologies", "keywords"], + "required": [ + "shortcode", + "shortname", + "longname", + "ontologies", + "keywords" + ], "additionalProperties": false } }, - "required": ["project"], + "required": [ + "$schema", + "project" + ], "additionalProperties": false } diff --git a/knora/dsplib/utils/knora-schema-resources-only.json b/knora/dsplib/schemas/resources-only.json similarity index 90% rename from knora/dsplib/utils/knora-schema-resources-only.json rename to knora/dsplib/schemas/resources-only.json index 41c92ab57..029b19e8f 100644 --- a/knora/dsplib/utils/knora-schema-resources-only.json +++ b/knora/dsplib/schemas/resources-only.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://knora.org/pyknora/ontology/knora-schema-resources-only.json", - "title": "Knora JSON schema for resources only", - "description": "JSON schema for resources used in Knora ontologies", + "$schema": "https://json-schema.org/draft/2020-12/schema#", + "$id": "https://dasch.swiss/schema/knora-schema-resources-only.json", + "title": "JSON schema for resources used in DSP ontologies", + "description": "JSON schema for the resources section used in DSP ontologies", "definitions": { "langstring": { "anyOf": [ diff --git a/knora/dsplib/utils/excel_to_json_lists.py b/knora/dsplib/utils/excel_to_json_lists.py index 400b51057..96819ea09 100644 --- a/knora/dsplib/utils/excel_to_json_lists.py +++ b/knora/dsplib/utils/excel_to_json_lists.py @@ -258,7 +258,7 @@ def validate_list_with_schema(json_list: str) -> bool: """ current_dir = os.path.dirname(os.path.realpath(__file__)) - with open(os.path.join(current_dir, 'knora-schema-lists-only.json')) as schema: + with open(os.path.join(current_dir, '../schemas/lists-only.json')) as schema: list_schema = json.load(schema) try: diff --git a/knora/dsplib/utils/excel_to_json_resources.py b/knora/dsplib/utils/excel_to_json_resources.py index 4cb0bca96..bd0451a4e 100644 --- a/knora/dsplib/utils/excel_to_json_resources.py +++ b/knora/dsplib/utils/excel_to_json_resources.py @@ -17,7 +17,7 @@ def validate_resources_with_schema(json_file: str) -> bool: """ current_dir = os.path.dirname(os.path.realpath(__file__)) - with open(os.path.join(current_dir, 'knora-schema-resources-only.json')) as schema: + with open(os.path.join(current_dir, '../schemas/resources-only.json')) as schema: resources_schema = json.load(schema) try: diff --git a/knora/dsplib/utils/onto_validate.py b/knora/dsplib/utils/onto_validate.py index 9ce0fed93..f7aa6dac1 100644 --- a/knora/dsplib/utils/onto_validate.py +++ b/knora/dsplib/utils/onto_validate.py @@ -1,6 +1,6 @@ import json import os -from typing import Union, Dict +from typing import Dict, Union import jsonschema from jsonschema import validate @@ -39,7 +39,7 @@ def validate_ontology(input_file_or_json: Union[str, Dict, os.PathLike]) -> bool # validate the data model against the schema current_dir = os.path.dirname(os.path.realpath(__file__)) - with open(os.path.join(current_dir, 'knora-schema.json')) as s: + with open(os.path.join(current_dir, '../schemas/ontology.json')) as s: schema = json.load(s) try: diff --git a/knora/dsplib/utils/xml_upload.py b/knora/dsplib/utils/xml_upload.py index de4b689f1..2dcda3889 100644 --- a/knora/dsplib/utils/xml_upload.py +++ b/knora/dsplib/utils/xml_upload.py @@ -534,7 +534,7 @@ def xml_upload(input_file: str, server: str, user: str, password: str, imgdir: s # Validate the input XML file current_dir = os.path.dirname(os.path.realpath(__file__)) - schema_file = etree.parse(os.path.join(current_dir, 'knora-data-schema.xsd')) + schema_file = etree.parse(os.path.join(current_dir, '../schemas/data.xsd')) if validate_xml_against_schema(input_file, schema_file): print("The input data file is syntactically correct and passed validation!") diff --git a/testdata/anything-onto.json b/testdata/anything-onto.json index 08315ba11..c8e4ca94c 100644 --- a/testdata/anything-onto.json +++ b/testdata/anything-onto.json @@ -1,989 +1,990 @@ { - "prefixes": { - "anything": "http://0.0.0.0:3333/ontology/0001/anything/v2", - "minimal": "http://0.0.0.0:3333/ontology/0001/minimal/v2", - "something": "http://0.0.0.0:3333/ontology/0001/something/v2" - }, - "project": { - "shortcode": "0001", - "shortname": "anything", - "longname": "Anything Project", - "descriptions": "Anything Project", - "keywords": [ - "arbitrary test data", - "things" - ], - "lists": [ - { - "name": "otherTreeList", + "prefixes": { + "anything": "http://0.0.0.0:3333/ontology/0001/anything/v2", + "minimal": "http://0.0.0.0:3333/ontology/0001/minimal/v2", + "something": "http://0.0.0.0:3333/ontology/0001/something/v2" + }, + "$schema": "https://raw.githubusercontent.com/dasch-swiss/dsp-tools/main/knora/dsplib/utils/knora-schema.json", + "project": { + "shortcode": "0001", + "shortname": "anything", + "longname": "Anything Project", + "descriptions": "Anything Project", + "keywords": [ + "arbitrary test data", + "things" + ], + "lists": [ + { + "name": "otherTreeList", + "labels": { + "en": "Tree list root" + }, + "nodes": [ + { + "name": "Other Tree list node 01", "labels": { - "en": "Tree list root" + "en": "Other Tree list node 01" + } + }, + { + "name": "Other Tree list node 02", + "labels": { + "en": "Other Tree list node 02" + } + }, + { + "name": "Other Tree list node 03", + "labels": { + "en": "Other Tree list node 03" }, "nodes": [ - { - "name": "Other Tree list node 01", - "labels": { - "en": "Other Tree list node 01" - } - }, - { - "name": "Other Tree list node 02", - "labels": { - "en": "Other Tree list node 02" - } - }, - { - "name": "Other Tree list node 03", - "labels": { - "en": "Other Tree list node 03" - }, - "nodes": [ - { - "name": "Other Tree list node 10", - "labels": { - "en": "Other Tree list node 10" - } - }, - { - "name": "Other Tree list node 11", - "labels": { - "en": "Other Tree list node 11" - } - } - ] - } + { + "name": "Other Tree list node 10", + "labels": { + "en": "Other Tree list node 10" + } + }, + { + "name": "Other Tree list node 11", + "labels": { + "en": "Other Tree list node 11" + } + } ] - }, - { - "name": "notUsedList", + } + ] + }, + { + "name": "notUsedList", + "labels": { + "de": "unbenutzte Liste", + "en": "a list that is not used" + }, + "comments": { + "en": "a list that is not in used in ontology or data" + }, + "nodes": [ + { + "name": "node 1", "labels": { - "de": "unbenutzte Liste", - "en": "a list that is not used" - }, - "comments": { - "en": "a list that is not in used in ontology or data" + "en": "node 1" }, "nodes": [ - { - "name": "node 1", - "labels": { - "en": "node 1" + { + "name": "child of node 1", + "labels": { + "en": "child of node 1" + } + }, + { + "name": "List012", + "labels": { + "en": "List012" + } + }, + { + "name": "List013", + "labels": { + "en": "List013" + } + }, + { + "name": "List014", + "labels": { + "en": "List014" + }, + "nodes": [ + { + "name": "first child of node 014", + "labels": { + "en": "first child of node 014" + } }, - "nodes": [ - { - "name": "child of node 1", - "labels": { - "en": "child of node 1" - } - }, - { - "name": "List012", - "labels": { - "en": "List012" - } - }, - { - "name": "List013", - "labels": { - "en": "List013" - } - }, - { - "name": "List014", - "labels": { - "en": "List014" - }, - "nodes": [ - { - "name": "first child of node 014", - "labels": { - "en": "first child of node 014" - } - }, - { - "name": "second child of node 014", - "labels": { - "en": "second child of node 014" - } - } - ] - }, - { - "name": "List015", - "labels": { - "en": "List015" - } - } - ] - }, - { - "name": "node 2", - "labels": { - "en": "node 2" + { + "name": "second child of node 014", + "labels": { + "en": "second child of node 014" + } } - }, - { - "name": "node 3", - "labels": { - "en": "node 3" - }, - "nodes": [ - { - "name": "child of node 3", - "labels": { - "en": "child of node 3" - } - } - ] - } + ] + }, + { + "name": "List015", + "labels": { + "en": "List015" + } + } ] - }, - { - "name": "treelistroot", + }, + { + "name": "node 2", "labels": { - "de": "Listenwurzel", - "en": "Tree list root" + "en": "node 2" + } + }, + { + "name": "node 3", + "labels": { + "en": "node 3" }, - "comments": { - "en": "Anything Tree List" + "nodes": [ + { + "name": "child of node 3", + "labels": { + "en": "child of node 3" + } + } + ] + } + ] + }, + { + "name": "treelistroot", + "labels": { + "de": "Listenwurzel", + "en": "Tree list root" + }, + "comments": { + "en": "Anything Tree List" + }, + "nodes": [ + { + "name": "Tree list node 01", + "labels": { + "en": "Tree list node 01" + } + }, + { + "name": "Tree list node 02", + "labels": { + "de": "Baumlistenknoten 02", + "en": "Tree list node 02" + } + }, + { + "name": "Tree list node 03", + "labels": { + "en": "Tree list node 03" }, "nodes": [ - { - "name": "Tree list node 01", - "labels": { - "en": "Tree list node 01" - } - }, - { - "name": "Tree list node 02", - "labels": { - "de": "Baumlistenknoten 02", - "en": "Tree list node 02" - } - }, - { - "name": "Tree list node 03", - "labels": { - "en": "Tree list node 03" - }, - "nodes": [ - { - "name": "Tree list node 10", - "labels": { - "en": "Tree list node 10" - } - }, - { - "name": "Tree list node 11", - "labels": { - "en": "Tree list node 11" - } - } - ] - } + { + "name": "Tree list node 10", + "labels": { + "en": "Tree list node 10" + } + }, + { + "name": "Tree list node 11", + "labels": { + "en": "Tree list node 11" + } + } ] - } - ], - "ontologies": [ - { - "name": "anything", - "label": "The anything ontology", - "properties": [ - { - "name": "hasBlueThing", - "super": [ - ":hasOtherThing" - ], - "object": ":BlueThing", - "labels": "A blue thing", - "gui_element": "Searchbox" - }, - { - "name": "hasBoolean", - "super": [ - "hasValue" - ], - "object": "BooleanValue", - "labels": "Boolean value", - "gui_element": "Checkbox" - }, - { - "name": "hasColor", - "super": [ - "hasValue" - ], - "object": "ColorValue", - "labels": "Color", - "gui_element": "Colorpicker" - }, - { - "name": "hasDate", - "super": [ - "hasValue" - ], - "object": "DateValue", - "labels": "Date", - "gui_element": "Date" - }, - { - "name": "hasDecimal", - "super": [ - "hasValue" - ], - "object": "DecimalValue", - "labels": "Decimal number", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - }, - { - "name": "hasDocumentTitle", - "super": [ - "hasValue" - ], - "object": "TextValue", - "labels": "document title", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - }, - { - "name": "hasGeometry", - "super": [ - "hasValue" - ], - "object": "GeomValue", - "labels": "Geometry", - "gui_element": "Geometry" - }, - { - "name": "hasGeoname", - "super": [ - "hasValue" - ], - "object": "GeonameValue", - "labels": "Geoname", - "gui_element": "Geonames" - }, - { - "name": "hasInteger", - "super": [ - "hasValue" - ], - "object": "IntValue", - "labels": "Integer", - "gui_element": "Spinbox", - "gui_attributes": { - "max": -1.0, - "min": 0.0 - } - }, - { - "name": "hasInterval", - "super": [ - "hasValue" - ], - "object": "IntervalValue", - "labels": "Time interval", - "gui_element": "Interval" - }, - { - "name": "hasListItem", - "super": [ - "hasValue" - ], - "object": "ListValue", - "labels": "List element", - "gui_element": "List", - "gui_attributes": { - "hlist": "treelistroot" - } - }, - { - "name": "hasOtherListItem", - "super": [ - "hasValue" - ], - "object": "ListValue", - "labels": "Other list element", - "gui_element": "List", - "gui_attributes": { - "hlist": "otherTreeList" - } - }, - { - "name": "hasOtherThing", - "super": [ - "hasLinkTo" - ], - "object": ":Thing", - "labels": "Another thing", - "gui_element": "Searchbox" - }, - { - "name": "hasPictureTitle", - "super": [ - "hasValue" - ], - "object": "TextValue", - "labels": "Title", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - }, - { - "name": "hasRichtext", - "super": [ - "hasValue" - ], - "object": "TextValue", - "labels": "Text", - "gui_element": "Richtext" - }, - { - "name": "hasText", - "super": [ - "hasValue" - ], - "object": "TextValue", - "labels": "Text", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - }, - { - "name": "hasThingDocument", - "super": [ - "hasRepresentation" - ], - "object": ":ThingDocument", - "labels": "document about a thing", - "gui_element": "Searchbox" - }, - { - "name": "hasThingPicture", - "super": [ - "hasRepresentation" - ], - "object": ":ThingPicture", - "labels": "Picture of a thing", - "gui_element": "Searchbox" - }, - { - "name": "hasTimeStamp", - "super": [ - "hasValue" - ], - "object": "TimeValue", - "labels": "Timestamp", - "gui_element": "TimeStamp" - }, - { - "name": "hasUri", - "super": [ - "hasValue" - ], - "object": "UriValue", - "labels": "URI", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - }, - { - "name": "isPartOfOtherThing", - "super": [ - "isPartOf" - ], - "object": ":Thing", - "labels": "is part of", - "gui_element": "Searchbox" - }, - { - "name": "thingHasRegion", - "super": [ - "hasLinkTo" - ], - "object": "Region", - "labels": "has region", - "gui_element": "Searchbox" - } + } + ] + } + ], + "ontologies": [ + { + "name": "anything", + "label": "The anything ontology", + "properties": [ + { + "name": "hasBlueThing", + "super": [ + ":hasOtherThing" + ], + "object": ":BlueThing", + "labels": "A blue thing", + "gui_element": "Searchbox" + }, + { + "name": "hasBoolean", + "super": [ + "hasValue" + ], + "object": "BooleanValue", + "labels": "Boolean value", + "gui_element": "Checkbox" + }, + { + "name": "hasColor", + "super": [ + "hasValue" ], - "resources": [ - { - "name": "BlueThing", - "labels": "Blue thing", - "comments": "Diese Resource-Klasse beschreibt ein blaues Ding", - "super": ":Thing", - "cardinalities": [ - { - "propname": ":hasListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasRichtext", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasText", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasDate", - "cardinality": "0-n", - "gui_order": 3 - }, - { - "propname": ":hasInteger", - "cardinality": "0-n", - "gui_order": 4 - }, - { - "propname": ":hasDecimal", - "cardinality": "0-n", - "gui_order": 5 - }, - { - "propname": ":hasBoolean", - "cardinality": "0-1", - "gui_order": 6 - }, - { - "propname": ":hasUri", - "cardinality": "0-n", - "gui_order": 7 - }, - { - "propname": ":hasInterval", - "cardinality": "0-n", - "gui_order": 9 - }, - { - "propname": ":hasColor", - "cardinality": "0-n", - "gui_order": 10 - }, - { - "propname": ":hasGeometry", - "cardinality": "0-n", - "gui_order": 11 - }, - { - "propname": ":hasGeoname", - "cardinality": "0-n", - "gui_order": 12 - }, - { - "propname": ":hasThingDocument", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingDocumentValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPicture", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPictureValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasTimeStamp", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":isPartOfOtherThing", - "cardinality": "0-n", - "gui_order": 15 - }, - { - "propname": ":isPartOfOtherThingValue", - "cardinality": "0-n", - "gui_order": 15 - }, - { - "propname": ":hasBlueThingValue", - "cardinality": "0-n", - "gui_order": 16 - }, - { - "propname": ":hasBlueThing", - "cardinality": "0-n", - "gui_order": 63 - } - ] - }, - { - "name": "Thing", - "labels": "Thing", - "comments": "'The whole world is full of things, which means there's a real need for someone to go searching for them. And that's exactly what a thing-searcher does.' --Pippi Longstocking", - "super": "Resource", - "cardinalities": [ - { - "propname": ":hasListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherThing", - "cardinality": "0-n", - "gui_order": 1 - }, - { - "propname": ":hasOtherThingValue", - "cardinality": "0-n", - "gui_order": 1 - }, - { - "propname": ":hasRichtext", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasText", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasDate", - "cardinality": "0-n", - "gui_order": 3 - }, - { - "propname": ":hasInteger", - "cardinality": "0-n", - "gui_order": 4 - }, - { - "propname": ":hasDecimal", - "cardinality": "0-n", - "gui_order": 5 - }, - { - "propname": ":hasBoolean", - "cardinality": "0-1", - "gui_order": 6 - }, - { - "propname": ":hasUri", - "cardinality": "0-n", - "gui_order": 7 - }, - { - "propname": ":hasInterval", - "cardinality": "0-n", - "gui_order": 9 - }, - { - "propname": ":hasColor", - "cardinality": "0-n", - "gui_order": 10 - }, - { - "propname": ":hasGeometry", - "cardinality": "0-n", - "gui_order": 11 - }, - { - "propname": ":hasGeoname", - "cardinality": "0-n", - "gui_order": 12 - }, - { - "propname": ":hasThingDocument", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingDocumentValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPicture", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPictureValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasTimeStamp", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":isPartOfOtherThing", - "cardinality": "0-n", - "gui_order": 15 - }, - { - "propname": ":isPartOfOtherThingValue", - "cardinality": "0-n", - "gui_order": 15 - } - ] - }, - { - "name": "ThingDocument", - "labels": "Document", - "comments": "A document about a thing", - "super": "DocumentRepresentation", - "cardinalities": [ - { - "propname": ":hasDocumentTitle", - "cardinality": "0-n" - } - ] - }, - { - "name": "ThingPicture", - "labels": "Picture of a thing", - "comments": "Diese Resource-Klasse beschreibt ein Bild eines Dinges", - "super": "StillImageRepresentation", - "cardinalities": [ - { - "propname": ":hasPictureTitle", - "cardinality": "0-n" - } - ] - }, - { - "name": "ThingWithRegion", - "labels": "Thing with region", - "comments": "A thing with a region", - "super": "Resource", - "cardinalities": [ - { - "propname": ":thingHasRegion", - "cardinality": "0-n" - }, - { - "propname": ":thingHasRegionValue", - "cardinality": "0-n" - } - ] - }, - { - "name": "ThingWithRepresentation", - "labels": "Thing with representation", - "comments": "A thing with a representation", - "super": "Resource", - "cardinalities": [] - }, - { - "name": "ThingWithSeqnum", - "labels": "Thing with sequence number", - "comments": "Diese Resource-Klasse beschreibt ein Ding mit einer Sequenznummer", - "super": ":Thing", - "cardinalities": [ - { - "propname": ":hasListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherThing", - "cardinality": "0-n", - "gui_order": 1 - }, - { - "propname": ":hasOtherThingValue", - "cardinality": "0-n", - "gui_order": 1 - }, - { - "propname": ":hasRichtext", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasText", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": ":hasDate", - "cardinality": "0-n", - "gui_order": 3 - }, - { - "propname": ":hasInteger", - "cardinality": "0-n", - "gui_order": 4 - }, - { - "propname": ":hasDecimal", - "cardinality": "0-n", - "gui_order": 5 - }, - { - "propname": ":hasBoolean", - "cardinality": "0-1", - "gui_order": 6 - }, - { - "propname": ":hasUri", - "cardinality": "0-n", - "gui_order": 7 - }, - { - "propname": ":hasInterval", - "cardinality": "0-n", - "gui_order": 9 - }, - { - "propname": ":hasColor", - "cardinality": "0-n", - "gui_order": 10 - }, - { - "propname": ":hasGeometry", - "cardinality": "0-n", - "gui_order": 11 - }, - { - "propname": ":hasGeoname", - "cardinality": "0-n", - "gui_order": 12 - }, - { - "propname": ":hasThingDocument", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingDocumentValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPicture", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasThingPictureValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":hasTimeStamp", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": ":isPartOfOtherThing", - "cardinality": "0-n", - "gui_order": 15 - }, - { - "propname": ":isPartOfOtherThingValue", - "cardinality": "0-n", - "gui_order": 15 - } - ] - }, - { - "name": "TrivialThing", - "labels": "Trivial thing", - "comments": "Diese Resource-Klasse beschreibt ein unbedeutendes Ding", - "super": "Resource", - "cardinalities": [] - } + "object": "ColorValue", + "labels": "Color", + "gui_element": "Colorpicker" + }, + { + "name": "hasDate", + "super": [ + "hasValue" + ], + "object": "DateValue", + "labels": "Date", + "gui_element": "Date" + }, + { + "name": "hasDecimal", + "super": [ + "hasValue" + ], + "object": "DecimalValue", + "labels": "Decimal number", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + }, + { + "name": "hasDocumentTitle", + "super": [ + "hasValue" + ], + "object": "TextValue", + "labels": "document title", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + }, + { + "name": "hasGeometry", + "super": [ + "hasValue" + ], + "object": "GeomValue", + "labels": "Geometry", + "gui_element": "Geometry" + }, + { + "name": "hasGeoname", + "super": [ + "hasValue" + ], + "object": "GeonameValue", + "labels": "Geoname", + "gui_element": "Geonames" + }, + { + "name": "hasInteger", + "super": [ + "hasValue" + ], + "object": "IntValue", + "labels": "Integer", + "gui_element": "Spinbox", + "gui_attributes": { + "max": -1.0, + "min": 0.0 + } + }, + { + "name": "hasInterval", + "super": [ + "hasValue" + ], + "object": "IntervalValue", + "labels": "Time interval", + "gui_element": "Interval" + }, + { + "name": "hasListItem", + "super": [ + "hasValue" + ], + "object": "ListValue", + "labels": "List element", + "gui_element": "List", + "gui_attributes": { + "hlist": "treelistroot" + } + }, + { + "name": "hasOtherListItem", + "super": [ + "hasValue" + ], + "object": "ListValue", + "labels": "Other list element", + "gui_element": "List", + "gui_attributes": { + "hlist": "otherTreeList" + } + }, + { + "name": "hasOtherThing", + "super": [ + "hasLinkTo" + ], + "object": ":Thing", + "labels": "Another thing", + "gui_element": "Searchbox" + }, + { + "name": "hasPictureTitle", + "super": [ + "hasValue" + ], + "object": "TextValue", + "labels": "Title", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + }, + { + "name": "hasRichtext", + "super": [ + "hasValue" + ], + "object": "TextValue", + "labels": "Text", + "gui_element": "Richtext" + }, + { + "name": "hasText", + "super": [ + "hasValue" + ], + "object": "TextValue", + "labels": "Text", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + }, + { + "name": "hasThingDocument", + "super": [ + "hasRepresentation" + ], + "object": ":ThingDocument", + "labels": "document about a thing", + "gui_element": "Searchbox" + }, + { + "name": "hasThingPicture", + "super": [ + "hasRepresentation" + ], + "object": ":ThingPicture", + "labels": "Picture of a thing", + "gui_element": "Searchbox" + }, + { + "name": "hasTimeStamp", + "super": [ + "hasValue" + ], + "object": "TimeValue", + "labels": "Timestamp", + "gui_element": "TimeStamp" + }, + { + "name": "hasUri", + "super": [ + "hasValue" + ], + "object": "UriValue", + "labels": "URI", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + }, + { + "name": "isPartOfOtherThing", + "super": [ + "isPartOf" + ], + "object": ":Thing", + "labels": "is part of", + "gui_element": "Searchbox" + }, + { + "name": "thingHasRegion", + "super": [ + "hasLinkTo" + ], + "object": "Region", + "labels": "has region", + "gui_element": "Searchbox" + } + ], + "resources": [ + { + "name": "BlueThing", + "labels": "Blue thing", + "comments": "Diese Resource-Klasse beschreibt ein blaues Ding", + "super": ":Thing", + "cardinalities": [ + { + "propname": ":hasListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasRichtext", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasText", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasDate", + "cardinality": "0-n", + "gui_order": 3 + }, + { + "propname": ":hasInteger", + "cardinality": "0-n", + "gui_order": 4 + }, + { + "propname": ":hasDecimal", + "cardinality": "0-n", + "gui_order": 5 + }, + { + "propname": ":hasBoolean", + "cardinality": "0-1", + "gui_order": 6 + }, + { + "propname": ":hasUri", + "cardinality": "0-n", + "gui_order": 7 + }, + { + "propname": ":hasInterval", + "cardinality": "0-n", + "gui_order": 9 + }, + { + "propname": ":hasColor", + "cardinality": "0-n", + "gui_order": 10 + }, + { + "propname": ":hasGeometry", + "cardinality": "0-n", + "gui_order": 11 + }, + { + "propname": ":hasGeoname", + "cardinality": "0-n", + "gui_order": 12 + }, + { + "propname": ":hasThingDocument", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingDocumentValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPicture", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPictureValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasTimeStamp", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":isPartOfOtherThing", + "cardinality": "0-n", + "gui_order": 15 + }, + { + "propname": ":isPartOfOtherThingValue", + "cardinality": "0-n", + "gui_order": 15 + }, + { + "propname": ":hasBlueThingValue", + "cardinality": "0-n", + "gui_order": 16 + }, + { + "propname": ":hasBlueThing", + "cardinality": "0-n", + "gui_order": 63 + } ] - }, - { - "name": "minimal", - "label": "A minimal ontology", - "properties": [ - { - "name": "hasName", - "super": [ - "hasValue" - ], - "object": "TextValue", - "labels": "has name", - "gui_element": "SimpleText", - "gui_attributes": { - "maxlength": "255", - "size": 80 - } - } + }, + { + "name": "Thing", + "labels": "Thing", + "comments": "'The whole world is full of things, which means there's a real need for someone to go searching for them. And that's exactly what a thing-searcher does.' --Pippi Longstocking", + "super": "Resource", + "cardinalities": [ + { + "propname": ":hasListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherThing", + "cardinality": "0-n", + "gui_order": 1 + }, + { + "propname": ":hasOtherThingValue", + "cardinality": "0-n", + "gui_order": 1 + }, + { + "propname": ":hasRichtext", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasText", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasDate", + "cardinality": "0-n", + "gui_order": 3 + }, + { + "propname": ":hasInteger", + "cardinality": "0-n", + "gui_order": 4 + }, + { + "propname": ":hasDecimal", + "cardinality": "0-n", + "gui_order": 5 + }, + { + "propname": ":hasBoolean", + "cardinality": "0-1", + "gui_order": 6 + }, + { + "propname": ":hasUri", + "cardinality": "0-n", + "gui_order": 7 + }, + { + "propname": ":hasInterval", + "cardinality": "0-n", + "gui_order": 9 + }, + { + "propname": ":hasColor", + "cardinality": "0-n", + "gui_order": 10 + }, + { + "propname": ":hasGeometry", + "cardinality": "0-n", + "gui_order": 11 + }, + { + "propname": ":hasGeoname", + "cardinality": "0-n", + "gui_order": 12 + }, + { + "propname": ":hasThingDocument", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingDocumentValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPicture", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPictureValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasTimeStamp", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":isPartOfOtherThing", + "cardinality": "0-n", + "gui_order": 15 + }, + { + "propname": ":isPartOfOtherThingValue", + "cardinality": "0-n", + "gui_order": 15 + } + ] + }, + { + "name": "ThingDocument", + "labels": "Document", + "comments": "A document about a thing", + "super": "DocumentRepresentation", + "cardinalities": [ + { + "propname": ":hasDocumentTitle", + "cardinality": "0-n" + } + ] + }, + { + "name": "ThingPicture", + "labels": "Picture of a thing", + "comments": "Diese Resource-Klasse beschreibt ein Bild eines Dinges", + "super": "StillImageRepresentation", + "cardinalities": [ + { + "propname": ":hasPictureTitle", + "cardinality": "0-n" + } + ] + }, + { + "name": "ThingWithRegion", + "labels": "Thing with region", + "comments": "A thing with a region", + "super": "Resource", + "cardinalities": [ + { + "propname": ":thingHasRegion", + "cardinality": "0-n" + }, + { + "propname": ":thingHasRegionValue", + "cardinality": "0-n" + } + ] + }, + { + "name": "ThingWithRepresentation", + "labels": "Thing with representation", + "comments": "A thing with a representation", + "super": "Resource", + "cardinalities": [] + }, + { + "name": "ThingWithSeqnum", + "labels": "Thing with sequence number", + "comments": "Diese Resource-Klasse beschreibt ein Ding mit einer Sequenznummer", + "super": ":Thing", + "cardinalities": [ + { + "propname": ":hasListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherThing", + "cardinality": "0-n", + "gui_order": 1 + }, + { + "propname": ":hasOtherThingValue", + "cardinality": "0-n", + "gui_order": 1 + }, + { + "propname": ":hasRichtext", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasText", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": ":hasDate", + "cardinality": "0-n", + "gui_order": 3 + }, + { + "propname": ":hasInteger", + "cardinality": "0-n", + "gui_order": 4 + }, + { + "propname": ":hasDecimal", + "cardinality": "0-n", + "gui_order": 5 + }, + { + "propname": ":hasBoolean", + "cardinality": "0-1", + "gui_order": 6 + }, + { + "propname": ":hasUri", + "cardinality": "0-n", + "gui_order": 7 + }, + { + "propname": ":hasInterval", + "cardinality": "0-n", + "gui_order": 9 + }, + { + "propname": ":hasColor", + "cardinality": "0-n", + "gui_order": 10 + }, + { + "propname": ":hasGeometry", + "cardinality": "0-n", + "gui_order": 11 + }, + { + "propname": ":hasGeoname", + "cardinality": "0-n", + "gui_order": 12 + }, + { + "propname": ":hasThingDocument", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingDocumentValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPicture", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasThingPictureValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":hasTimeStamp", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": ":isPartOfOtherThing", + "cardinality": "0-n", + "gui_order": 15 + }, + { + "propname": ":isPartOfOtherThingValue", + "cardinality": "0-n", + "gui_order": 15 + } + ] + }, + { + "name": "TrivialThing", + "labels": "Trivial thing", + "comments": "Diese Resource-Klasse beschreibt ein unbedeutendes Ding", + "super": "Resource", + "cardinalities": [] + } + ] + }, + { + "name": "minimal", + "label": "A minimal ontology", + "properties": [ + { + "name": "hasName", + "super": [ + "hasValue" ], - "resources": [] - }, - { - "name": "something", - "label": "The something ontology", - "properties": [ - { - "name": "hasOtherSomething", - "super": [ - "anything:hasOtherThing" - ], - "object": ":Something", - "labels": "has other something", - "gui_element": "Searchbox" - } + "object": "TextValue", + "labels": "has name", + "gui_element": "SimpleText", + "gui_attributes": { + "maxlength": "255", + "size": 80 + } + } + ], + "resources": [] + }, + { + "name": "something", + "label": "The something ontology", + "properties": [ + { + "name": "hasOtherSomething", + "super": [ + "anything:hasOtherThing" ], - "resources": [ - { - "name": "Something", - "labels": "Something", - "comments": "A something is a thing.", - "super": "anything:Thing", - "cardinalities": [ - { - "propname": "anything:hasListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": "anything:hasOtherListItem", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherSomething", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": ":hasOtherSomethingValue", - "cardinality": "0-n", - "gui_order": 0 - }, - { - "propname": "anything:hasRichtext", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": "anything:hasText", - "cardinality": "0-n", - "gui_order": 2 - }, - { - "propname": "anything:hasDate", - "cardinality": "0-n", - "gui_order": 3 - }, - { - "propname": "anything:hasInteger", - "cardinality": "0-n", - "gui_order": 4 - }, - { - "propname": "anything:hasDecimal", - "cardinality": "0-n", - "gui_order": 5 - }, - { - "propname": "anything:hasBoolean", - "cardinality": "0-1", - "gui_order": 6 - }, - { - "propname": "anything:hasUri", - "cardinality": "0-n", - "gui_order": 7 - }, - { - "propname": "anything:hasInterval", - "cardinality": "0-n", - "gui_order": 9 - }, - { - "propname": "anything:hasColor", - "cardinality": "0-n", - "gui_order": 10 - }, - { - "propname": "anything:hasGeometry", - "cardinality": "0-n", - "gui_order": 11 - }, - { - "propname": "anything:hasGeoname", - "cardinality": "0-n", - "gui_order": 12 - }, - { - "propname": "anything:hasThingDocument", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": "anything:hasThingDocumentValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": "anything:hasThingPicture", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": "anything:hasThingPictureValue", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": "anything:hasTimeStamp", - "cardinality": "0-n", - "gui_order": 13 - }, - { - "propname": "anything:isPartOfOtherThing", - "cardinality": "0-n", - "gui_order": 15 - }, - { - "propname": "anything:isPartOfOtherThingValue", - "cardinality": "0-n", - "gui_order": 15 - } - ] - } + "object": ":Something", + "labels": "has other something", + "gui_element": "Searchbox" + } + ], + "resources": [ + { + "name": "Something", + "labels": "Something", + "comments": "A something is a thing.", + "super": "anything:Thing", + "cardinalities": [ + { + "propname": "anything:hasListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": "anything:hasOtherListItem", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherSomething", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": ":hasOtherSomethingValue", + "cardinality": "0-n", + "gui_order": 0 + }, + { + "propname": "anything:hasRichtext", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": "anything:hasText", + "cardinality": "0-n", + "gui_order": 2 + }, + { + "propname": "anything:hasDate", + "cardinality": "0-n", + "gui_order": 3 + }, + { + "propname": "anything:hasInteger", + "cardinality": "0-n", + "gui_order": 4 + }, + { + "propname": "anything:hasDecimal", + "cardinality": "0-n", + "gui_order": 5 + }, + { + "propname": "anything:hasBoolean", + "cardinality": "0-1", + "gui_order": 6 + }, + { + "propname": "anything:hasUri", + "cardinality": "0-n", + "gui_order": 7 + }, + { + "propname": "anything:hasInterval", + "cardinality": "0-n", + "gui_order": 9 + }, + { + "propname": "anything:hasColor", + "cardinality": "0-n", + "gui_order": 10 + }, + { + "propname": "anything:hasGeometry", + "cardinality": "0-n", + "gui_order": 11 + }, + { + "propname": "anything:hasGeoname", + "cardinality": "0-n", + "gui_order": 12 + }, + { + "propname": "anything:hasThingDocument", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": "anything:hasThingDocumentValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": "anything:hasThingPicture", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": "anything:hasThingPictureValue", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": "anything:hasTimeStamp", + "cardinality": "0-n", + "gui_order": 13 + }, + { + "propname": "anything:isPartOfOtherThing", + "cardinality": "0-n", + "gui_order": 15 + }, + { + "propname": "anything:isPartOfOtherThingValue", + "cardinality": "0-n", + "gui_order": 15 + } ] - } - ] - } + } + ] + } + ] + } } \ No newline at end of file diff --git a/testdata/test-data.xml b/testdata/test-data.xml index 89535779a..3f097fdcf 100644 --- a/testdata/test-data.xml +++ b/testdata/test-data.xml @@ -1,6 +1,11 @@ - + + + RV @@ -47,18 +52,23 @@ Nochmals einen einfachen Text - This is bold and string text! + This is + bold and + string + + text! + - + true - JULIAN:BCE:0700:BCE:0600 + JULIAN:BCE:0700:BCE:0600 4711 @@ -69,14 +79,14 @@ { - "status":"active", - "lineColor":"#ff3333", - "lineWidth":2, - "points":[ - {"x":0.08098591549295775,"y":0.16741071428571427}, - {"x":0.7394366197183099,"y":0.7299107142857143}], - "type":"rectangle", - "original_index":0 + "status":"active", + "lineColor":"#ff3333", + "lineWidth":2, + "points":[ + {"x":0.08098591549295775,"y":0.16741071428571427}, + {"x":0.7394366197183099,"y":0.7299107142857143}], + "type":"rectangle", + "original_index":0 } @@ -87,10 +97,10 @@ 12.5:14.2 - #00ff00 + #00ff00 - b2 + b2 obj_0000 @@ -186,7 +196,6 @@ - + diff --git a/testdata/test-onto.json b/testdata/test-onto.json index 8caa5cce5..83635cecd 100644 --- a/testdata/test-onto.json +++ b/testdata/test-onto.json @@ -3,6 +3,7 @@ "foaf": "http://xmlns.com/foaf/0.1/", "dcterms": "http://purl.org/dc/terms/" }, + "$schema": "https://raw.githubusercontent.com/dasch-swiss/dsp-tools/main/knora/dsplib/utils/knora-schema.json", "project": { "shortcode": "4123", "shortname": "tp", @@ -102,7 +103,9 @@ "hasValue" ], "object": "TextValue", - "labels": {"en": "Text"}, + "labels": { + "en": "Text" + }, "gui_element": "SimpleText", "gui_attributes": { "maxlength": "255", @@ -115,7 +118,9 @@ "hasValue" ], "object": "TextValue", - "labels": {"en": "Text"}, + "labels": { + "en": "Text" + }, "gui_element": "Richtext" }, { @@ -124,7 +129,9 @@ "hasValue" ], "object": "UriValue", - "labels": {"en": "URI"}, + "labels": { + "en": "URI" + }, "gui_element": "SimpleText", "gui_attributes": { "maxlength": "255", @@ -137,7 +144,9 @@ "hasValue" ], "object": "BooleanValue", - "labels": {"en": "Boolean value"}, + "labels": { + "en": "Boolean value" + }, "gui_element": "Checkbox" }, { @@ -146,7 +155,9 @@ "hasValue" ], "object": "DateValue", - "labels": {"en": "Date"}, + "labels": { + "en": "Date" + }, "gui_element": "Date" }, { @@ -155,7 +166,9 @@ "hasValue" ], "object": "IntValue", - "labels": {"en": "Integer"}, + "labels": { + "en": "Integer" + }, "gui_element": "Spinbox", "gui_attributes": { "max": -1.0, @@ -168,7 +181,9 @@ "hasValue" ], "object": "DecimalValue", - "labels": {"en": "Decimal number"}, + "labels": { + "en": "Decimal number" + }, "gui_element": "SimpleText", "gui_attributes": { "maxlength": "255", @@ -181,7 +196,9 @@ "hasValue" ], "object": "GeomValue", - "labels": { "en": "Geometry" }, + "labels": { + "en": "Geometry" + }, "gui_element": "Geometry" }, { @@ -190,7 +207,9 @@ "hasValue" ], "object": "GeonameValue", - "labels": {"en": "Geoname"}, + "labels": { + "en": "Geoname" + }, "gui_element": "Geonames" }, { @@ -199,7 +218,9 @@ "hasValue" ], "object": "IntervalValue", - "labels": {"en": "Time interval"}, + "labels": { + "en": "Time interval" + }, "gui_element": "Interval" }, { @@ -208,7 +229,9 @@ "hasValue" ], "object": "ColorValue", - "labels": {"en": "Color"}, + "labels": { + "en": "Color" + }, "gui_element": "Colorpicker" }, { @@ -217,7 +240,9 @@ "hasValue" ], "object": "ListValue", - "labels": {"en": "List element"}, + "labels": { + "en": "List element" + }, "gui_element": "List", "gui_attributes": { "hlist": "testlist" @@ -229,7 +254,9 @@ "hasLinkTo" ], "object": "Region", - "labels": {"en": "has region"}, + "labels": { + "en": "has region" + }, "gui_element": "Searchbox" }, { @@ -238,7 +265,9 @@ "hasLinkTo" ], "object": ":TestThing2", - "labels": {"en": "Another thing"}, + "labels": { + "en": "Another thing" + }, "gui_element": "Searchbox" } ], @@ -327,7 +356,7 @@ ] }, { - "name": "TestThing2", + "name": "TestThing2", "super": "Resource", "labels": { "en": "Another Test Thing" @@ -344,7 +373,7 @@ ] }, { - "name": "CompoundThing", + "name": "CompoundThing", "super": "Resource", "labels": { "en": "A Compound Thing" @@ -361,7 +390,7 @@ ] }, { - "name": "ImageThing", + "name": "ImageThing", "super": "StillImageRepresentation", "labels": { "en": "An Image Thing" @@ -378,7 +407,7 @@ ] }, { - "name": "AudioThing", + "name": "AudioThing", "super": "AudioRepresentation", "labels": { "en": "An Audio Thing" @@ -395,7 +424,7 @@ ] }, { - "name": "MovieThing", + "name": "MovieThing", "super": "MovingImageRepresentation", "labels": { "en": "An Movie Thing" @@ -412,7 +441,7 @@ ] }, { - "name": "DocumentThing", + "name": "DocumentThing", "super": "DocumentRepresentation", "labels": { "en": "A Document Thing" @@ -429,7 +458,7 @@ ] }, { - "name": "ZipThing", + "name": "ZipThing", "super": "DocumentRepresentation", "labels": { "en": "A ZIP Thing" @@ -446,7 +475,7 @@ ] }, { - "name": "TextThing", + "name": "TextThing", "super": "TextRepresentation", "labels": { "en": "A Text Thing" @@ -463,7 +492,7 @@ ] }, { - "name": "PartOfThing", + "name": "PartOfThing", "super": "StillImageRepresentation", "labels": { "en": "A Thing having a partOf and seqnum property"