Using SPARQL for limited RDFS and OWL reasoning

Viewed 2422

What I'm currently using rdflib for creating and managing RDF graphs in Python. RDFlib doesn't do any RDFS or OWL reasoning, though. This leads to results like the following:

  1. If I have

    A rdf:type MyType .
    MyType rdfs:subClassOf SuperType .
    

    and I ask

    select ?x where {?x rdf:type SuperType}
    

    then I get nothing, but I'd like to get A (by RDFS semantics).

  2. The same thing happens with owl:equivalentClass. If I have

    A rdf:type MyType .
    MyType owl:equivalentClass SiblingType .
    

    and I ask

    select ?x where {?x rdf:type SiblingType}
    

    I'd like to get A, but I get nothing.

Is there a way to get these results?

2 Answers
Related