From 06743fd4fbdea434125ec172840c84a784c3f9f2 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 5 Oct 2022 15:02:53 +0200 Subject: [PATCH] enrich queries for CNR MASA (OpenArcheo) --- .../ordered_sparql_insert_CNRS_archaeo.sparql | 192 +++++------------- 1 file changed, 47 insertions(+), 145 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql index 33362f4..2c6bc2c 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/enrich/CNRS/ordered_sparql_insert_CNRS_archaeo.sparql @@ -61,131 +61,6 @@ WHERE { } }; -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 . - MINUS { - ?s rdf:type . - ?s aocat:has_contributor ?c - } - } -}; - -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 . - MINUS { - ?s rdf:type . - ?s aocat:has_creator ?c - } - } -}; - -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 . - MINUS { - ?s rdf:type . - ?s aocat:has_responsible ?c - } - } -}; - -PREFIX aocat: -PREFIX rdf: -PREFIX rdfs: -INSERT { -GRAPH { - ?s aocat:has_access_rights "Information unavailable" . -} -} -WHERE { - GRAPH { - ?s rdf:type . - MINUS { - ?s rdf:type . - ?s aocat:has_access_rights ?c - } - } -}; - - -PREFIX aocat: -PREFIX rdf: -PREFIX rdfs: -PREFIX skos: -INSERT { - GRAPH { - ?s aocat:has_native_subject . - rdf:type aocat:AO_Concept . - rdfs:label "Native subject not provided" . - skos:prefLabel "Native subject 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: -PREFIX skos: -INSERT { - GRAPH { - ?t aocat:has_native_period . - rdf:type aocat:AO_Concept . - rdfs:label "Native period not provided" . - skos:prefLabel "Native period not provided" . - } -} -WHERE { - GRAPH { - ?s aocat:has_temporal_coverage ?t . - MINUS { - ?s aocat:has_temporal_coverage ?t . - ?t aocat:has_native_period ?np . - } - } -}; PREFIX aocat: PREFIX rdf: @@ -244,27 +119,7 @@ INSERT { ?ns aocat:has_title ?nstitle } }; -PREFIX aocat: -PREFIX rdf: -INSERT { - GRAPH { - ?x aocat:has_name "Name not provided" . - - } - } - WHERE { - GRAPH { - ?s rdf:type . - ?s aocat:has_responsible ?x . - MINUS{ - ?s rdf:type . - ?s aocat:has_responsible ?x . - ?x aocat:has_name ?legalResponsibleName . - } - - } -}; PREFIX skos: PREFIX aocat: @@ -301,3 +156,50 @@ WHERE { } }; + PREFIX dcterms: + PREFIX aocat: + INSERT { + GRAPH { + ?periodO ?pred ?o . + ?o ?pred2 ?o2 . + ?o2 ?pred3 ?o3 . + } + } + WHERE { + GRAPH { + ?temporal aocat:has_period ?periodO . + } + GRAPH { + ?periodO ?pred ?o . + optional { + ?o ?pred2 ?o2 . + optional { + ?o2 ?pred3 ?o3 . + } + } + } + }; + +PREFIX skos: +PREFIX aocat: +INSERT { + GRAPH { + ?temporal aocat:has_period ?periodO . + ?temporal aocat:from ?temporalFrom . + ?temporal aocat:until ?temporalUntil . + } +} +USING +USING +WHERE { + ?temporal aocat:has_period ?periodO . + ?periodO time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy time:hasDateTimeDescription ?startTimeDescr . + ?startTimeDescr time:year ?temporalFrom . + ?periodO time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy time:hasDateTimeDescription ?finishedTimeDescr . + ?finishedTimeDescr time:year ?temporalUntil . +}; + + +