Hi Brian,
There were two different issues you encountered. In the first case,
the schema axioms were being ignored completely since by default
Stardog uses only the default graph for schema axioms. If you create
your database as follows the schema axioms in any graph will be taken
into account:
bin/stardog-admin db create -o "reasoning.schema.graphs=*" -n myDb myData.trig
You can set this config option after database creation using
"stardog-admin metadata set" command as well but you'll need to
offline/online db before/after.
The second issue is Stardog being very picky about untyped properties.
There is no type triple for field:Bar and it does not appear in any
schema axiom either. In such cases Stardog cannot decide if it is an
object or datatype property and it falls back to no reasoning. There
is typically a warning in the log about this though I'm not sure if it
was logged in this case. We will be improving how these reasoning
queries are handled in the future but you can use one of the following
two workarounds right now. You can just add a type triple for fieldBar
into you data:
field:Bar a owl:DatatypeProperty .
then the query should work as is. Or you can modify your query to
include the type triple in the query:
prefix field: <
http://www.example.com/fieldNames#>
select ?s ?bar ?foo where {
graph <urn:foo:bar-2014-03-11> {
?s field:Bar ?bar ;
field:foo ?foo .
field:Bar a owl:DatatypeProperty .
}
}
Best,
Evren