A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/catalogue_images.sparql
Catalogue aspect: images
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:ImageGrid
PREFIX target: <http://www.wikidata.org/entity/Q51467536>
SELECT
?image
?item ?itemLabel
WHERE {
?item wdt:P972 target: ;
wdt:P18 ?image .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,da,es,fr,jp,nl,no,ru,sv,zh". }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?image"):::projected
v1("?item"):::projected
c5([http://www.bigdata.com/rdf#serviceParam]):::iri
c2([http://www.wikidata.org/entity/Q51467536]):::iri
c7(["#91;AUTO_LANGUAGE#93;,mul,en,da,es,fr,jp,nl,no,ru,sv,zh"]):::literal
v1 --"p:direct/P972"--> c2
v1 --"p:direct/P18"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end