You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AriadnePlus/dnet-ariadneplus-graphdb-pu.../src/main/resources/eu/dnetlib/ariadneplus/sparql/fix_landing_pages.sparql

38 lines
1.3 KiB
SPARQL

#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)
}
}