diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt index 279f092..05e0366 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/query.txt @@ -47,24 +47,52 @@ CONSTRUCT { ?record mine:partOf ?collection . } +#from onto:explain where { ?record aocat:has_title ?title ; - aocat:has_access_policy / rdfs:label ?accessRights ; - aocat:has_description ?description ; - aocat:has_creator / aocat:has_name ?contributorName ; +# aocat:has_access_rights ?accessRights ; + aocat:has_creator / aocat:has_name ?contributorName ; aocat:has_creator / aocat:has_email ?contributorEmail ; - - aocat:has_access_policy ?accessPolicy ; - aocat:has_landing_page / rdfs:label ?landingPage ; - aocat:is_part_of ?collection ; aocat:has_spatial_coverage ?spatial ; aocat:has_native_subject / skos:prefLabel ?nativeSbj ; aocat:has_original_id ?originalId ; - aocat:has_temporal_coverage / aocat:has_period / skos:prefLabel ?temporalPeriodName ; - aocat:has_temporal_coverage / aocat:from ?from ; - aocat:has_temporal_coverage / aocat:until ?until ; aocat:has_language / skos:prefLabel ?language . + { + ?record aocat:has_access_rights ?accessRights . + } + union + { + ?record aocat:has_description ?description . + } + union + { + ?record aocat:has_access_policy / rdfs:label ?accessPolicy . + } + union + { + ?record aocat:has_landing_page / rdfs:label ?landingPage . + } + union + { + ?record aocat:is_part_of ?collection . + } + union + { + ?record aocat:has_temporal_coverage ?t . + ?t aocat:has_period / skos:prefLabel ?temporalPeriodName . + } + union + { + ?record aocat:has_temporal_coverage ?t . + ?t aocat:from ?from . + } + union + { + ?record aocat:has_temporal_coverage ?t . + ?t aocat:until ?until . + } + { select * where { @@ -79,14 +107,28 @@ where { { select * where { - ?spatial aocat:has_place_name ?spatialPlaceName ; - aocat:has_latitude ?spatialLocationLat ; + ?spatial aocat:has_place_name ?spatialPlaceName . + { + ?spatial aocat:has_latitude ?spatialLocationLat . + BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLat)))) as ?blocation) + } + union + { + ?spatial aocat:has_longitude ?spatialLocationLon . + BIND(uri(concat('http://www.myprefix/location/', md5(str(?spatialLocationLon)))) as ?blocation) + } + union + { + ?spatial aocat:has_latitude ?spatialLocationLat ; aocat:has_longitude ?spatialLocationLon . BIND(uri(concat('http://www.myprefix/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?blocation) + } + } } BIND("organization" as ?contributorType) . -BIND("organization" as ?publisherType) . +BIND("organization" as ?publisherType) . + }