From 35961fc96741b5af13d11230f18138b7f5e4fae0 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 14 Dec 2022 16:36:07 +0100 Subject: [PATCH] enrich queries for misanu --- .../ordered_sparql_insert_misanu_coll.sparql | 44 ++++ ...ered_sparql_insert_misanu_monuments.sparql | 238 ++++++++++++++++++ 2 files changed, 282 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_coll.sparql create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_monuments.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_coll.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_coll.sparql new file mode 100644 index 0000000..8f22540 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_coll.sparql @@ -0,0 +1,44 @@ +PREFIX aocat: +PREFIX rdf: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_type . + rdf:type . + skos:prefLabel "collection" + } + } + WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_type ?t . + } + } + }; + + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?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 . + optional { + GRAPH { + ?periodO skos:altLabel ?native_label . + } + } + } + }; diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_monuments.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_monuments.sparql new file mode 100644 index 0000000..fae1f83 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/MISANU/ordered_sparql_insert_misanu_monuments.sparql @@ -0,0 +1,238 @@ +ADD SILENT TO ; +DROP SILENT GRAPH ; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_type . + skos:prefLabel "provided record" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_creator ?agent . + ?agent ?x ?y . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_creator ?agent . + ?agent ?x ?y . + MINUS { + ?record aocat:has_creator ?creator + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_contributor ?agent . + ?agent ?x ?y . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?agent . + ?agent ?x ?y . + MINUS { + ?record aocat:has_contributor ?contrib + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_responsible ?agent . + ?agent ?x ?y . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?agent . + ?agent ?x ?y . + MINUS { + ?record aocat:has_responsible ?resp + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_owner ?agent . + ?agent ?x ?y . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?agent . + ?agent ?x ?y . + MINUS { + ?record aocat:has_owner ?resp + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_publisher ?agent . + ?agent ?x ?y . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?agent . + ?agent ?x ?y . + MINUS { + ?record aocat:has_publisher ?pub + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?ar . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?ar . + MINUS { + ?record aocat:has_access_rights ?therights + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:was_modified ?modified . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_modified ?modified . + MINUS { + ?record aocat:was_modified ?date + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:was_issued ?issued . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_issued ?issued . + MINUS { + ?record aocat:was_issued ?date + } +}; + + PREFIX skos: + PREFIX aocat: + PREFIX time: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?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 . + optional { + GRAPH { + ?periodO skos:altLabel ?native_label . + } + } + } + }; + +PREFIX aocat: +PREFIX skos: + +INSERT { +GRAPH { + ?record aocat:has_derived_subject ?aat_subject . +} +} +USING +USING +WHERE { + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:exactMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) + } +union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:broadMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) + } +union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:closeMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) + } +union + { + ?record aocat:has_native_subject ?native_subject . + ?native_subject skos:prefLabel ?nativeLabel . + ?match_subject skos:prefLabel ?matchedLabel . + ?match_subject skos:narrowMatch ?aat_subject . + filter(str(?nativeLabel) = str(?matchedLabel)) + } + }; \ No newline at end of file