Stardog: Reasoning doesn't recognize subClassOf

in stardog studio, I have created a basic database. and added the following rdf data.

When I query this database with a reasoning "on", I don't find expected results.

I expect Alice, Charlie to be recognized as http://example.org/Person. When activating reasoning, everything is recognised as owl:Thing, and no inference is made about Alice being a Person

`<?xml version="1.0"?>
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:ex="http://example.org/">

<!-- Classes -->
<rdf:Description rdf:about="http://example.org/Person">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
    <rdfs:label>Person</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/Student">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
    <rdfs:subClassOf rdf:resource="http://example.org/Person"/>
    <rdfs:label>Student</rdfs:label>
</rdf:Description>
<!-- Instances -->
<rdf:Description rdf:about="http://example.org/Alice">
    <rdf:type rdf:resource="http://example.org/Student"/>
    <rdfs:label>Alice</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/Charlie">
    <rdf:type rdf:resource="http://example.org/Person"/>
    <rdfs:label>Charlie</rdfs:label>
</rdf:Description>
</rdf:RDF>`

Query

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX ex: <http://example.org/>
 SELECT ?individual ?class
 WHERE {
 ?individual rdf:type ?class .
 }

Hi Omar,

If you added the data to the default graph, this means that both your data (A-Box) and your schema (T-Box) are in the default graph. Therefore, you need to set the schema graphs option (reasoning.schema.graphs) of your database to the default graph (tag:stardog:api:context:default). You can do so in the Properties tab of your database:

In general you can add your schema/ontology to any named graph as long as the named graph is included in the reasoning.schema.graphs reasoning will work.

Best regards,

Lars

Hi Lars,

Yes, it worked! Thanks

Best regards,

Omar