From 538920130f81ee78470d17b11799f5c14ab0c909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Fri, 26 Apr 2024 09:42:28 +0200 Subject: [PATCH] Update metadata schemas and default license --- src/main/resources/application.yml | 2 +- .../migration/V0001.2__dev-data-schemas.sql | 40 +++++++++++++++++-- .../migration/V0001.2__dev-data-schemas.sql | 40 +++++++++++++++++-- 3 files changed, 73 insertions(+), 9 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d6d0885c..91f3a624 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -91,7 +91,7 @@ repository: metadataProperties: language: ${FDP_METADATA_LANGUAGE:http://id.loc.gov/vocabulary/iso639-1/en} - license: ${FDP_METADATA_LICENSE:http://rdflicense.appspot.com/rdflicense/cc-by-nc-nd3.0} + license: ${FDP_METADATA_LICENSE:http://purl.org/NET/rdflicense/cc-zero1.0} accessRightsDescription: ${FDP_METADATA_ACCESS_RIGHTS:This resource has no access restriction} openapi: diff --git a/src/main/resources/dev/db/migration/V0001.2__dev-data-schemas.sql b/src/main/resources/dev/db/migration/V0001.2__dev-data-schemas.sql index b89fb145..78c141f8 100644 --- a/src/main/resources/dev/db/migration/V0001.2__dev-data-schemas.sql +++ b/src/main/resources/dev/db/migration/V0001.2__dev-data-schemas.sql @@ -49,17 +49,20 @@ VALUES ('71d77460-f919-4f72-b265-ed26567fe361', sh:minCount 1 ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; + sh:order 1 ; ], [ sh:path dct:description ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextAreaEditor ; + sh:order 2 ; ], [ sh:path dct:publisher ; sh:node :AgentShape ; sh:minCount 1 ; sh:maxCount 1 ; dash:editor dash:BlankNodeEditor ; + sh:order 3 ; ], [ sh:path dcat:version ; sh:name "version" ; @@ -68,33 +71,39 @@ VALUES ('71d77460-f919-4f72-b265-ed26567fe361', sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 4 ; ], [ sh:path dct:language ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:defaultValue ; + sh:order 5 ; ], [ sh:path dct:license ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:defaultValue ; + sh:order 6 ; ], [ sh:path dct:rights ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 7 ; ] . :AgentShape a sh:NodeShape ; sh:targetClass foaf:Agent ; sh:property [ - sh:path foaf:name; + sh:path foaf:name ; sh:nodeKind sh:Literal ; sh:minCount 1 ; - sh:maxCount 1 ; + sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; ] . ', @@ -135,12 +144,14 @@ VALUES ('9111d436-fe58-4bd5-97ae-e6f86bc2997a', sh:path dcat:endpointURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; + sh:order 20 ; ] , [ sh:path dcat:endpointDescription ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextAreaEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#DataService'], @@ -217,12 +228,14 @@ VALUES ('4e64208d-f102-45a0-96e3-17b002e6213e', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 40 ; ] , [ sh:path fdp:endDate ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 41 ; ] , [ sh:path fdp:uiLanguage ; sh:nodeKind sh:IRI ; @@ -230,24 +243,26 @@ VALUES ('4e64208d-f102-45a0-96e3-17b002e6213e', sh:defaultValue ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 42 ; ] , [ sh:path fdp:metadataIdentifier ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 43 ; ] , [ sh:path fdp:metadataIssued ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; - dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 44 ; ] , [ sh:path fdp:metadataModified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; - dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 45 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#DataService', 'https://w3id.org/fdp/fdp-o#MetadataService', 'https://w3id.org/fdp/fdp-o#FAIRDataPoint'], @@ -291,21 +306,25 @@ VALUES ('c9640671-945d-4114-88fb-e81314cb7ab2', sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ], [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ], [ sh:path foaf:homePage ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 22 ; ], [ sh:path dcat:themeTaxonomy ; sh:nodeKind sh:IRI ; dash:viewer dash:LabelViewer ; + sh:order 23 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Catalog'], @@ -349,35 +368,41 @@ VALUES ('9cc3c89a-76cf-4639-a71f-652627af51db', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ], [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ], [ sh:path dcat:theme ; sh:nodeKind sh:IRI ; sh:minCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 22 ; ], [ sh:path dcat:contactPoint ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 23 ; ], [ sh:path dcat:keyword ; sh:nodeKind sh:Literal ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 24 ; ], [ sh:path dcat:landingPage ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 25 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Dataset'], @@ -421,22 +446,26 @@ VALUES ('3cda8cd3-b08b-4797-822d-d3f3e83c466a', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ] , [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ] , [ sh:path dcat:accessURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; + sh:order 22 ; ] , [ sh:path dcat:downloadURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; + sh:order 23 ; ] , [ sh:path dcat:mediaType ; sh:nodeKind sh:Literal ; @@ -444,18 +473,21 @@ VALUES ('3cda8cd3-b08b-4797-822d-d3f3e83c466a', sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 24 ; ] , [ sh:path dcat:format ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 25 ; ] , [ sh:path dcat:byteSize ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 26 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Distribution'], diff --git a/src/test/resources/test/db/migration/V0001.2__dev-data-schemas.sql b/src/test/resources/test/db/migration/V0001.2__dev-data-schemas.sql index b89fb145..78c141f8 100644 --- a/src/test/resources/test/db/migration/V0001.2__dev-data-schemas.sql +++ b/src/test/resources/test/db/migration/V0001.2__dev-data-schemas.sql @@ -49,17 +49,20 @@ VALUES ('71d77460-f919-4f72-b265-ed26567fe361', sh:minCount 1 ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; + sh:order 1 ; ], [ sh:path dct:description ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextAreaEditor ; + sh:order 2 ; ], [ sh:path dct:publisher ; sh:node :AgentShape ; sh:minCount 1 ; sh:maxCount 1 ; dash:editor dash:BlankNodeEditor ; + sh:order 3 ; ], [ sh:path dcat:version ; sh:name "version" ; @@ -68,33 +71,39 @@ VALUES ('71d77460-f919-4f72-b265-ed26567fe361', sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 4 ; ], [ sh:path dct:language ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:defaultValue ; + sh:order 5 ; ], [ sh:path dct:license ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:defaultValue ; + sh:order 6 ; ], [ sh:path dct:rights ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 7 ; ] . :AgentShape a sh:NodeShape ; sh:targetClass foaf:Agent ; sh:property [ - sh:path foaf:name; + sh:path foaf:name ; sh:nodeKind sh:Literal ; sh:minCount 1 ; - sh:maxCount 1 ; + sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; ] . ', @@ -135,12 +144,14 @@ VALUES ('9111d436-fe58-4bd5-97ae-e6f86bc2997a', sh:path dcat:endpointURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; + sh:order 20 ; ] , [ sh:path dcat:endpointDescription ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextAreaEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#DataService'], @@ -217,12 +228,14 @@ VALUES ('4e64208d-f102-45a0-96e3-17b002e6213e', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 40 ; ] , [ sh:path fdp:endDate ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 41 ; ] , [ sh:path fdp:uiLanguage ; sh:nodeKind sh:IRI ; @@ -230,24 +243,26 @@ VALUES ('4e64208d-f102-45a0-96e3-17b002e6213e', sh:defaultValue ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 42 ; ] , [ sh:path fdp:metadataIdentifier ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 43 ; ] , [ sh:path fdp:metadataIssued ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; - dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 44 ; ] , [ sh:path fdp:metadataModified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; - dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 45 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#DataService', 'https://w3id.org/fdp/fdp-o#MetadataService', 'https://w3id.org/fdp/fdp-o#FAIRDataPoint'], @@ -291,21 +306,25 @@ VALUES ('c9640671-945d-4114-88fb-e81314cb7ab2', sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ], [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ], [ sh:path foaf:homePage ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 22 ; ], [ sh:path dcat:themeTaxonomy ; sh:nodeKind sh:IRI ; dash:viewer dash:LabelViewer ; + sh:order 23 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Catalog'], @@ -349,35 +368,41 @@ VALUES ('9cc3c89a-76cf-4639-a71f-652627af51db', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ], [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ], [ sh:path dcat:theme ; sh:nodeKind sh:IRI ; sh:minCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 22 ; ], [ sh:path dcat:contactPoint ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 23 ; ], [ sh:path dcat:keyword ; sh:nodeKind sh:Literal ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 24 ; ], [ sh:path dcat:landingPage ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; dash:viewer dash:LabelViewer ; + sh:order 25 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Dataset'], @@ -421,22 +446,26 @@ VALUES ('3cda8cd3-b08b-4797-822d-d3f3e83c466a', sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 20 ; ] , [ sh:path dct:modified ; sh:datatype xsd:dateTime ; sh:maxCount 1 ; dash:editor dash:DatePickerEditor ; dash:viewer dash:LiteralViewer ; + sh:order 21 ; ] , [ sh:path dcat:accessURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; + sh:order 22 ; ] , [ sh:path dcat:downloadURL ; sh:nodeKind sh:IRI ; sh:maxCount 1 ; dash:editor dash:URIEditor ; + sh:order 23 ; ] , [ sh:path dcat:mediaType ; sh:nodeKind sh:Literal ; @@ -444,18 +473,21 @@ VALUES ('3cda8cd3-b08b-4797-822d-d3f3e83c466a', sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 24 ; ] , [ sh:path dcat:format ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 25 ; ] , [ sh:path dcat:byteSize ; sh:nodeKind sh:Literal ; sh:maxCount 1 ; dash:editor dash:TextFieldEditor ; dash:viewer dash:LiteralViewer ; + sh:order 26 ; ] . ', ARRAY ['http://www.w3.org/ns/dcat#Resource', 'http://www.w3.org/ns/dcat#Distribution'],