From 699dc0c214f66fd18ad7414e2363121d8dea07b0 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 4 Jun 2021 14:22:30 +0200 Subject: [PATCH] updated enrichment query for Inrap Dolia --- ...dered_sparql_insert_dolia_coll-TEST.sparql | 77 ++++++-- ...ed_sparql_insert_dolia_records-TEST.sparql | 187 ++++++++++++++---- 2 files changed, 213 insertions(+), 51 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_coll-TEST.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_coll-TEST.sparql index 057e754..9841a84 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_coll-TEST.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_coll-TEST.sparql @@ -3,14 +3,14 @@ PREFIX rdf: PREFIX rdfs: PREFIX skos: INSERT { - GRAPH { + GRAPH { ?s aocat:has_type . rdf:type . skos:prefLabel "collection" } } WHERE { - GRAPH { + GRAPH { ?s rdf:type . MINUS { ?s rdf:type . @@ -18,12 +18,11 @@ INSERT { } } }; - PREFIX aocat: PREFIX rdf: PREFIX rdfs: INSERT { - GRAPH { + GRAPH { ?s aocat:has_temporal_coverage . rdf:type . rdfs:label "Not provided" . @@ -31,7 +30,7 @@ INSERT { } } WHERE { - GRAPH { + GRAPH { ?s rdf:type . MINUS { ?s rdf:type . @@ -41,23 +40,71 @@ WHERE { }; PREFIX aocat: -PREFIX rdf: +PREFIX skos: +PREFIX rdf: INSERT { - GRAPH { - ?s aocat:has_original_id "DIME" . + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . } } WHERE { - GRAPH { + GRAPH { + ?s rdf:type . + MINUS { ?s rdf:type . - MINUS { - ?s rdf:type . - ?s aocat:has_original_id ?tc . - } + ?s aocat:has_language ?ns . } + } }; +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_modified "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_modified ?d . + } + } +}; +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_issued "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_issued ?d . + } + } +}; - - +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_access_rights "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_access_rights ?ar . + } + } +}; \ No newline at end of file diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_records-TEST.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_records-TEST.sparql index 6032f7d..2dce50e 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_records-TEST.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/INRAP/ordered_sparql_insert_dolia_records-TEST.sparql @@ -1,56 +1,171 @@ PREFIX aocat: +PREFIX rdf: +PREFIX rdfs: PREFIX skos: INSERT { - GRAPH { - ?record aocat:was_issued ?issued . - ?record aocat:was_modified ?modified . - ?record aocat:has_contributor ?contributor . - ?contributor aocat:has_name ?contrib . - ?record aocat:has_responsible ?legalResponsible . - ?legalResponsible aocat:has_name ?resp . - ?record aocat:has_owner ?owner . - ?owner aocat:has_name ?own . - ?record aocat:has_publisher ?publisher . - ?publisher aocat:has_name ?pub . - ?record aocat:has_access_rights ?accessRights . - ?record aocat:has_ARIADNE_subject ?archeologicalResourceType . - ?archeologicalResourceType skos:prefLabel ?alabel . - ?record aocat:has_language ?lang . - ?lang skos:prefLabel ?langL + 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 rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?s aocat:has_temporal_coverage . + rdf:type . + rdfs:label "Not provided" . + } } -USING -USING WHERE { - ?record aocat:is_part_of ?collection . - ?collection aocat:was_issued ?issued . - ?collection aocat:was_modified ?modified . - ?collection aocat:has_contributor ?contributor . - ?contributor aocat:has_name ?contrib . - ?collection aocat:has_responsible ?legalResponsible . - ?legalResponsible aocat:has_name ?resp . - ?collection aocat:has_owner ?owner . - ?owner aocat:has_name ?own . - ?collection aocat:has_publisher ?publisher . - ?publisher aocat:has_name ?pub . - ?collection aocat:has_access_rights ?accessRights . - ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . - ?archeologicalResourceType skos:prefLabel ?alabel . - ?collection aocat:has_language ?lang . - ?lang skos:prefLabel ?langL + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_temporal_coverage ?tc . + } + } }; PREFIX aocat: PREFIX skos: PREFIX rdf: INSERT { - GRAPH { + GRAPH { + ?s aocat:has_language . + skos:prefLabel "und" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_language ?ns . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_modified "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_modified ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:was_issued "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:was_issued ?d . + } + } +}; + +PREFIX aocat: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_access_rights "Not provided" . + } +} +WHERE { + GRAPH { + ?s rdf:type . + MINUS { + ?s rdf:type . + ?s aocat:has_access_rights ?ar . + } + } +}; +PREFIX aocat: +PREFIX skos: +INSERT { + GRAPH { + ?record aocat:has_access_rights ?accessRights . + ?record aocat:has_ARIADNE_subject ?archeologicalResourceType . + ?record aocat:has_owner ?owner . + ?record aocat:has_contributor ?contributor . + ?record aocat:was_modified ?modified . + } +} +USING +USING +WHERE { + ?record aocat:is_part_of ?collection . + ?collection aocat:was_modified ?modified . + ?collection aocat:has_contributor ?contributor . + ?contributor aocat:has_name ?contrib . + ?collection aocat:has_owner ?owner . + ?owner aocat:has_name ?own . + ?collection aocat:has_access_rights ?accessRights . + ?collection aocat:has_ARIADNE_subject ?archeologicalResourceType . + ?archeologicalResourceType skos:prefLabel ?alabel . +}; + +PREFIX aocat: +PREFIX skos: +PREFIX rdf: +INSERT { + GRAPH { + ?s aocat:has_native_subject . + rdf:type aocat:AO_Concept . + skos:prefLabel "Unknown" . + } +} +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 rdf: +INSERT { + GRAPH { ?s aocat:has_type . skos:prefLabel "provided record" . } } WHERE { - GRAPH { + GRAPH { ?s rdf:type aocat:AO_Individual_Data_Resource . MINUS { ?s rdf:type aocat:AO_Individual_Data_Resource .