From 26c5714107b00fd7506166f4b2d7fd74ed191842 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Thu, 14 Jan 2021 16:17:54 +0100 Subject: [PATCH] fix for periodO match --- .../ADS/ordered_sparql_insert_1093.sparql | 9 ++++---- .../ADS/ordered_sparql_insert_398.sparql | 23 +++++++++---------- .../SND/ordered_sparql_insert_zip.sparql | 20 ++++++++++++++++ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1093.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1093.sparql index fcd4358..166c977 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1093.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_1093.sparql @@ -244,15 +244,14 @@ WHERE { GRAPH { ?temporal aocat:has_native_period ?native_period . ?native_period skos:prefLabel ?native_label . - optional { - GRAPH { - ?periodO skos:altLabel ?native_label . + GRAPH { + ?periodO skos:altLabel ?lowercase_native_label . ?periodO skos:inScheme . ?periodO time:intervalStartedBy ?intervalStartedBy . ?intervalStartedBy skos:prefLabel ?temporalFrom . ?periodO time:intervalFinishedBy ?intervalFinishedBy . ?intervalFinishedBy skos:prefLabel ?temporalUntil . - } - } + BIND(ucase(?lowercase_native_label) as ?native_label) + } } }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_398.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_398.sparql index ae695b8..63384df 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_398.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_398.sparql @@ -151,17 +151,16 @@ WHERE { } WHERE { GRAPH { - ?temporal aocat:has_native_period ?native_period . - ?native_period skos:prefLabel ?native_label . - optional { - GRAPH { - ?periodO skos:altLabel ?native_label . - ?periodO skos:inScheme . - ?periodO time:intervalStartedBy ?intervalStartedBy . - ?intervalStartedBy skos:prefLabel ?temporalFrom . - ?periodO time:intervalFinishedBy ?intervalFinishedBy . - ?intervalFinishedBy skos:prefLabel ?temporalUntil . - } + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + GRAPH { + ?periodO skos:altLabel ?lowercase_native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + BIND(ucase(?lowercase_native_label) as ?native_label) + } } - } }; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/SND/ordered_sparql_insert_zip.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/SND/ordered_sparql_insert_zip.sparql index 01d0b0c..7b4d353 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/SND/ordered_sparql_insert_zip.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/SND/ordered_sparql_insert_zip.sparql @@ -1,3 +1,23 @@ +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_temporal_coverage . + rdf:type . + rdfs:label "Not provided" . + + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_temporal_coverage ?tc . + } + } +}; PREFIX aocat: PREFIX rdf: