SPARQL query results in Protege do not recognize transitive property

I have almost the same requirement expressed in this question: Get all nodes in a transitive relation

I am using Protege 3.4.8. This is an Owl-Lite project. I have a transitive property "contains" that is defined as a property of an object of type Node Node has descendants of types A, B and C

I have people linking to each other contains a property like this:

A contains B contains C

When I run the following SPARQL query:

SELECT ?A ?B
WHERE
{
    ?A :contains ?B         
}

      

I get:

A1 B1
B1 C1

      

Due to the transient nature of the contains, I would expect to receive

A1 C1 

      

also. What am I doing wrong here? The question I linked includes Yen in response, could it make a difference to do this on the Yen model?

+1


source to share


2 answers


Good,

Further searches led me to this page: http://opentox.org/data/documents/development/RDF%20files/JavaOnly/query-reasoning-with-jena-and-sparql



The following quote from this page (possibly) explains the reasons why I see:

"For our purposes, SPARQL queries can be executed either directly through the SPARQL Query Panel in Protege or from within JAVA using specialized methods of the Yen library. Both approaches can handle explicit object and ownership queries, but the Yen libraries have the advantage of using reasoning Thus, queries executed using Jena library methods can return results that also take into account transient and assumed relationships. "

+1


source


SPARQL is an RDF query language, so not all SPARQL engines need to implement OWL entry (i.e. use OWL semantics to evaluate a query). More information at http://www.w3.org/TR/sparql11-entailment/



Not sure which implementation is actually using Protege under the hood ...

0


source







All Articles