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();

Some code on the web is available here, here, and a FOAF example with reasoner and rule here.

Finally, a more recent blog posting on the topic, and also a reminder that the d2rq language is powerful, and offer the ability to join to yourself – d2rq:alias

~ by mdavey on May 17, 2016.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: