query-7574817ec9ea4d6aa986afba7de02e80
TODO
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 schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid
SELECT ?file ?image ?stype ?stypeLabel ?collec ?collecLabel ?role ?roleLabel ?de ?deLabel
WHERE {
?file wdt:P180 ?stype ; schema:contentUrl ?url .
bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", replace(substr(str(?url),53),"_","%20"))) AS ?image) .
#?file wdt:P180 wd:Q105607273 .
{
select ?stype ?stypeLabel ?collec ?collecLabel ?role ?de ?roleLabel ?deLabel {
service <https://query.wikidata.org/sparql> {
select ?stype ?stypeLabel ?collec ?collecLabel ?role ?de ?roleLabel ?deLabel {
?stype wdt:P31/wdt:P279* wd:Q51255340
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
optional {
?stype wdt:P195 ?collec .
}
optional {
?stype p:P2868 [ps:P2868 ?role ; pq:P642 ?de]
}
#enlevez les # au dessous pour préciser une ou des collections
#values ?collec {
# wd:Q122945 # exemple avec le Yale Peabody Museum of Natural History
#}
}
}
}
}}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?collec"):::projected
v7("?de"):::projected
v1("?file"):::projected
v4("?image"):::projected
v6("?role"):::projected
v2("?stype"):::projected
v3("?url")
a1((" "))
a2((" "))
c6(["wd:Q51255340"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P180"--> v2
v1 --"schema:contentUrl"--> v3
bind0[/"concat('http://commons.wikimedia.org/wiki/Special:FilePath/',replace(substring(str(?url),'53^^xsd:integer'),'_','%20'))"/]
v3 --o bind0
bind0 --as--o v4
subgraph s1["https://query.wikidata.org/sparql"]
style s1 stroke-width:4px;
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c6
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P195".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a2 -."p:statement/P2868".-> v6
a2 --"p:qualifier/P642"--> v7
v2 --"p:P2868"--> a2
end
end