name password
OLI-it Text
EN | DE | ES 4:57 PM
Frederic

Nachricht message (192)
Code, Markierung  Code


Angler Filterprofile (8)


TopLab Answer (53)

Journal
 
Stamm (metapher)
6/25/1996
41.40
HyperLink

/280eb06a-17f1-41b8-8a27-258875495d8c/atomkraft_nein_danke.jpg 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 [...]
Urheber author (1) PostItAngler description (1) PostItAngler recipient (1) PostItTopLab answer (2)
 

answers (2)

StammAnswerLohnTollabsteigend
/280eb06a-17f1-41b8-8a27-258875495d8c/atomkraft_nein_danke.jpg Frederic
2011
http://www.openrdf.org/doc/sesame2/api/org/openrdf/model/vocabulary/SESAME.html#DIRECTTYPE
sesame:directType
try this predicate
0.48
/280eb06a-17f1-41b8-8a27-258875495d8c/atomkraft_nein_danke.jpg Frederic
2011
http://www.slideshare.net/LeeFeigenbaum/sparql-cheat-sheet
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


© 1994 - 2026 | copyright | imprint | comments: info@oli-it.com
4.5.9587.38753-production