Question

I'm writing an application using OWL-API and Hermit Reasoner. I would like to query data using SPARQL-DL by submitting query like:

PREFIX wine: <http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#>
SELECT ?i
 WHERE { Type(?i, wine:PinotBlanc) }
 OR WHERE { Type(?i, wine:DryRedWine) }

Can I Do this directy with owl-api or should I use an external library (http://www.derivo.de/en/resources/sparql-dl-api/ ) ? ( I need something like queryEngine.query(my_query); )

Was it helpful?

Solution

As in July 2013, the OWL-API does not support natively SPARQL-DL. You need to plug a third party library in order to make it work.

I am aware of two implementations (there's maybe more): One by Derivo (your link) and another one by Pellet.

OTHER TIPS

I used OWL-API with Hermit and Pellet; both worked fine. The advantage of Pellet over Hermit is that it supports built-ins.

i.e. In Pellet, for some class Teenager, you can get seventeen year old persons using the following query:

Person and (hasAge value "17.0"^^double) 

If you (or somebody) are still interested in, I can provide the Java class for it.

A pure OWL-API-impl cannot provide non-workaround way to support SPARQL since it is not graph based solution. Now, starting v5, there is ONT-API which is jena-based OWL-API impl.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top