From 7ae6d400b6244ce66c6e958267d3c451b6443019 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Fri, 20 Mar 2020 13:01:54 +0100 Subject: [PATCH] temporal coverage joined with periodO data that must be directly imported in graphDb in turtle format together with periodO mapping --- .../src/main/resources/query.txt | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt index ad248f5..0b8bb48 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt @@ -4,6 +4,7 @@ PREFIX skos: PREFIX aoprop: PREFIX onto: PREFIX ariadneplus: +PREFIX time: CONSTRUCT { ?record aoprop:resourcetype "AriadneCatalogEntry" . @@ -41,8 +42,7 @@ CONSTRUCT { ?spatialRegionBox aoprop:boxMaxLon ?spatialLocationBBMaxLon . ?spatialRegionBox aoprop:boxMinLat ?spatialLocationBBMinLat . ?spatialRegionBox aoprop:boxMinLon ?spatialLocationBBMinLon . -?record aoprop:temporal ?temporal . -?temporal aoprop:uri ?temporal . +?record aoprop:uri ?temporal . ?temporal aoprop:periodName ?temporalPeriodName . ?temporal aoprop:from ?temporalFrom . ?temporal aoprop:until ?temporalUntil . @@ -58,10 +58,12 @@ CONSTRUCT { ?record aoprop:language ?language . } from -from +from +from +from where { ?record aocat:has_language / skos:prefLabel ?language . - ?record aocat:has_original_id ?originalId . + ?record aocat:has_original_id ?originalId . ?record aocat:is_part_of ?partOf . ?record aocat:has_creator ?creator . ?creator aocat:has_name ?creatorName . @@ -93,13 +95,18 @@ where { } optional { ?record aocat:has_temporal_coverage ?temporal . + ?temporal aocat:has_period / rdfs:label ?temporalPeriodName . } optional { ?record aocat:has_temporal_coverage ?temporal . - ?temporal aocat:has_period / skos:prefLabel ?temporalPeriodName . + ?temporal aocat:has_native_period ?nativePeriod . + ?nativePeriod skos:prefLabel ?temporalPeriodName . optional { - ?temporal aocat:from ?temporalFrom . - ?temporal aocat:until ?temporalUntil . + ?nativePeriod skos:exactMatch ?periodORef . + ?periodORef time:intervalStartedBy ?intervalStartedBy . + ?intervalStartedBy skos:prefLabel ?temporalFrom . + ?periodORef time:intervalFinishedBy ?intervalFinishedBy . + ?intervalFinishedBy skos:prefLabel ?temporalUntil . } } {