https://linked.ope...aph-browser/query
| - PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdab: <https://linked.opendata.cz/resource/vocabulary/knowledge-graph-browser/wikidata/animals/>
PREFIX browser: <https://linked.opendata.cz/ontology/knowledge-graph-browser/>
CONSTRUCT {
?childTaxon a wdab:taxon ;
rdfs:label ?childTaxonLabel ;
wdab:broader ?node ;
browser:class "taxon", ?childTaxonClass .
wdab:broader browser:class "broader" .
} WHERE {
?childTaxon wdt:P171 ?node .
OPTIONAL {
?childTaxon wdt:P105 ?childTaxonRank .
?childTaxonRank rdfs:label ?childTaxonRankLabel .
FILTER(lang(?childTaxonRankLabel) = "en")
BIND(IF(?childTaxonRank IN (wd:Q7432, wd:Q34740, wd:Q35409, wd:Q36602, wd:Q37517, wd:Q38348, wd:Q36732, wd:Q146481), ?childTaxonRankLabel, "unsupportedTaxon") AS ?childTaxonClass)
}
#FILTER(?childTaxonRank IN (wd:Q7432, wd:Q34740, wd:Q35409, wd:Q36602, wd:Q37517, wd:Q38348, wd:Q36732, wd:Q146481))
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
|