query-299b441af262cc032a44e3fc5ed90b80
Image gallery of works by J. M. W. Turner with IIIF links
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid{"hide": ["?image","?placeholder"]}
SELECT ?thingLabel ?image ?placeholder (URI(CONCAT('https://tools.wmflabs.org/mirador/?manifest=', STR(?iiif))) AS ?iiiflink) WHERE {
?thing wdt:P6108 ?iiif;
wdt:P170 wd:Q159758. # creator: Turner
OPTIONAL{ ?thing wdt:P18 ?img }
BIND (IF(BOUND(?img), ?img, <http://commons.wikimedia.org/wiki/Special:FilePath/No%20image%20available.svg>) AS ?image)
BIND (IF(BOUND(?img), 0, 1) AS ?placeholder)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?placeholder
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?iiif"):::projected
v6("?iiiflink")
v5("?image"):::projected
v4("?img")
v6("?placeholder"):::projected
v2("?thing")
c6(["bd:serviceParam"]):::iri
c3(["wd:Q159758"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P6108"--> v3
v2 --"wdt:P170"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
bind0[/"if(bound(?img),?img,http://commons.wikimedia.org/wiki/Special:FilePath/No%20image%20available.svg)"/]
v4 --o bind0
bind0 --as--o v5
bind1[/"if(bound(?img),'0^^xsd:integer','1^^xsd:integer')"/]
v4 --o bind1
bind1 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind2[/"concat('https://tools.wmflabs.org/mirador/?manifest=',str(?iiif))"/]
v3 --o bind2
bind2 --as--o v6