From 5526edf1d2c1c1a4edb583a3a54f0c13147e5736 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Mon, 10 Oct 2022 17:06:17 +0200 Subject: [PATCH] added missing . for thandos enrichment queries --- .../ordered_sparql_insert_THANADOS.sparql | 2 +- ...ordered_sparql_insert_THANADOS_test.sparql | 96 ++++++++++++++++++- 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql index d1b8f52..e10d669 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS.sparql @@ -396,7 +396,7 @@ USING USING WHERE { ?temporal aocat:has_native_period ?np . - ?np skos:prefLabel ?y + ?np skos:prefLabel ?y . ?periodO_URI skos:prefLabel ?l . ?periodO_URI time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . ?periodO_URI time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS_test.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS_test.sparql index 540a4ce..4567a58 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS_test.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/THANADOS/ordered_sparql_insert_THANADOS_test.sparql @@ -127,8 +127,8 @@ INSERT { GRAPH { ?s aocat:has_spatial_coverage . rdf:type . - rdfs:label "Name not provided" . - aocat:has_place_name "Name not provided" . + rdfs:label "Place not provided" . + aocat:has_place_name "Place not provided" . } } WHERE { @@ -317,6 +317,98 @@ INSERT { } }; +PREFIX skos: +PREFIX aocat: +INSERT { + GRAPH { + ?s aocat:has_derived_subject ?aat . + } +} +USING +USING +WHERE { + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:exactMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:broadMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:closeMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + + } + union + { + ?s aocat:has_native_subject ?native_subject . + ?aatmatch owl:sameAs ?vocuri . + ?aatmatch skos:narrowMatch ?aat . + bind (IRI(concat( "https://thanados.net/vocabulary/", ucase(strafter(str(?native_subject),"THANADOS/")))) as ?vocuribuilt) + filter(?vocuri=?vocuribuilt) + + } +}; + +PREFIX skos: +PREFIX aocat: +PREFIX time: +PREFIX dcterms: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } +} +USING +USING +WHERE { + ?temporal aocat:has_period ?periodO_URI . + ?periodO_URI time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO_URI time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . +}; + +PREFIX skos: +PREFIX aocat: +PREFIX time: +PREFIX dcterms: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } +} +USING +USING +WHERE { + ?temporal aocat:has_native_period ?np . + ?np skos:prefLabel ?y . + ?periodO_URI skos:prefLabel ?l . + ?periodO_URI time:intervalStartedBy / time:hasDateTimeDescription / time:year ?temporalFrom . + ?periodO_URI time:intervalFinishedBy / time:hasDateTimeDescription / time:year ?temporalUntil . +}; + + + + + + + +