From 7bd85b6946c789dc84cc9481f848603b19203c2b Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Tue, 3 Mar 2020 16:57:07 +0100 Subject: [PATCH] retrieved contributor on collection sub-select --- .../src/main/resources/query.txt | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt index c73f21c..9de7d47 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt @@ -6,49 +6,47 @@ PREFIX mine: PREFIX onto: PREFIX owl: +PREFIX ariadneplus: CONSTRUCT { ?record mine:resourcetype "AriadneCatalogEntry" . -?record mine:identifier ?record . +?record mine:identifier ?record . +?record mine:originalId ?originalId . +?record mine:issued ?issued . +?record mine:modified ?modified . +?record mine:partOf ?collection . +?record mine:creator ?creator . +?creator mine:name ?creatorName . +?creator mine:email ?creatorEmail . +?record mine:contributor ?contributor . +?contributor mine:name ?contributorName . +?contributor mine:email ?contributorEmail . +?contributor mine:type ?contributorType . ?record mine:publisher ?x . -?x a mine:AgentInfo . ?x mine:name ?publisherName . ?x mine:type ?publisherType . -?archeologicalResourceType a mine:archeologicalResourceType . ?record mine:archeologicalResourceType ?archeologicalResourceType . ?archeologicalResourceType mine:name ?archeologicalResourceTypeName . -?record mine:issued ?issued . ?record mine:resourceType ?resourceType . ?record mine:modified ?modified . ?record mine:nativeSubject ?natSub . -?natSub a mine:NativeSubject . ?natSub mine:prefLabel ?nativeSbj . ?natSub mine:aatId ?aatId . ?natSub mine:aatHeritageData ?aatHeritageData . -#?spatial a mine:Spatial . ?record mine:spatial ?spatial . ?spatial mine:placeName ?spatialPlaceName . ?spatial mine:location ?blocation . -?blocation a mine:AriadneGeoPoint . ?blocation mine:lat ?spatialLocationLat . ?blocation mine:lon ?spatialLocationLon . ?record mine:accessPolicy ?accessPolicy . ?record mine:landingPage ?landingPage . ?record mine:title ?title . ?record mine:accessRights ?accessRights . -?record mine:description ?description . -?record mine:contributor ?contributor . -?contributor a mine:AgentInfo . -?contributor mine:name ?contributorName . -?contributor mine:email ?contributorEmail . -?contributor mine:type ?contributorType . -?record mine:originalId ?originalId . +?record mine:description ?description . ?record mine:temporal ?t . -?t a mine:AriadneTemporal . ?t mine:periodName ?temporalPeriodName . ?t mine:from ?from . ?t mine:until ?until . ?record mine:language ?language . -?record mine:partOf ?collection . } from from @@ -69,13 +67,13 @@ where { union { ?record aocat:has_native_subject ?natSub . - ?natSub skos:closeMatch ?aatId . + ?natSub skos:exactMatch ?aatId . ?natSub owl:sameAs ?aatHeritageData . ?natSub skos:prefLabel ?nativeSbj . } union { - ?record aocat:has_creator / aocat:has_name ?contributorName . + ?record aocat:has_creator / aocat:has_name ?creatorName . } union { @@ -83,7 +81,7 @@ where { } union { - ?record aocat:has_creator / aocat:has_email ?contributorEmail . + ?record aocat:has_creator / aocat:has_email ?creatorEmail . } union { @@ -126,7 +124,12 @@ where { # aocat:has_type / skos:prefLabel ?type . ?record aocat:is_part_of ?collection . ?collection aocat:was_issued ?issued . + ?collection aocat:was_modified ?modified . + ?collection aocat:has_contributor / aocat:has_name ?contributorName . optional { + { + ?collection aocat:has_contributor / aocat:has_email ?contributorEmail . + } { ?collection aocat:has_publisher / rdfs:label ?publisherName . } @@ -166,5 +169,4 @@ where { BIND("organization" as ?contributorType) . BIND("organization" as ?publisherType) . -} - +} \ No newline at end of file