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 . } } {