From 5cb929d2be9d781f1e29ce4c4be1d290c9ca3245 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 10 Jan 2023 11:44:29 +0100 Subject: [PATCH] enrichment queries for carare and INP --- .../ordered_sparql_insert_carare_full.sparql | 258 ++++++++++++++++++ .../ordered_sparql_insert_INP_cronica.sparql | 54 ++++ 2 files changed, 312 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CARARE/ordered_sparql_insert_carare_full.sparql create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INP/ordered_sparql_insert_INP_cronica.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CARARE/ordered_sparql_insert_carare_full.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CARARE/ordered_sparql_insert_carare_full.sparql new file mode 100644 index 0000000..1524ae9 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CARARE/ordered_sparql_insert_carare_full.sparql @@ -0,0 +1,258 @@ +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: + +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:was_issued ?created . + } +} + +WHERE { +GRAPH { + ?record rdf:type aocat:AO_Collection . + ?record aocat:was_created_on ?created . + MINUS{ + ?record aocat:was_issued ?issued . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_creator . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Collection . + MINUS { + ?s rdf:type aocat:AO_Collection . + ?s aocat:has_creator ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_contributor . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Collection . + MINUS { + ?s rdf:type aocat:AO_Collection . + ?s aocat:has_contributor ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Collection . + MINUS { + ?s rdf:type aocat:AO_Collection . + ?s aocat:has_responsible ?agent . + } + } +}; + + +PREFIX aocat: +PREFIX skos: +INSERT { +GRAPH { + ?s aocat:has_type . + skos:prefLabel "provided record" . + } +} +WHERE { +GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_type . + } + } +}; + +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 . + } + } +}; + + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: + +INSERT { + GRAPH { + ?record aocat:was_modified ?collMod . + } +} +WHERE { + GRAPH { + ?record rdf:type aocat:AO_Individual_Data_Resource . + ?record aocat:is_part_of ?coll . + ?coll aocat:was_modified ?collMod . + MINUS{ + ?record aocat:was_modified ?mod . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: + +INSERT { + GRAPH { + ?record aocat:was_issued ?collIss . + } +} +WHERE { +GRAPH { + ?record rdf:type aocat:AO_Individual_Data_Resource . + ?record aocat:is_part_of ?coll . + ?coll aocat:was_issued ?collIss . + MINUS{ + ?record aocat:was_issued ?iss . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_contributor . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_contributor ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_responsible . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_responsible ?agent . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_owner . + rdf:type . + rdfs:label "Not provided" . + aocat:has_name "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type aocat:AO_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_owner ?agent . + } + } +}; + +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 . + } +}; diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INP/ordered_sparql_insert_INP_cronica.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INP/ordered_sparql_insert_INP_cronica.sparql new file mode 100644 index 0000000..bbd32d6 --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INP/ordered_sparql_insert_INP_cronica.sparql @@ -0,0 +1,54 @@ +PREFIX aocat: + INSERT { + GRAPH { + ?temporal aocat:has_period ?periodOURI . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_period ?periodOURI . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } + }; + + PREFIX aocat: + INSERT { + GRAPH { + ?periodOURI skos:prefLabel ?periodLabel . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_period ?periodOURI . + ?periodOURI skos:prefLabel ?periodLabel . + } + }; + + PREFIX aocat: + INSERT { + GRAPH { + ?s aocat:has_derived_subject ?derivedSubject . + } + } + WHERE { + GRAPH { + ?s aocat:has_derived_subject ?derivedSubject . + } + }; + + PREFIX aocat: + INSERT { + GRAPH { + ?derivedSubject skos:prefLabel ?prefLabel . + } + } + WHERE { + GRAPH { + ?s aocat:has_derived_subject ?derivedSubject . + ?derivedSubject skos:prefLabel ?prefLabel . + } + }; +