I am trying to write a SPARQL query which should give me all foaf:Agents
which aren't foaf:Persons
.
I can't see a way to apply this OPTIONAL/BOUND construct to this problem, because all the properties like rdfs:subClassOf
and rdf:type
are transitive and reflexive.
I tried this:
SELECT * WHERE {
?x rdf:type foaf:Agent
OPTIONAL { ?y rdf:type foaf:Person }
FILTER ( !BOUND(?y) ) }
But rdf:type seems to be transitive, at least with JENA/ARQ/SDB.