diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/HNM/ordered_sparql_insert_hnm.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/HNM/ordered_sparql_insert_hnm.sparql index a7bd284..ecf7496 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/HNM/ordered_sparql_insert_hnm.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/HNM/ordered_sparql_insert_hnm.sparql @@ -129,7 +129,7 @@ PREFIX rdf: INSERT { GRAPH { - ?s aocat:has_native_subject ?nsup . + ?s aocat:has_native_subject ?ns . } } USING @@ -137,39 +137,6 @@ WHERE { ?s aocat:is_about ?about . ?about aocat:has_type ?ns . ?ns rdf:type aocat:AO_Concept . - bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/HNM/", ucase(strafter(str(?ns),"HNM/")))) as ?nsup) -}; - -PREFIX aocat: -PREFIX skos: - -INSERT { - GRAPH { - ?record aocat:has_derived_subject ?aat . - } -} -USING -USING -WHERE { - { - ?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 . - } }; PREFIX dcterms: @@ -216,4 +183,44 @@ INSERT { } } } + }; + + PREFIX aocat: + PREFIX skos: + + INSERT { + GRAPH { + ?record aocat:has_derived_subject ?aat . + } + } + USING + USING + WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?aat_subject skos:closeMatch ?aat . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/HNM/", ucase(strafter(str(?native_subject),"HNM/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_subject skos:exactMatch ?aat . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/HNM/", ucase(strafter(str(?native_subject),"HNM/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_subject skos:broadMatch ?aat . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/HNM/", ucase(strafter(str(?native_subject),"HNM/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_subject) + } + union + { + ?record aocat:has_native_subject ?native_subject . + ?aat_subject skos:narrowMatch ?aat . + bind (IRI(concat( "https://ariadne-infrastructure.eu/aocat/Concept/HNM/", ucase(strafter(str(?native_subject),"HNM/")))) as ?uppercase_native_subject) + filter(?uppercase_native_subject=?aat_subject) + } }; \ No newline at end of file