From f2a695e9a4e2f0dcce184b34a44a28316bb8c020 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Tue, 9 Mar 2021 12:45:01 +0100 Subject: [PATCH] ads archives sparql insert --- .../ADS/ordered_sparql_insert_archives.sparql | 351 ++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_archives.sparql diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_archives.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_archives.sparql new file mode 100644 index 0000000..f7ed24e --- /dev/null +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/ADS/ordered_sparql_insert_archives.sparql @@ -0,0 +1,351 @@ +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:was_issued ?created_on . + ?s aocat:was_modified ?created_on . + } +} +USING +WHERE { + ?s rdf:type aocat:AO_Collection . + ?s aocat:was_created_on ?created_on . + MINUS { + ?s rdf:type aocat:AO_Collection . + ?s aocat:was_issued ?issued . + } +}; + +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 aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?coll_value . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_access_rights ?coll_value . + MINUS { + ?record aocat:has_access_rights ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:has_ARIADNE_subject ?coll_value . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_ARIADNE_subject ?coll_value . + MINUS { + ?record aocat:has_ARIADNE_subject ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_owner ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_owner ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_owner ?rec_value . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?record aocat:has_responsible ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:has_responsible ?coll_value . + ?coll_value rdf:type ?type . + ?coll_value rdfs:label ?label . + ?coll_value aocat:has_name ?name . + MINUS { + ?record aocat:has_responsible ?rec_value . + } +}; + +PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: +PREFIX skos: +INSERT { + GRAPH { + ?s aocat:has_type . + rdf: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 ?t . + } + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:was_modified ?issued . + } +} +USING +WHERE { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_issued ?issued . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:was_modified ?modified . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX ariadneplus: +INSERT { + GRAPH { + ?record aocat:was_issued ?coll_issued_value . + ?record aocat:was_modified ?coll_modified_value . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_issued ?coll_issued_value . + ?collection aocat:was_modified ?coll_modified_value . + MINUS { + ?record aocat:was_issued ?rec_value . + ?record aocat:was_modified ?rec_value2 . + } +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +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 skos: +PREFIX rdf: +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 rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_spatial_coverage . + rdf:type . + rdfs:label "Name not provided" . + aocat:has_place_name "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_spatial_coverage ?spatialRegion . + ?spatialRegion aocat:has_place_name ?placeName . + } + } +}; + +PREFIX aocat: +PREFIX skos: +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_Individual_Data_Resource . + MINUS { + ?s rdf:type aocat:AO_Individual_Data_Resource . + ?s aocat:has_creator ?creator . + } + } +}; + +PREFIX aocat: +PREFIX skos: +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 ?contributor . + } + } +}; + +PREFIX skos: + PREFIX aocat: + 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 skos: + PREFIX aocat: + PREFIX time: + PREFIX ariadneplus: +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 . + optional { + GRAPH { + ?periodO skos:altLabel ?native_label . + ?periodO skos:inScheme . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . + } + } + } + }; \ No newline at end of file