From 201f02eb9d78833bdcc69cfae45370e19eccda63 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Wed, 15 Dec 2021 15:06:15 +0100 Subject: [PATCH] fix for aat and temporal informations --- .../enrich/PP/ordered_sparql_insert_pp.sparql | 77 ++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/PP/ordered_sparql_insert_pp.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/PP/ordered_sparql_insert_pp.sparql index 971074e..7ac8357 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/PP/ordered_sparql_insert_pp.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/PP/ordered_sparql_insert_pp.sparql @@ -78,4 +78,79 @@ WHERE { ?nativeLabel skos:prefLabel ?origTemporalNativePeriodName . } } -}; \ No newline at end of file +}; + +PREFIX skos: +PREFIX aocat: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat_subject . + } +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:exactMatch ?aat_subject . + bind (IRI(replace( str(?aat_native_subject), "PP", "University%20of%20Patras")) as ?patched_aat_native_subject) + filter(?native_subject=?patched_aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:broadMatch ?aat_subject . + bind (IRI(replace( str(?aat_native_subject), "PP", "University%20of%20Patras")) as ?patched_aat_native_subject) + filter(?native_subject=?patched_aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:closeMatch ?aat_subject . + bind (IRI(replace( str(?aat_native_subject), "PP", "University%20of%20Patras")) as ?patched_aat_native_subject) + filter(?native_subject=?patched_aat_native_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_native_subject skos:narrowMatch ?aat_subject . + bind (IRI(replace( str(?aat_native_subject), "PP", "University%20of%20Patras")) as ?patched_aat_native_subject) + filter(?native_subject=?patched_aat_native_subject) + } +}; + +PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?native_period . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + }; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?native_period skos:prefLabel ?native_label . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period . + ?native_period skos:prefLabel ?native_label . + ?temporal aocat:from ?from . + ?temporal aocat:until ?until . + } + }; \ No newline at end of file