diff --git a/src/test/resources/schemas/describedBy.json b/src/test/resources/schemas/describedBy.json index b94112d94..15d1d48d5 100644 --- a/src/test/resources/schemas/describedBy.json +++ b/src/test/resources/schemas/describedBy.json @@ -21,76 +21,6 @@ "title": "Label of the description", "type": "string" }, - "dateCreated": { - "title": "Creation date of the metadata record", - "type": "string", - "pattern": "^(((\\d{4})(0[13578]|10|12)(0[1-9]|[12][0-9]|3[01]))|((\\d{4})(0[469]|11)([0][1-9]|[12][0-9]|30))|((\\d{4})(02)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(02)(29))|(([13579][26]00) (02)(29))|(([0-9][0-9][0][48])(02)(29))|(([0-9][0-9][2468][048])(02)(29))|(([0-9][0-9][13579][26])(02)(29))|(00000000)|(88888888)|(99999999))?$" - }, - "dateModified": { - "title": "Modification date of the metadata record", - "type": "string", - "pattern": "^(((\\d{4})(0[13578]|10|12)(0[1-9]|[12][0-9]|3[01]))|((\\d{4})(0[469]|11)([0][1-9]|[12][0-9]|30))|((\\d{4})(02)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(02)(29))|(([13579][26]00) (02)(29))|(([0-9][0-9][0][48])(02)(29))|(([0-9][0-9][2468][048])(02)(29))|(([0-9][0-9][13579][26])(02)(29))|(00000000)|(88888888)|(99999999))?$" - }, - "provider": { - "title": "Provider of the metadata record", - "type": "object", - "properties": { - "id": { - "title": "lobid-organisations URI", - "type": "string", - "format": "uri", - "pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}" - }, - "label": { - "title": "label", - "type": "string" - } - }, - "required": [ - "id", - "label" - ] - }, - "sourceOrganization": { - "title": "Organization that added the record to the union catalog", - "type": "object", - "properties": { - "id": { - "title": "lobid-organisations URI", - "type": "string", - "format": "uri", - "pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}" - }, - "label": { - "title": "label", - "type": "string" - } - }, - "required": [ - "id", - "label" - ] - }, - "modifiedBy": { - "title": "Organization from which the record was last modified", - "type": "object", - "properties": { - "id": { - "title": "lobid-organisations URI", - "type": "string", - "format": "uri", - "pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}" - }, - "label": { - "title": "label", - "type": "string" - } - }, - "required": [ - "id", - "label" - ] - }, "inDataset": { "title": "Link to the dataset that contains the record", "type": "object", @@ -154,6 +84,18 @@ "type": "string", "format": "uri" }, + "dateCreated": { + "title": "Creation date of the metadata record", + "type": "string", + "format": "date", + "pattern": "^\\d{4}-\\d{2}-\\d{2}" + }, + "dateModified": { + "title": "Modification date of the metadata record", + "type": "string", + "format": "date", + "pattern": "^\\d{4}-\\d{2}-\\d{2}" + }, "label": { "type": "string" }, @@ -176,13 +118,74 @@ "const": "hbz_unioncatalog" } } + }, + "sourceOrganization": { + "title": "Organization that added the record to the union catalog", + "type": "object", + "properties": { + "id": { + "title": "lobid-organisations URI", + "type": "string", + "format": "uri" + }, + "label": { + "title": "label", + "type": "string" + } + }, + "required": [ + "id", + "label" + ] + }, + "provider": { + "title": "Provider of the metadata record", + "type": "object", + "properties": { + "id": { + "title": "lobid-organisations URI", + "type": "string", + "format": "uri" + }, + "label": { + "title": "label", + "type": "string" + } + }, + "required": [ + "id", + "label" + ] + }, + "modifiedBy": { + "title": "Organization from which the record was last modified", + "type": "array", + "items": { + "properties": { + "id": { + "title": "lobid-organisations URI", + "type": "string", + "format": "uri" + }, + "label": { + "title": "label", + "type": "string" + } + }, + "type": "object", + "required": [ + "id", + "label" + ] + } } }, "required": [ "id", "type", "label", - "inDataset" + "inDataset", + "dateCreated" ] }, "endTime": { @@ -226,7 +229,6 @@ "id", "type", "label", - "dateCreated", "inDataset", "resultOf", "license" diff --git a/src/test/resources/schemas/spatial.json b/src/test/resources/schemas/spatial.json index c06a69044..8c633b195 100644 --- a/src/test/resources/schemas/spatial.json +++ b/src/test/resources/schemas/spatial.json @@ -2,7 +2,7 @@ "$id": "spatial.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Spatial", - "description": "Object for NWBib spatial classification", + "description": "Object for NWBib and RPB spatial classification", "type": "array", "items": { "type": "object", @@ -30,7 +30,10 @@ "id": { "type": "string", "format": "uri", - "const": "https://nwbib.de/spatial" + "enum": [ + "https://nwbib.de/spatial", + "https://rpb.lobid.org/spatial" + ] }, "label": { "type": "string" @@ -58,10 +61,12 @@ "type": "object", "properties": { "lat": { - "type": "number" + "type": "string", + "pattern": "[\\d]*\\.[\\d]*" }, "lon": { - "type": "number" + "type": "string", + "pattern": "[\\d]*\\.[\\d]*" } } }