{"postItGuid":"a57e4bd9-9c54-4809-beb3-fbed0fad342c","titel":"HOWTO get only the direct rdf:type with SPARQL","postIt1":"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.\r\n\r\nWith reasoning I can query for all the instances (leaves) but get all the inferred super classes also. I need just the direct rdf:type. How can I SPARQL it?\r\n\r\nA rdf:type rdfs:Class .\r\nB rdfs:subClassOf A .\r\nC rdfs:subClassOf B .\r\nI1 rdf:type B .\r\nI2 rdf:type C .\r\nI3 rdf:type C .\r\n\r\nSELECT * WHERE {\r\n?s a A .\r\n?s a ?t .\r\n}\r\n\r\n?s   ?t\r\n---- -----\r\nI1   B\r\nI2   C\r\nI3   C\r\n\r\nbut I get also all the inferred statements. That's right but\r\nI want to exclude it from the result:\r\n\r\nI1   rdfs:Resource\r\nI1   rdfs:Class\r\nI2   rdfs:Resource\r\nI2   rdfs:Class\r\nI2   B\r\nI3   rdfs:Resource\r\nI3   rdfs:Class\r\nI3   B\r\n","datum":"2011-06-23T19:56:29.183","kooK":0.0100,"postItZust":1,"url":"","datei":"","hits":11232,"typ":"txt","codes":[],"provisions":[],"topLabs":[],"wurzelns":[]}