Given class A, property P in domain A, and class B, that is defined as equivalent to A when property P has value "B"
@prefix : <http://sample.org/ont#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://sample.org/ont#> .
<http://sample.org/ont#> rdf:type owl:Ontology .
:P rdf:type owl:DatatypeProperty ;
rdfs:domain :A .
:A rdf:type owl:Class .
:B rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Class ;
owl:intersectionOf ( :A
[ rdf:type owl:Restriction ;
owl:onProperty :P ;
owl:hasValue "B"
]
)
] .
:b rdf:type :A , owl:NamedIndividual ;
:P "B" .
Protége displays the type :B as expected inferred type of individual :b according to definition of the class :B.
The SPARQL query
SELECT * WHERE { :b a ?type }
in the SPARQL Query view of Protége returns however only the class :A.
Why doesn't it also return the inferred class :B?
Thanks.
PS: The model is backed by the Pellet reasoner
PPS: The mentioned SPARQL query using Jena's reasoner OntModelSpec.OWL_MEM_MICRO_RULE_INF in a Java application returns the expected class :B as a type of the individual :b. The discussed problem seems to be an issue of the SPARQL query view of Protége.