name
password
remember
EN
|
DE
|
ES
4:57 PM
Frederic
message (192)
Code
Filterprofile (8)
Answer (53)
Journal
Stamm
(metapher)
6/25/1996
41.40
Frederic
Das bin Ich - eine Privatperson wie Ihr/Wir Alle
https://www.oli-it.com
message
Frederic
6/23/2011
0.01
16331
[*]
HOWTO get only the direct rdf:type with SPARQL
My RDF graph describes a class hierarchy (rdfs:subClassOf) and some instances (rdf:type) of these classes. For a GUI treeview I need all the instances (leaves) and their direct type.
With reasoning I can query for all the instances (leaves) but get [...]
author (1)
description (1)
recipient (1)
answer (2)
answers (2)
Stamm
Answer
Lohn
Toll
Frederic
2011
sesame:directType
try this predicate
0.48
Frederic
2011
one option
From the slide show "sparql cheat sheet" by Lee Feigenbaum page 12 (see link):
you can try it without reasoning and just the SPARQL 1.1 quantifiers. But you have to know the max depth of your hierarchy first.
select * where {
?sub rdfs:subClassOf{1,3} A.
?x rdf:type{1} ?sub.
}
0.48
1