diff --git a/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findChildTitles.sparql b/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findChildTitles.sparql new file mode 100644 index 0000000000000000000000000000000000000000..1f2ef7e8dde34754df5405b0a6b4dcde382d5cfe --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findChildTitles.sparql @@ -0,0 +1,6 @@ +prefix dct: <http://purl.org/dc/terms/> + +SELECT ?child ?title WHERE { + ?parent ?relation ?child . + ?child dct:title ?title . +} diff --git a/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findEntityByLiteral.sparql b/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findEntityByLiteral.sparql new file mode 100644 index 0000000000000000000000000000000000000000..77e9907a7c914a3ef8bb2764968445dc888e536b --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/common/findEntityByLiteral.sparql @@ -0,0 +1,11 @@ +prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +prefix dct: <http://purl.org/dc/terms/> + +SELECT ?entity ?rdfType ?title ?description ?relationPredicate ?relationObject WHERE { + ?entity ?relationPredicate ?relationObject . + ?entity rdf:type ?rdfType . + ?entity dct:title ?title . + Optional { ?entity dct:description ?description } + filter isLiteral(?relationObject) + filter CONTAINS(LCASE(str(?relationObject)), LCASE(str(?query))) +} diff --git a/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/repository/getFdpIri.sparql b/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/repository/getFdpIri.sparql deleted file mode 100755 index 92c314a78b0ca688bb9d06a31155ef97fa385c8f..0000000000000000000000000000000000000000 --- a/src/main/resources/nl/dtls/fairdatapoint/database/rdf/repository/repository/getFdpIri.sparql +++ /dev/null @@ -1,9 +0,0 @@ -prefix r3d: <http://www.re3data.org/schema/3-0#> -prefix dcterms: <http://purl.org/dc/terms/> - -SELECT DISTINCT ?fdp { - - ?iri dcterms:isPartOf* ?fdp. - ?fdp a r3d:Repository. - -} diff --git a/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-catalog.ttl b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-catalog.ttl new file mode 100644 index 0000000000000000000000000000000000000000..6d823dd5033a3ce7b2c37e9cf7b485b12b3e22fd --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-catalog.ttl @@ -0,0 +1,30 @@ +@prefix : <http://fairdatapoint.org/> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix sh: <http://www.w3.org/ns/shacl#> . + +:CatalogShape a sh:NodeShape ; + sh:targetClass dcat:Catalog ; + sh:property [ + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path foaf:homePage ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path dcat:themeTaxonomy ; + sh:nodeKind sh:IRI ; + dash:viewer dash:LabelViewer ; + ] . diff --git a/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-dataset.ttl b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-dataset.ttl new file mode 100644 index 0000000000000000000000000000000000000000..a47a56a508a63be8772e294f830967bca67e7018 --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-dataset.ttl @@ -0,0 +1,44 @@ +@prefix : <http://fairdatapoint.org/> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix sh: <http://www.w3.org/ns/shacl#> . + +:DatasetShape a sh:NodeShape ; + sh:targetClass dcat:Dataset ; + sh:property [ + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dcat:theme ; + sh:nodeKind sh:IRI ; + sh:minCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path dcat:contactPoint ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path dcat:keyword ; + sh:nodeKind sh:Literal ; + dash:editor dash:TextFieldEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dcat:landingPage ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ] . diff --git a/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-distribution.ttl b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-distribution.ttl new file mode 100644 index 0000000000000000000000000000000000000000..a26eae1e41e5a7951deb1ed6c94a14f55cf47eb6 --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-distribution.ttl @@ -0,0 +1,50 @@ +@prefix : <http://fairdatapoint.org/> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix sh: <http://www.w3.org/ns/shacl#> . + +:DistributionShape a sh:NodeShape ; + sh:targetClass dcat:Distribution ; + sh:property [ + sh:path dct:issued ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dct:modified ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dcat:accessURL ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + ], [ + sh:path dcat:downloadURL ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + ], [ + sh:path dcat:mediaType ; + sh:nodeKind sh:Literal ; + sh:minCount 1 ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dcat:format ; + sh:nodeKind sh:Literal ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dcat:byteSize ; + sh:nodeKind sh:Literal ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + dash:viewer dash:LiteralViewer ; + ] . diff --git a/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-repository.ttl b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-repository.ttl new file mode 100644 index 0000000000000000000000000000000000000000..29ade853ce1aeed1934cc303bb8c337a34ee3e3b --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-repository.ttl @@ -0,0 +1,40 @@ +@prefix : <http://fairdatapoint.org/> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix r3d: <http://www.re3data.org/schema/3-0#> . +@prefix sh: <http://www.w3.org/ns/shacl#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +:RepositoryShape a sh:NodeShape ; + sh:targetClass r3d:Repository ; + sh:property [ + sh:path dct:references ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path r3d:institution ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path r3d:startDate ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path r3d:lastUpdate ; + sh:datatype xsd:dateTime ; + sh:maxCount 1 ; + dash:editor dash:DatePickerEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path r3d:institutionCountry ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ] . diff --git a/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-resource.ttl b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-resource.ttl new file mode 100644 index 0000000000000000000000000000000000000000..7e8c3cc745a821ccf1c39a94413c7a243267b2ff --- /dev/null +++ b/src/main/resources/nl/dtls/fairdatapoint/service/reset/shape-resource.ttl @@ -0,0 +1,64 @@ +@prefix : <http://fairdatapoint.org/> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix sh: <http://www.w3.org/ns/shacl#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +:ResourceShape a sh:NodeShape ; + sh:targetClass dcat:Resource ; + sh:property [ + sh:path dct:title ; + sh:nodeKind sh:Literal ; + sh:minCount 1 ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + ], [ + sh:path dct:description ; + sh:nodeKind sh:Literal ; + sh:maxCount 1 ; + dash:editor dash:TextAreaEditor ; + ], [ + sh:path dct:publisher ; + sh:node :AgentShape ; + sh:minCount 1 ; + sh:maxCount 1 ; + dash:editor dash:BlankNodeEditor ; + ], [ + sh:path dct:hasVersion ; + sh:name "version" ; + sh:nodeKind sh:Literal ; + sh:minCount 1 ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + dash:viewer dash:LiteralViewer ; + ], [ + sh:path dct:language ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path dct:license ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ], [ + sh:path dct:rights ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + dash:editor dash:URIEditor ; + dash:viewer dash:LabelViewer ; + ] . + +:AgentShape a sh:NodeShape ; + sh:targetClass foaf:Agent ; + sh:property [ + sh:path foaf:name ; + sh:nodeKind sh:Literal ; + sh:minCount 1 ; + sh:maxCount 1 ; + dash:editor dash:TextFieldEditor ; + ] .