From 8980c64e53eb3f6c9b7cf1aee356cfa7c9452412 Mon Sep 17 00:00:00 2001 From: Alessia Date: Mon, 7 Oct 2024 17:31:14 +0200 Subject: [PATCH] updated query for ADS bangor and messages (changes from Friday 4 Oct) --- .../ADS/ordered_sparql_insert_bangor.sparql | 102 +++++++++--------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_bangor.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_bangor.sparql index e4958ea..07a6df7 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_bangor.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_bangor.sparql @@ -1,54 +1,60 @@ -PREFIX aocat: -PREFIX rdf: -PREFIX skos: +PREFIX skos: + PREFIX aocat: + PREFIX time: + PREFIX ariadneplus: INSERT { - GRAPH { - ?s aocat:has_derived_subject ?o . + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + 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 . + } + } + } + }; + +PREFIX skos: +PREFIX aocat: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . } } + USING + USING WHERE { - GRAPH { - ?s aocat:has_derived_subject ?o . - } -}; - -PREFIX aocat: -PREFIX rdf: -PREFIX skos: -INSERT { - GRAPH { - ?o skos:prefLabel ?label - } + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:exactMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:broadMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:closeMatch ?aat . + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:narrowMatch ?aat . + } } - WHERE { - GRAPH { - ?s aocat:has_derived_subject ?o . - ?o skos:prefLabel ?label - } -}; -PREFIX aocat: -PREFIX rdf: -PREFIX skos: -DELETE { - GRAPH { - ?s aocat:has_derived_subject ?o . - ?o skos:prefLabel ?label - } -}; - -PREFIX aocat: -PREFIX rdf: -PREFIX skos: -DELETE { - GRAPH { - ?s aocat:has_derived_subject ?o . - ?o skos:prefLabel ?label - } -} -WHERE { - GRAPH { - ?s aocat:has_derived_subject ?o . - ?o skos:prefLabel ?label - } -}; \ No newline at end of file