Hello,

I'm trying to get negated data with SPARQL (individuals of an ontology that do not belong to a certain class), but I could not figure out how to write the appropriate query therefore. It's working for object properties and using FILTER NOT EXIST, but this one I can't manage.

Could you help me out here please?

The query should somehow look like this:

"PREFIX ro:<http://www.semanticweb.org/ontologies/2012/4/test_ontology.owl#> SELECT ?r WHERE NOT{?r a ro:RelatedRequirement}";

The NOT is just placed here to indicate that I want to get all individuals that are NOT instances of the ontology class RelatedRequirement.

Thanks,
Katja

Reply via email to