I have almost the same requirement expresed 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", which is defined as an object property of type Node Node has descendants of type A, B and C
I have individuals that link to each other through contains 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 transitive nature of contains, I'd expect to get
A1 C1
too. What am I doing wrong here? The question I've linked to includes Jena in the answer, would it make a difference to do this on a Jena model?