Linked Data, Ontologies and Inference
Although a few years old, this presentation from a development manager at the British Museum provide some interesting reading.
Which nicely leads to ModelD2RQ:
The ModelD2RQ class provides a Jena Model view on the data in a D2RQ-mapped database.
A nice example of a SPARQL query using the ModelD2RQ engine is shown here. A quick search of the web leads to an interesting discuss using similar code, but around D2RQ and entailment (somewhat dated), showing the usage of ModelFactory.createOntologyModel()
ModelFactory looks like we now have the option to add Reasoner’s between the underlying data source, and the requesting SPARQL. Interesting. I’m guessing the following code would achieve some interesting results:
<pre>final ModelD2RQ m = new ModelD2RQ(<path to mapping.ttl>); final Reasoner reasoner = <some reasoner>; final InfModel ontModel = ModelFactory.createInfModel(reasoner, m); final String sparql = <query> final Query q = QueryFactory.create(sparql); final ResultSet rs = QueryExecutionFactory.create(q, ontModel).execSelect();