From 985dbad239bd832b8c9b39012cee7d1ec7cfea4f Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 14 Feb 2023 10:51:11 +0100 Subject: [PATCH] updated queries for IAA --- .../ordered_sparql_insert_IAA_sites.sparql | 232 ++++++++++++++++-- 1 file changed, 217 insertions(+), 15 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAA/ordered_sparql_insert_IAA_sites.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAA/ordered_sparql_insert_IAA_sites.sparql index 23c3344..ec59b56 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAA/ordered_sparql_insert_IAA_sites.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/IAA/ordered_sparql_insert_IAA_sites.sparql @@ -1,23 +1,224 @@ +ADD SILENT TO ; +DROP SILENT GRAPH ; + + PREFIX aocat: -PREFIX rdf: PREFIX skos: INSERT { - GRAPH { - ?s aocat:has_type . - rdf:type . - skos:prefLabel "collection" + GRAPH { + ?s aocat:has_type . + skos:prefLabel "provided record" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_native_subject . + skos:prefLabel "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_native_subject ?ns . } } - WHERE { - GRAPH { - ?s rdf:type . - MINUS { - ?s rdf:type . - ?s aocat:has_type ?t . - } - } }; +PREFIX aocat: +PREFIX rdf: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_title "Title not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_title ?title . + } + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:was_issued ?date . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_issued ?date . + MINUS { + ?record aocat:was_issued ?recorddate . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:was_modified ?date . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_modified ?date . + MINUS { + ?record aocat:was_modified ?recorddate . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_creator ?agent . + ?agent ?p ?o + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_creator ?agent . + ?agent ?p ?o . + MINUS { + ?record aocat:has_creator ?recordagent . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_contributor ?agent . + ?agent ?p ?o + } +} +USING +USING +WHERE { +?record aocat:is_part_of ?collection . + ?collection aocat:has_contributor ?agent . + ?agent ?p ?o . + MINUS { + ?record aocat:has_contributor ?recordagent . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_responsible ?agent . + ?agent ?p ?o + } +} +USING +USING +WHERE { +?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?agent . + ?agent ?p ?o . + MINUS { + ?record aocat:has_responsible ?recordagent . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_owner ?agent . + ?agent ?p ?o + } +} +USING +USING +WHERE { +?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?agent . + ?agent ?p ?o . + MINUS { + ?record aocat:has_owner ?recordagent . + } +}; + +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_publisher ?agent . + ?agent ?p ?o + } +} +USING +USING +WHERE { +?record aocat:is_part_of ?collection . + ?collection aocat:has_publisher ?agent . + ?agent ?p ?o . + MINUS { + ?record aocat:has_publisher ?recordagent . + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_language ?ns . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_access_rights "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s aocat:has_access_rights ?ar . + } + } +}; + + + PREFIX aocat: INSERT { GRAPH { @@ -27,11 +228,12 @@ PREFIX aocat: } } WHERE { - GRAPH { + GRAPH { ?temporal aocat:has_native_period ?nativePeriod . ?temporal aocat:from ?temporalFrom . ?temporal aocat:until ?temporalUntil . } + }; PREFIX aocat: @@ -43,7 +245,7 @@ PREFIX aocat: } } WHERE { - GRAPH { + GRAPH { ?temporal aocat:has_native_period ?nativePeriod . ?nativePeriod rdfs:label ?periodLabel . }