diff --git a/knora/dsplib/schemas/lists-only.json b/knora/dsplib/schemas/lists-only.json index f0987f617..fad4b526a 100644 --- a/knora/dsplib/schemas/lists-only.json +++ b/knora/dsplib/schemas/lists-only.json @@ -11,18 +11,7 @@ "type": "string" } }, - "additionalProperties": false - }, - "label": { - "$ref": "#/definitions/langstring" - }, - "comment": { - "type": "object", - "patternProperties": { - "^(en|de|fr|it|rm)$": { - "type": "string" - } - }, + "minProperties": 1, "additionalProperties": false }, "node": { @@ -32,29 +21,17 @@ "type": "string" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "nodes": { + "type": "array", "minItems": 1, - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/node" - } - }, - { - "type": "object", - "$ref": "#/definitions/excelfileref" - }, - { - "type": "object", - "$ref": "#/definitions/excelfolderref" - } - ] + "items": { + "$ref": "#/definitions/node" + } } }, "required": [ @@ -63,27 +40,6 @@ ], "additionalProperties": false }, - "excelfileref": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "worksheet": { - "type": "string" - }, - "startrow": { - "type": "integer" - }, - "startcol": { - "type": "integer" - } - }, - "required": [ - "file", - "worksheet" - ] - }, "excelfolderref": { "type": "object", "properties": { @@ -107,10 +63,10 @@ "type": "string" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "nodes": { "oneOf": [ @@ -120,10 +76,6 @@ "$ref": "#/definitions/node" } }, - { - "type": "object", - "$ref": "#/definitions/excelfileref" - }, { "type": "object", "$ref": "#/definitions/excelfolderref" diff --git a/knora/dsplib/schemas/ontology.json b/knora/dsplib/schemas/ontology.json index 71e3de06c..fd9a68aa5 100644 --- a/knora/dsplib/schemas/ontology.json +++ b/knora/dsplib/schemas/ontology.json @@ -11,6 +11,7 @@ "type": "string" } }, + "minProperties": 1, "additionalProperties": false }, "ncname": { @@ -20,7 +21,12 @@ }, "prefixedname": { "type": "string", - "pattern": "^([a-zA-Z_][\\w.-]*)?:([-\\w]+)$", + "pattern": "^([a-zA-Z_][\\w.-]*)?:([\\w.-]+)$", + "additionalProperties": false + }, + "prefixedname_or_uri": { + "type": "string", + "pattern": "^(([a-zA-Z_][\\w.-]*)?:([\\w.-]+))|(https?://.*)$", "additionalProperties": false }, "baseresource": { @@ -38,14 +44,78 @@ "ArchiveRepresentation" ] }, - "label": { - "$ref": "#/definitions/langstring" + "super_resource": { + "type": ["string"], + "oneOf": [ + { + "$ref": "#/definitions/baseresource" + }, + { + "$ref": "#/definitions/prefixedname_or_uri" + } + ] }, - "description": { - "$ref": "#/definitions/langstring" + "super_resource_as_string_or_array": { + "oneOf": [ + { + "$ref": "#/definitions/super_resource" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/super_resource" + } + } + ] }, - "comment": { - "$ref": "#/definitions/langstring" + "baseproperty": { + "type": "string", + "enum": [ + "hasValue", + "hasLinkTo", + "hasColor", + "hasComment", + "isPartOf", + "isSequenceOf", + "hasSequenceBounds", + "hasRepresentation", + "seqnum" + ] + }, + "basevalue": { + "type": "string", + "enum": [ + "BooleanValue", + "ColorValue", + "DateValue", + "DecimalValue", + "GeonameValue", + "IntValue", + "IntervalValue", + "ListValue", + "TextValue", + "TimeValue", + "UriValue" + ] + }, + "gui_element": { + "type": "string", + "enum": [ + "Checkbox", + "Colorpicker", + "Date", + "Geonames", + "Interval", + "List", + "Radio", + "Richtext", + "Searchbox", + "SimpleText", + "Slider", + "Spinbox", + "Textarea", + "TimeStamp" + ] }, "groupdef": { "type": "string", @@ -56,47 +126,6 @@ "type": "string", "pattern": "^([a-zA-Z_][\\w.-]*)?:(member|admin)$" }, - "resourcedef": { - "type": [ - "string", - "array" - ], - "oneOf": [ - { - "$ref": "#/definitions/baseresource" - }, - { - "$ref": "#/definitions/prefixedname" - }, - { - "pattern": "^(http)(s)?://.*" - } - ], - "items": { - "$ref": "#/definitions/resourcedef" - } - }, - "excelfileref": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "worksheet": { - "type": "string" - }, - "startrow": { - "type": "integer" - }, - "startcol": { - "type": "integer" - } - }, - "required": [ - "file", - "worksheet" - ] - }, "excelfolderref": { "type": "object", "properties": { @@ -159,7 +188,7 @@ "type": "string" }, "descriptions": { - "$ref": "#/definitions/description" + "$ref": "#/definitions/langstring" }, "status": { "type": "boolean" @@ -180,29 +209,17 @@ "type": "string" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "nodes": { + "type": "array", "minItems": 1, - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/node" - } - }, - { - "type": "object", - "$ref": "#/definitions/excelfileref" - }, - { - "type": "object", - "$ref": "#/definitions/excelfolderref" - } - ] + "items": { + "$ref": "#/definitions/node" + } } }, "required": [ @@ -221,7 +238,7 @@ "type": "string" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "properties": { "type": "array", @@ -258,23 +275,10 @@ "type": "string", "oneOf": [ { - "enum": [ - "hasValue", - "hasLinkTo", - "hasColor", - "hasComment", - "isPartOf", - "isSequenceOf", - "hasSequenceBounds", - "hasRepresentation", - "seqnum" - ] - }, - { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/baseproperty" }, { - "pattern": "^(http)(s)?://.*" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -283,19 +287,7 @@ "type": "string", "oneOf": [ { - "enum": [ - "TextValue", - "ColorValue", - "DateValue", - "DecimalValue", - "GeonameValue", - "IntValue", - "BooleanValue", - "TimeValue", - "UriValue", - "IntervalValue", - "ListValue" - ] + "$ref": "#/definitions/basevalue" }, { "$ref": "#/definitions/baseresource" @@ -309,26 +301,10 @@ "$ref": "#/definitions/prefixedname" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "gui_element": { - "type": "string", - "enum": [ - "Colorpicker", - "Date", - "Geonames", - "Interval", - "TimeStamp", - "List", - "Radio", - "Richtext", - "Searchbox", - "SimpleText", - "Slider", - "Spinbox", - "Textarea", - "Checkbox" - ] + "$ref": "#/definitions/gui_element" }, "gui_attributes": { "type": "object", @@ -374,7 +350,7 @@ } }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" } }, "required": [ @@ -440,7 +416,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -473,7 +449,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -509,7 +485,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -541,7 +517,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -573,7 +549,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -605,7 +581,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -640,7 +616,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -673,7 +649,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -708,7 +684,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -740,7 +716,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -772,7 +748,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -808,7 +784,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -1092,13 +1068,13 @@ "$ref": "#/definitions/ncname" }, "super": { - "$ref": "#/definitions/resourcedef" + "$ref": "#/definitions/super_resource_as_string_or_array" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "cardinalities": { "type": "array", @@ -1123,7 +1099,7 @@ "type": "object", "patternProperties": { "^[-\\w]+$": { - "format": "uri" + "pattern": "^https?://.*" } }, "additionalProperties": false @@ -1145,7 +1121,7 @@ "type": "string" }, "descriptions": { - "$ref": "#/definitions/description" + "$ref": "#/definitions/langstring" }, "keywords": { "type": "array", @@ -1169,14 +1145,34 @@ "lists": { "type": "array", "items": { - "$ref": "#/definitions/node", - "comments": { - "$ref": "#/definitions/comment" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "labels": { + "$ref": "#/definitions/langstring" + }, + "comments": { + "$ref": "#/definitions/langstring" + }, + "nodes": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/node" + } + }, + { + "type": "object", + "$ref": "#/definitions/excelfolderref" + } + ] + } }, - "required": [ - "comments", - "nodes" - ] + "required": ["name", "labels", "comments", "nodes"], + "additionalProperties": false } }, "ontologies": { diff --git a/knora/dsplib/schemas/properties-only.json b/knora/dsplib/schemas/properties-only.json index dc16fe9a0..67dc671e4 100644 --- a/knora/dsplib/schemas/properties-only.json +++ b/knora/dsplib/schemas/properties-only.json @@ -11,23 +11,87 @@ "type": "string" } }, + "minProperties": 1, "additionalProperties": false }, "ncname": { "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "pattern": "^[a-zA-Z_][\\w.-]*$", "additionalProperties": false }, "prefixedname": { "type": "string", - "pattern": "^([a-zA-Z_][\\w.-]*)?:([-\\w]+)$", + "pattern": "^([a-zA-Z_][\\w.-]*)?:([\\w.-]+)$", "additionalProperties": false }, - "label": { - "$ref": "#/definitions/langstring" + "prefixedname_or_uri": { + "type": "string", + "pattern": "^(([a-zA-Z_][\\w.-]*)?:([\\w.-]+))|(https?://.*)$", + "additionalProperties": false + }, + "baseresource": { + "type": "string", + "enum": [ + "Resource", + "Region", + "Representation", + "StillImageRepresentation", + "TextRepresentation", + "AudioRepresentation", + "DDDRepresentation", + "DocumentRepresentation", + "MovingImageRepresentation", + "ArchiveRepresentation" + ] + }, + "baseproperty": { + "type": "string", + "enum": [ + "hasValue", + "hasLinkTo", + "hasColor", + "hasComment", + "isPartOf", + "isSequenceOf", + "hasSequenceBounds", + "hasRepresentation", + "seqnum" + ] + }, + "basevalue": { + "type": "string", + "enum": [ + "BooleanValue", + "ColorValue", + "DateValue", + "DecimalValue", + "GeonameValue", + "IntValue", + "IntervalValue", + "ListValue", + "TextValue", + "TimeValue", + "UriValue" + ] }, - "comment": { - "$ref": "#/definitions/langstring" + "gui_element": { + "type": "string", + "enum": [ + "Checkbox", + "Colorpicker", + "Date", + "Geonames", + "Interval", + "List", + "Radio", + "Richtext", + "Searchbox", + "SimpleText", + "Slider", + "Spinbox", + "Textarea", + "TimeStamp" + ] }, "property": { "type": "object", @@ -41,23 +105,10 @@ "type": "string", "oneOf": [ { - "enum": [ - "hasValue", - "hasLinkTo", - "hasColor", - "hasComment", - "isPartOf", - "isSequenceOf", - "hasSequenceBounds", - "hasRepresentation", - "seqnum" - ] - }, - { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/baseproperty" }, { - "pattern": "^(http)(s)?://.*" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -66,21 +117,10 @@ "type": "string", "oneOf": [ { - "enum": [ - "BooleanValue", - "ColorValue", - "DateValue", - "DecimalValue", - "GeonameValue", - "IntValue", - "IntervalValue", - "ListValue", - "TextValue", - "TimeValue", - "UriValue", - "Resource", - "Representation" - ] + "$ref": "#/definitions/basevalue" + }, + { + "$ref": "#/definitions/baseresource" }, { "$ref": "#/definitions/prefixedname" @@ -91,26 +131,10 @@ "$ref": "#/definitions/prefixedname" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "gui_element": { - "type": "string", - "enum": [ - "Checkbox", - "Colorpicker", - "Date", - "Geonames", - "Interval", - "List", - "Radio", - "Richtext", - "Searchbox", - "SimpleText", - "Slider", - "Spinbox", - "Textarea", - "TimeStamp" - ] + "$ref": "#/definitions/gui_element" }, "gui_attributes": { "type": "object", @@ -156,7 +180,7 @@ } }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" } }, "required": [ @@ -217,11 +241,12 @@ "oneOf": [ { "enum": [ - "hasRepresentation" + "hasRepresentation", + "hasLinkTo" ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -254,7 +279,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -290,7 +315,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -322,7 +347,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -354,7 +379,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -386,7 +411,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -421,7 +446,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -454,7 +479,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -489,7 +514,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -521,7 +546,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -553,7 +578,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } @@ -589,7 +614,7 @@ ] }, { - "$ref": "#/definitions/prefixedname" + "$ref": "#/definitions/prefixedname_or_uri" } ] } diff --git a/knora/dsplib/schemas/resources-only.json b/knora/dsplib/schemas/resources-only.json index 5b2f0531d..60c7f1575 100644 --- a/knora/dsplib/schemas/resources-only.json +++ b/knora/dsplib/schemas/resources-only.json @@ -11,52 +11,60 @@ "type": "string" } }, + "minProperties": 1, "additionalProperties": false }, "ncname": { "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "pattern": "^[a-zA-Z_][\\w.-]*$", "additionalProperties": false }, "prefixedname": { "type": "string", - "pattern": "^([a-zA-Z_][\\w.-]*)?:([-\\w]+)$", + "pattern": "^([a-zA-Z_][\\w.-]*)?:([\\w.-]+)$", "additionalProperties": false }, - "label": { - "$ref": "#/definitions/langstring" - }, - "comment": { - "$ref": "#/definitions/langstring" + "baseresource": { + "type": "string", + "enum": [ + "Resource", + "Region", + "Representation", + "StillImageRepresentation", + "TextRepresentation", + "AudioRepresentation", + "DDDRepresentation", + "DocumentRepresentation", + "MovingImageRepresentation", + "ArchiveRepresentation" + ] }, - "resourcedef": { - "type": [ - "string", - "array" - ], + "super_resource": { + "type": ["string"], "oneOf": [ { - "enum": [ - "Resource", - "StillImageRepresentation", - "TextRepresentation", - "AudioRepresentation", - "DDDRepresentation", - "DocumentRepresentation", - "MovingImageRepresentation", - "ArchiveRepresentation" - ] + "$ref": "#/definitions/baseresource" }, { "$ref": "#/definitions/prefixedname" }, { - "pattern": "^(http)(s)?://.*" + "pattern": "^https?://.*" } - ], - "items": { - "$ref": "#/definitions/resourcedef" - } + ] + }, + "super_resource_as_string_or_array": { + "oneOf": [ + { + "$ref": "#/definitions/super_resource" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/super_resource" + } + } + ] }, "resource": { "type": "object", @@ -65,13 +73,13 @@ "$ref": "#/definitions/ncname" }, "super": { - "$ref": "#/definitions/resourcedef" + "$ref": "#/definitions/super_resource_as_string_or_array" }, "labels": { - "$ref": "#/definitions/label" + "$ref": "#/definitions/langstring" }, "comments": { - "$ref": "#/definitions/comment" + "$ref": "#/definitions/langstring" }, "cardinalities": { "type": "array", diff --git a/test/unittests/test_excel_to_json_properties.py b/test/unittests/test_excel_to_json_properties.py index 94722b4a8..5f057a26c 100644 --- a/test/unittests/test_excel_to_json_properties.py +++ b/test/unittests/test_excel_to_json_properties.py @@ -33,23 +33,31 @@ def test_excel2properties(self) -> None: excel_names = ["correspondsToGenericAnthroponym", "hasAnthroponym", "hasGender", "isDesignatedAs", "hasTitle", "hasStatus", "hasLifeYearAmount", "hasBirthDate", "hasRepresentation", "hasRemarks", "hasTerminusPostQuem", "hasGND", "hasColor", "hasDecimal", "hasTime", - "hasInterval", "hasBoolean", "hasGeoname", "partOfDocument"] + "hasInterval", "hasBoolean", "hasGeoname", "partOfDocument", "linkstoRegion", "hasLinkToImage", + "hasLinkToResource", "hasLinkToArchiveRepresentation", "hasLinkToMovingImageRepesentation", + "hasLinkToAudioRepesentation"] excel_supers = [["hasLinkTo"], ["hasValue", "dcterms:creator"], ["hasValue"], ["hasValue"], ["hasLinkTo"], ["hasValue"], ["hasValue"], ["hasValue"], ["hasRepresentation"], ["hasValue", "dcterms:description"], ["hasValue"], ["hasValue"], ["hasColor"], ["hasValue"], - ["hasValue"], ["hasSequenceBounds"], ["hasValue"], ["hasValue"], ["isPartOf"]] + ["hasValue"], ["hasSequenceBounds"], ["hasValue"], ["hasValue"], ["isPartOf"], ["hasLinkTo"], + ["hasLinkTo"], ["hasLinkTo"], ["hasLinkTo"], ["hasLinkTo"], ["hasLinkTo"]] excel_objects = [":GenericAnthroponym", "TextValue", "ListValue", "ListValue", ":Titles", "ListValue", "IntValue", "DateValue", "Representation", "TextValue", "DateValue", "UriValue", "ColorValue", "DecimalValue", "TimeValue", "IntervalValue", "BooleanValue", "GeonameValue", - ":Documents"] + ":Documents", "Region", "StillImageRepresentation", "Resource", "ArchiveRepresentation", + "MovingImageRepresentation", "AudioRepresentation"] excel_labels = dict() + # there are also labels in other languages, but they are not tested excel_labels["de"] = ["", "only German", "", "", "", "", "", "", "hat eine Multimediadatei", "", "", "GND", "Farbe", "Dezimalzahl", "Zeit", - "Zeitintervall", "Bool'sche Variable", "Link zu Geonames", "ist Teil eines Dokuments"] - excel_labels["it"] = ["", "", "", "only Italian", "", "", "", "", "", "", "", "GND", "", "", "", "", "", "", ""] + "Zeitintervall", "Bool'sche Variable", "Link zu Geonames", "ist Teil eines Dokuments", + "", "", "", "", "", ""] + excel_labels["it"] = ["", "", "", "only Italian", "", "", "", "", "", "", "", "GND", "", "", "", "", "", "", "", + "", "", "", "", "", ""] excel_comments = dict() + # there are also comments in other languages, but they are not tested excel_comments["comment_fr"] = ["J'avais déjà examiné plusieurs propriétés quand, un jour, le notaire, qui me " "donnait des indications nécessaires pour une de mes explorations, me dit :", "Un étrange hasard m'a mis en possession de ce journal.", @@ -59,18 +67,20 @@ def test_excel2properties(self) -> None: "Un étrange hasard m'a mis en possession de ce journal.", "", "", "only French", "", "", "J'avais déjà examiné plusieurs propriétés quand, un jour, le notaire, qui me " "donnait des indications nécessaires pour une de mes explorations, me dit :", - "Gemeinsame Normdatei", "", "Chiffre décimale", "Temps", "", "", "", ""] + "Gemeinsame Normdatei", "", "Chiffre décimale", "Temps", "", "", "", "", "", "", "", "", + "", ""] excel_comments["comment_it"] = ["Avevo già visto diverse proprietà quando un giorno il notaio,", "Uno strano caso mi mise in possesso di questo diario.", "Non ne so nulla; ma se volete vederla, signore, eccovi le indicazioni precise per trovarla.", "Dovrete organizzare l'affare con il curato del villaggio di --\".", "Uno strano caso mi mise in possesso di questo diario.", "", "", "", "", "", "Avevo già visto diverse proprietà quando un giorno il notaio,", - "Gemeinsame Normdatei", "", "", "", "", "", "", ""] + "Gemeinsame Normdatei", "", "", "", "", "", "", "", "", "", "", "", "", ""] excel_gui_elements = ["Searchbox", "Richtext", "List", "Radio", "Searchbox", "List", "Spinbox", "Date", "Searchbox", "Textarea", "Date", "SimpleText", "Colorpicker", "Slider", - "TimeStamp", "Interval", "Checkbox", "Geonames", "Searchbox"] + "TimeStamp", "Interval", "Checkbox", "Geonames", "Searchbox", "Searchbox", "Searchbox", + "Searchbox", "Searchbox", "Searchbox", "Searchbox"] excel_gui_attributes_hasGender = {"hlist": "gender"} excel_gui_attributes_hasGND = {"size": 100} diff --git a/testdata/excel2json-expected-output.json b/testdata/excel2json-expected-output.json index 77b1b0ffb..c8f3ecba1 100644 --- a/testdata/excel2json-expected-output.json +++ b/testdata/excel2json-expected-output.json @@ -464,6 +464,75 @@ "de": "ist Teil eines Dokuments" }, "gui_element": "Searchbox" + }, + { + "name": "linkstoRegion", + "super": [ + "hasLinkTo" + ], + "object": "Region", + "labels": { + "en": "Links to a region of an image" + }, + "gui_element": "Searchbox", + "gui_attributes": { + "numprops": 1 + } + }, + { + "name": "hasLinkToImage", + "super": [ + "hasLinkTo" + ], + "object": "StillImageRepresentation", + "labels": { + "en": "link to image" + }, + "gui_element": "Searchbox" + }, + { + "name": "hasLinkToResource", + "super": [ + "hasLinkTo" + ], + "object": "Resource", + "labels": { + "en": "hasLinkToResource" + }, + "gui_element": "Searchbox" + }, + { + "name": "hasLinkToArchiveRepresentation", + "super": [ + "hasLinkTo" + ], + "object": "ArchiveRepresentation", + "labels": { + "en": "hasLinkToArchiveRepresentation" + }, + "gui_element": "Searchbox" + }, + { + "name": "hasLinkToMovingImageRepesentation", + "super": [ + "hasLinkTo" + ], + "object": "MovingImageRepresentation", + "labels": { + "en": "hasLinkToMovingImageRepesentation" + }, + "gui_element": "Searchbox" + }, + { + "name": "hasLinkToAudioRepesentation", + "super": [ + "hasLinkTo" + ], + "object": "AudioRepresentation", + "labels": { + "en": "hasLinkToAudioRepesentation" + }, + "gui_element": "Searchbox" } ], "resources": [ diff --git a/testdata/excel2json_files/test-name (test_label)/properties.xlsx b/testdata/excel2json_files/test-name (test_label)/properties.xlsx index 3ca1d79f0..3e9c61a4b 100644 Binary files a/testdata/excel2json_files/test-name (test_label)/properties.xlsx and b/testdata/excel2json_files/test-name (test_label)/properties.xlsx differ diff --git a/testdata/test-project-systematic.json b/testdata/test-project-systematic.json index c8e0f659b..0267b14ba 100644 --- a/testdata/test-project-systematic.json +++ b/testdata/test-project-systematic.json @@ -898,7 +898,10 @@ "resources": [ { "name": "TestThingPermissions", - "super": "Resource", + "super": [ + "Resource", + "http://xmlns.com/foaf/0.1/#term_name" + ], "labels": { "en": "Test thing for permissions without object" },