With the following RDF in Blazegraph (taken from this answer):
:eats rdf:type owl:ObjectProperty .
:Vegetable rdf:type owl:Class ;
rdfs:subClassOf owl:Thing .
:Vegetarian rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :eats ;
owl:someValuesFrom :Vegetable
] .
:Carrot rdf:type :Vegetable ,
owl:NamedIndividual .
:John rdf:type owl:NamedIndividual , owl:Thing ;
:eats :carrot .
the following SPARQL is returning blank:
select ?who
where
{
?who a :Vegetarian .
}
Here are the Blazegraph namespace configs (Blazegraph is running as NanoSparqlServer from command line):
com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor 1024
com.bigdata.relation.container test-ng-2
com.bigdata.journal.AbstractJournal.bufferMode DiskRW
com.bigdata.journal.AbstractJournal.file bigdata.jnl
com.bigdata.journal.AbstractJournal.initialExtent 209715200
com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass com.bigdata.rdf.vocab.DefaultBigdataVocabulary
com.bigdata.rdf.store.AbstractTripleStore.textIndex false
com.bigdata.btree.BTree.branchingFactor 128
com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor 400
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass com.bigdata.rdf.axioms.OwlAxioms
com.bigdata.service.AbstractTransactionService.minReleaseAge 1
com.bigdata.rdf.sail.truthMaintenance true
com.bigdata.journal.AbstractJournal.maximumExtent 209715200
com.bigdata.rdf.sail.namespace test-ng-2
com.bigdata.relation.class com.bigdata.rdf.store.LocalTripleStore
com.bigdata.rdf.store.AbstractTripleStore.quads false
com.bigdata.relation.namespace test-ng-2
com.bigdata.btree.writeRetentionQueue.capacity 4000
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers true
What am I missing?
This data is not well formed yet:
You'd also need to say that :carrot is an individual of type :Carrot, with an assertion like:
Then, since :carrot will be an instance of :Carrot, and :Carrot is a subclass of :Vegetable, you can infer that :carrot is an instance of :Vegetable, and thus that :John :eats some :Vegetable. If Blazegraph supports OWL reasoning (e.g., not just RDFS reasoning), that should be enough to let you infer that :John is a :Vegetarian (at least according to this non-standard definition of vegetarian).
The reason seems to be in the fact that in
you start Carrot from a capital letter, but in
you use lowercase letter.
There are some RDF syntax issues, but the underlying reason is that Blazegraph does not support OWL Reasoning out of the box. See current support. There has been some work towards and ELK Reasoner.
Regarding the RDF in this example, here's an update that is validated to load in Blazegraph 1.5.1. It incorporates the feedbackup above and adds namespaces. I created a properties (test.properties) file with your properties above and loaded Blazegraph with the executable jar from Sourceforge.
java -Xmx2g -Dbigdata.propertyFile=test.properties -jar bigdata-bundled.jar
Go to the workbench: http://localhost:9999/bigdata/ and paste the RDF below into the "Update" tab on the workbench selecting "RDF Data" with the format "Turtle".
If you then go to the query tab and run something like:
You'll see all of the triples inferred by the OWLAxiomsVocabulary.