query-83e25770cee924aac8ab3eb08a1d809d
KOS with Mapping properties
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?bartoc ?kos ?de ?en ?prop ?propLabel
WHERE
{
?kos wdt:P31/wdt:P279* wd:Q6423319 .
{
{ ?kos wdt:P1687 ?prop } UNION { ?prop wdt:P1629 ?kos }
}
OPTIONAL { ?kos rdfs:label ?en . FILTER (lang(?en) = 'en') }
OPTIONAL { ?kos rdfs:label ?de . FILTER (lang(?de) = 'de') }
OPTIONAL { ?kos wdt:P2689 ?id }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" }
BIND(IRI(CONCAT("http://bartoc.org/en/",?id)) as ?bartoc)
} ORDER BY ?kos
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?bartoc"):::projected
v2("?de"):::projected
v3("?en"):::projected
v5("?id")
v1("?kos"):::projected
v4("?prop"):::projected
a1((" "))
c5(["wd:Q6423319"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["de,en"]):::literal
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P1629"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1687"--> v4
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."rdfs:label".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."rdfs:label".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2689".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind0[/"concat('http://bartoc.org/en/',?id)"/]
v5 --o bind0
bind0 --as--o v6