From d06ec9fa9c439820d30149767363080e6e398d9a Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 5 Sep 2023 16:00:31 +0200 Subject: [PATCH] First enrichment query for niwrecks2 --- .../ordered_sparql_insert_niwrecks2.sparql | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_niwrecks2.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_niwrecks2.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_niwrecks2.sparql new file mode 100644 index 0000000..6009496 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_niwrecks2.sparql @@ -0,0 +1,121 @@ +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT DATA { + GRAPH { + skos:prefLabel "Site/monument"@en. + skos:prefLabel "Maritime"@en. + } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_ARIADNE_subject ?as. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_ARIADNE_subject ?as. + MINUS { ?record aocat:has_ARIADNE_subject ?theas. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:was_modified ?modified. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:was_modified ?modified. + MINUS { ?record aocat:was_modified ?mod. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:was_issued ?date. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:was_issued ?date. + MINUS { ?record aocat:was_issued ?thedate. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_contributor ?agent. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_contributor ?agent. + MINUS { ?record aocat:has_contributor ?x. } +}; +PREFIX aocat: +PREFIX rdfs: +INSERT { GRAPH { ?contributor aocat:has_name ?name. } } +WHERE { + ?record aocat:has_contributor ?contributor. + ?contributor rdfs:label ?name. + MINUS { ?contributor aocat:has_name ?cname. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_responsible ?agent. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_responsible ?agent. + MINUS { ?record aocat:has_responsible ?x. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_owner ?agent. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_owner ?agent. + MINUS { ?record aocat:has_owner ?x. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_publisher ?agent. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_publisher ?agent. + MINUS { ?record aocat:has_publisher ?x. } +}; +PREFIX aocat: +INSERT { GRAPH { ?record aocat:has_access_rights ?ar. } } +WHERE { + ?record aocat:is_part_of ?collection. + ?collection aocat:has_access_rights ?ar. + MINUS { ?record aocat:has_access_rights ?x. } +}; +PREFIX aocat: +PREFIX skos: +INSERT { GRAPH { ?record aocat:has_derived_subject ?aat. } } +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 skos: + PREFIX aocat: + PREFIX time: +INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO. + ?temporal aocat:from ?temporalFrom. + ?temporal aocat:until ?temporalUntil. + } +} +WHERE { + GRAPH { + ?temporal aocat:has_native_period ?native_period. + ?native_period skos:prefLabel ?native_label. + GRAPH { + ?periodO skos:altLabel ?native_label; + skos:inScheme ; + time:intervalStartedBy ?intervalStartedBy. + ?intervalStartedBy skos:prefLabel ?temporalFrom. + ?periodO time:intervalFinishedBy ?intervalFinishedBy. + ?intervalFinishedBy skos:prefLabel ?temporalUntil. + } + } +} \ No newline at end of file