I've created a (disk) database using stardog 2.0.0.
I've loaded my ontology and some data to this database.
I can see my ontology's axioms and this data when I execute the following command:
./stardog query -v --username user --passwd pass dbname "select * where { ?s ?p ?o }"
This is a selection of the returned axioms:
?s ?p ?o
| http://www.ugent.be/chest#Infection | rdf:type | owl:Class |
| http://www.ugent.be/chest#Infection | rdf:type | http://www.ugent.be/chest#RespiratoryInfection |
| http://www.ugent.be/chest#Infection | rdf:type | owl:NamedIndividual |
| http://www.ugent.be/chest#Infection | rdfs:subClassOf | http://www.ugent.be/chest#Pathology |
This is a selection of the returned data:
| <http://www.ugent.be/chest#Infection/4641> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4642> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4643> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4644> | rdf:type | <http://www.ugent.be/chest#Infection> |
When I try to execute a query to retrieve all individuals with rdf:type Infection I get nothing.
./stardog query -v --username user --passwd pass "chest" "PREFIX : <http://www.ugent.be/chest#> select ?s where { ?s rdf:type :Infection }"
When I add reasoning type QL or EL I get
:Infection
When I add reasoning type DL I get:
com.clarkparsia.pellet.api.term.impl.entity.DataNotImpl cannot be cast to com.clarkparsia.pellet.api.term.entity.ClassExpression
The same goes for a consistency check.
Am i doiing something wrong?
DL reasoning is only permitted for queries over your TBox, so your given query won't be answered using reasoning; keep that in mind when using Stardog's reasoning capabilities.
With that said, you're never supposed to get a ClassCastException. Try with the latest Stardog, you're three releases behind, and if the problem still exists, send a self-contained minimal example to the mailing list and we'll be happy to fix it.