Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] owl:sameAs not correctly working

Hi Johan,

First of all: this mailinglist (rdf4j-dev) is really intended for discussion about RDF4J project development - for usage questions we have a separate list, the rdf4j-users group. See https://groups.google.com/d/forum/rdf4j-users . Not a big deal this time around but could you direct future questions to that list instead?

As to your question: interpreting the owl:sameAs relation (or any other inference based owl or rdfs constructions) is something that requires the use of a reasoner. The RDF4J SPARQL engine does not, by default, use any reasoner. So to get something like owl:sameAs to work, you will need to make sure you use a database configuration that supports (OWL) reasoning.

RDF4J itself does not have a ready-made OWL reasoner, however, something like Ontotext GraphDB might be what you need if you need generic OWL support. If it is specifically only support for the owl:sameAs property you need, there are a couple of possible workarounds without the use of third party tools. One option is to rewrite your query, using a path _expression_. For example, to get back all children of bob (including all resources that are owl:sameAs bob) you could do something like this:

SELECT ?child
WHERE {
  [] (owl:sameAs|^owl:sameAs)+ <http://www.example.com/sameas#bob> ;

HTH,

Jeen

On Sun, May 17, 2020 at 5:07 AM Johan Kumps <johan.kumps@xxxxxxxxxx> wrote:
Hi all,

Using this query I expect that bob has 2 children, bobby and roberta as Bob owl:sameAs robert:


My ontology is attached.

Could you have a look? When executing the query inferencing is enabled in the workbench.

Kind regards,
Johan,
_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/rdf4j-dev

Back to the top