From df1fd92628f7489ead6ba4a36a4f2543a95213cb Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 14 Dec 2022 19:20:21 +0100 Subject: [PATCH] fixed AAT enrichment for UKPool --- .../ordered_sparql_insert_oeaw_ukpool.sparql | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_oeaw_ukpool.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_oeaw_ukpool.sparql index f79df90..8b3a82c 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_oeaw_ukpool.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/OEAW/ordered_sparql_insert_oeaw_ukpool.sparql @@ -53,45 +53,50 @@ WHERE { ?collection aocat:has_access_rights ?accessRights . }; - PREFIX aocat: - PREFIX skos: +PREFIX aocat: +PREFIX skos: - INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat_subject . - } - } +PREFIX ariadneplus: +INSERT { +GRAPH { + ?record aocat:has_derived_subject ?aat_subject . +} +} USING USING - WHERE { +WHERE { { ?record aocat:has_native_subject ?native_subject . - ?aat_native_subject skos:exactMatch ?aat_subject . - bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/OEAW/", ucase(strafter(str(?native_subject),"OEAW/")))) as ?uppercase_native_subject) - filter(?uppercase_native_subject=?aat_native_subject) + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:exactMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) } - union +union { ?record aocat:has_native_subject ?native_subject . - ?aat_native_subject skos:broadMatch ?aat_subject . - bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/OEAW/", ucase(strafter(str(?native_subject),"OEAW/")))) as ?uppercase_native_subject) - filter(?uppercase_native_subject=?aat_native_subject) + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:broadMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) } - union +union { ?record aocat:has_native_subject ?native_subject . - ?aat_native_subject skos:closeMatch ?aat_subject . - bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/OEAW/", ucase(strafter(str(?native_subject),"OEAW/")))) as ?uppercase_native_subject) - filter(?uppercase_native_subject=?aat_native_subject) + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:closeMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) } - union +union { ?record aocat:has_native_subject ?native_subject . - ?aat_native_subject skos:narrowMatch ?aat_subject . - bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/OEAW/", ucase(strafter(str(?native_subject),"OEAW/")))) as ?uppercase_native_subject) - filter(?uppercase_native_subject=?aat_native_subject) + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:narrowMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) } - }; + }; PREFIX dcterms: INSERT {