From 18801c68ccace8c69b4852dafed22eb94a18079a Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Sun, 31 Jan 2021 16:38:47 +0100 Subject: [PATCH] fix language code label, now retrieved parsing has_language property value --- .../ordered_sparql_insert_dans_easy.sparql | 61 ++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql index 37f10a6..665bd59 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/DANS/ordered_sparql_insert_dans_easy.sparql @@ -125,6 +125,27 @@ WHERE { } }; +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?isoLangRef skos:prefLabel ?lang . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?isoLangRef . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?isoLangRef . + ?isoLangRef skos:prefLabel ?p . + } + bind (strafter(str(?isoLangRef),"iso639-1/") as ?lang) + } +}; + PREFIX aocat: PREFIX skos: PREFIX rdf: @@ -144,6 +165,42 @@ WHERE { } }; +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } +} +WHERE { + graph { + ?record aocat:has_native_subject ?ns_label . + bind(strafter(str(?ns_label),"Match: ") as ?m) + filter(str(?m)=str(?aat_label)) + } + graph { + { + ?subject skos:broadMatch ?aat . + ?aat skos:prefLabel ?aat_label . + } + union + { + ?subject skos:exactMatch ?aat . + ?aat skos:prefLabel ?aat_label . + } + union + { + ?subject skos:closeMatch ?aat . + ?aat skos:prefLabel ?aat_label . + } + union + { + ?subject skos:narrowMatch ?aat . + ?aat skos:prefLabel ?aat_label . + } + } +}; + PREFIX dcterms: INSERT { GRAPH { @@ -188,4 +245,6 @@ PREFIX skos: } } } - }; \ No newline at end of file + }; + + \ No newline at end of file