query-baa71d05ade9ee599380722e87b290ed

rq turtle/ttl

Overview of Category and Gallery pages of plant species on Wikimedia Commons SELECT DISTINCT ?plate ?plateLabel ?plantDecpicted ?scientificNameInFB ?scientificNameModern ?dutchTrivialNameModern ?plantDecpictedWikipediaNL ?plantDecpictedCommonsCat ?plantDecpictedCommonsCatBotIll ?plantDecpictedCommonsGal WHERE { wd:Q117860156 wdt:P527 ?volume. ?volume wdt:P527 ?plate. OPTIONAL{?plate wdt:P18 ?plateImage.} ?plate wdt:P1476 ?scientificNameInFB. FILTER(lang(?scientificNameInFB)='la')

?plate wdt:P180 ?plantDecpicted. ?plantDecpicted rdfs:label ?scientificNameModern . FILTER(lang(?scientificNameModern)='la') ?plantDecpicted rdfs:label?dutchTrivialNameModern . FILTER(lang(?dutchTrivialNameModern)='nl')

OPTIONAL{?plantDecpictedWikipediaNL schema:about ?plantDecpicted; schema:isPartOf https://nl.wikipedia.org/.} OPTIONAL{?plantDecpicted wdt:P373 ?plantDCCat. BIND(REPLACE(?plantDCCat, " ", "", "i") AS ?plantDCCat2)
BIND(URI(CONCAT('https://commons.wikimedia.org/wiki/Category:', ?plantDCCat2)) AS ?plantDecpictedCommonsCat). BIND(URI(CONCAT(STR(?plantDecpictedCommonsCat),'
-botanical_illustrations')) AS ?plantDecpictedCommonsCatBotIll). } OPTIONAL{?plantDecpicted wdt:P935 ?plantDCGal. BIND(REPLACE(?plantDCGal, " ", "", "i") AS ?plantDCGal2)
BIND(URI(CONCAT('https://commons.wikimedia.org/wiki/', ?plantDCGal2)) AS ?plantDecpictedCommonsGal). } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl". } } ORDER BY ?plateLabel

Use at

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Overview of Category and Gallery pages of plant species on Wikimedia Commons
SELECT DISTINCT 
?plate ?plateLabel
?plantDecpicted
?scientificNameInFB ?scientificNameModern ?dutchTrivialNameModern
?plantDecpictedWikipediaNL
?plantDecpictedCommonsCat ?plantDecpictedCommonsCatBotIll ?plantDecpictedCommonsGal
WHERE {
  wd:Q117860156 wdt:P527 ?volume.
  ?volume wdt:P527 ?plate.
  OPTIONAL{?plate wdt:P18 ?plateImage.}
  ?plate wdt:P1476 ?scientificNameInFB. FILTER(lang(?scientificNameInFB)='la')

  ?plate wdt:P180 ?plantDecpicted.
  ?plantDecpicted rdfs:label ?scientificNameModern . FILTER(lang(?scientificNameModern)='la')
  ?plantDecpicted rdfs:label?dutchTrivialNameModern . FILTER(lang(?dutchTrivialNameModern)='nl')

  OPTIONAL{?plantDecpictedWikipediaNL schema:about ?plantDecpicted; 
           schema:isPartOf <https://nl.wikipedia.org/>.}
  OPTIONAL{?plantDecpicted wdt:P373 ?plantDCCat.
            BIND(REPLACE(?plantDCCat, " ", "_", "i") AS ?plantDCCat2)  
            BIND(URI(CONCAT('https://commons.wikimedia.org/wiki/Category:', ?plantDCCat2)) AS ?plantDecpictedCommonsCat). 
            BIND(URI(CONCAT(STR(?plantDecpictedCommonsCat),'_-_botanical_illustrations')) AS ?plantDecpictedCommonsCatBotIll). 
           }
  OPTIONAL{?plantDecpicted wdt:P935 ?plantDCGal.
          BIND(REPLACE(?plantDCGal, " ", "_", "i") AS ?plantDCGal2)  
          BIND(URI(CONCAT('https://commons.wikimedia.org/wiki/', ?plantDCGal2)) AS ?plantDecpictedCommonsGal). 
          }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl". } 
}
ORDER BY ?plateLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?dutchTrivialNameModern"):::projected v10("?plantDCCat") v11("?plantDCCat2") v14("?plantDCGal") v15("?plantDCGal2") v8("?plantDecpicted"):::projected v12("?plantDecpictedCommonsCat"):::projected v13("?plantDecpictedCommonsCatBotIll"):::projected v16("?plantDecpictedCommonsGal"):::projected v9("?plantDecpictedWikipediaNL"):::projected v6("?plate"):::projected v7("?plateImage") v1("?plateLabel"):::projected v4("?scientificNameInFB"):::projected v3("?scientificNameModern"):::projected v5("?volume") c3(["wd:Q117860156"]):::iri c17(["#91;AUTO_LANGUAGE#93;,nl"]):::literal c15(["bd:serviceParam"]):::iri c11([https://nl.wikipedia.org/]):::iri f0[["?dutchTrivialNameModern = 'nl'"]] f0 --> v2 f1[["?scientificNameModern = 'la'"]] f1 --> v3 f2[["?scientificNameInFB = 'la'"]] f2 --> v4 c3 --"wdt:P527"--> v5 v5 --"wdt:P527"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P18".-> v7 end v6 --"wdt:P1476"--> v4 v6 --"wdt:P180"--> v8 v8 --"rdfs:label"--> v3 v8 --"rdfs:label"--> v2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v9 -."schema:about".-> v8 v9 --"schema:isPartOf"--> c11 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P373".-> v10 bind3[/"replace(?plantDCCat,' ','_','i')"/] v10 --o bind3 bind3 --as--o v11 bind4[/"concat('https://commons.wikimedia.org/wiki/Category:',?plantDCCat2)"/] v11 --o bind4 bind4 --as--o v12 bind5[/"concat(str(?plantDecpictedCommonsCat),'_-_botanical_illustrations')"/] v12 --o bind5 bind5 --as--o v13 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P935".-> v14 bind6[/"replace(?plantDCGal,' ','_','i')"/] v14 --o bind6 bind6 --as--o v15 bind7[/"concat('https://commons.wikimedia.org/wiki/',?plantDCGal2)"/] v15 --o bind7 bind7 --as--o v16 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c15 --"wikibase:language"--> c17 end