From 021dd8be11da4bd1ebaf4cb83ac7fce77b720d75 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Thu, 20 Oct 2022 17:18:48 +0200 Subject: [PATCH] added option to get the label from Getty AAT, if it's loaded on graphdb --- .../04_insert_AAT_enrichment_template.sparql | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/04_insert_AAT_enrichment_template.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/04_insert_AAT_enrichment_template.sparql index 5660710..73c84dd 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/04_insert_AAT_enrichment_template.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/04_insert_AAT_enrichment_template.sparql @@ -72,3 +72,51 @@ USING : filter(?uppercase_native_subject=?aat_native_subject) } }; + + #if you need to copy triples from the data graph to the aat/aatplus graph: +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH ::aatplus> { + ?record aocat:has_derived_subject ?aat_subject . + } + } +USING ::> +WHERE { + ?record aocat:has_derived_subject ?aat_subject . +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH ::aat> { + ?aat_subject skos:prefLabel ?label . + } + } +USING ::> +WHERE { + ?record aocat:has_derived_subject ?aat_subject . + ?aat_subject skos:prefLabel ?label +} + +#it could the case there is no prefLabel in the data graph: we have to find it somewhere (if there is not, then we might have a problem) +# note that the ?label comes with the language tag + +PREFIX aocat: +PREFIX skos: +PREFIX skosxl: +PREFIX gvp: +INSERT { + GRAPH ::aat> { + ?aat_subject skos:prefLabel ?label . + } + } +USING +USING ::aatplus> +WHERE { + ?record aocat:has_derived_subject ?aat_subject . + ?aat_subject rdf:type gvp:Concept . + ?aat_subject gvp:prefLabelGVP ?lab . + ?lab gvp:term ?label . +} +