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 {
?parentTaxon a wdab:taxon ;
rdfs:label ?parentTaxonLabel ;
browser:class "taxon", ?parentTaxonClass .
?node wdab:broader ?parentTaxon .
wdab:broader browser:class "broader" .
} WHERE {
?node wdt:P171 ?parentTaxon .
OPTIONAL {
?parentTaxon wdt:P105 ?parentTaxonRank .
?parentTaxonRank rdfs:label ?parentTaxonRankLabel .
FILTER(lang(?parentTaxonRankLabel) = "en")
BIND(IF(?parentTaxonRank IN (wd:Q7432, wd:Q34740, wd:Q35409, wd:Q36602, wd:Q37517, wd:Q38348, wd:Q36732, wd:Q146481), ?parentTaxonRankLabel, "unsupportedTaxon") AS ?parentTaxonClass)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
|