info about landing pages

This commit is contained in:
Alessia Bardi 2022-11-08 19:35:54 +01:00
parent 7abb9418fe
commit d9c0b4c136
1 changed files with 38 additions and 0 deletions

View File

@ -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: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::<PROVIDER>::<API>> {
?s aocat:has_landing_page ?lpResource .
?lpResource rdfs:label ?url
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::<PROVIDER>::<API>> {
?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: <https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::<PROVIDER>::<API>> {
?lpResource rdfs:label ?label
}
}
WHERE {
GRAPH <https://ariadne-infrastructure.eu/api_________::ariadne_plus::<PROVIDER>::<API>> {
?s aocat:has_landing_page ?lpResource .
BIND (STR(?lpResource) as ?label)
}
}