Types sparql中的owl类型推理

Types sparql中的owl类型推理,types,owl,inference,Types,Owl,Inference,给定类别A、域A中的属性p和类别B,当属性p的值为B时,定义为等同于A @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-sc

给定类别A、域A中的属性p和类别B,当属性p的值为B时,定义为等同于A

@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根据类B的定义将类型B显示为个体B的预期推断类型

SPARQL查询

选择*其中{ :b a?类型 }

然而,在Protége的SPARQL查询视图中,只返回类:A

为什么它不返回推断出的类:B

谢谢

PS:该模型由颗粒推理机支持


PPS:在Java应用程序中使用Jena的推理器OntModelSpec.OWL_MEM_MICRO_RULE_INF的上述SPARQL查询返回预期的类:B作为个体:B的类型。讨论的问题似乎是Protége的SPARQL查询视图的问题。

您应该详细说明您执行的SPARQL查询以及针对哪个端点执行的SPARQL查询。我已将这些信息添加到主要帖子中