From d9c0b4c136f29a4d12661e924ee6f63969d3e922 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Tue, 8 Nov 2022 19:35:54 +0100 Subject: [PATCH] info about landing pages --- .../sparql/fix_landing_pages.sparql | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/fix_landing_pages.sparql b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/fix_landing_pages.sparql index e69de29..67d7a45 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/fix_landing_pages.sparql +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/eu/dnetlib/ariadneplus/sparql/fix_landing_pages.sparql @@ -0,0 +1,38 @@ +#Landing pages are picked as: +# %record aocat:has_landing_page / rdfs:label ?landingPage . +# Alessia does not know why, but indeed other providers gave the landing page like this and they are fine. +# Others follow a more "reasonable" approach, but we have to fix those so they match the expected pattern. + +# if the landing page is a string + + PREFIX aocat: + PREFIX rdfs: + INSERT { + GRAPH ::> { + ?s aocat:has_landing_page ?lpResource . + ?lpResource rdfs:label ?url + } + + } + WHERE { + GRAPH ::> { + ?s aocat:has_landing_page ?url . + BIND (IRI(?url) as ?lpResource) + } + } + +#if the landing page is a URI but there is no label + PREFIX aocat: + PREFIX rdfs: + INSERT { + GRAPH ::> { + ?lpResource rdfs:label ?label + } + + } + WHERE { + GRAPH ::> { + ?s aocat:has_landing_page ?lpResource . + BIND (STR(?lpResource) as ?label) + } + } \ No newline at end of file