与使用xsd:integer作为rdfs:range发生冲突 [英] Conflicts with using xsd:integer as rdfs:range

查看:130
本文介绍了与使用xsd:integer作为rdfs:range发生冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在定义一个整数范围为

I am defining a property with integer range as

:hasIndex rdf:type owl:DatatypeProperty ;
          rdfs:range xsd:integer .

我的理解是,它只应接受整数作为对象,其他任何东西都应视为不一致并抛出错误.但是,当我按照以下方式在GraphDb中创建以字符串作为对象的实例时,两个条目都成功加载到数据库中(作为"asd" ^^ xsd:string),没有任何错误:

My understanding is that it should only accept integers as object, anything else should be considered as inconsistent and throw errors. However, when I create instances with strings as objects in GraphDb as the following, both entries are successfully loaded into the database (as "asd"^^xsd:string) without any errors:

 :nodea :hasIndex  "asd" .
 :nodeb :hasIndex  "asd"^^xsd:string .

推荐答案

OWL规范不要求加载不一致的本体或知识库的任何尝试均会触发错误.实际上,这实际上是愚蠢的,因为检查OWL 2 DL中的一致性(例如)是一个N2EXPTIME完全问题.因此,所有实用的语义Web数据管理系统都会加载语法上有效的任何数据,并且仅尝试按需进行一致性检查.

The OWL specification does not require that any attempt to load an inconsistent ontology or knowledge base triggers an error. In fact, it would be practically foolish, since checking consistency in OWL 2 DL (for instance) is a N2EXPTIME complete problem. So all practical semantic web data management system load whatever syntactically valid data and only attempt consistency checking on demand.

此外,您正在使用GraphDb.它并没有实现所有OWL,并且根据部分覆盖基于OWL 2 RDF的语义的OWL方言来工作.在专用网页上描述了与GraphDB中的OWL的符合性.该页面显示:

Moreover, you are using GraphDb. It does not implement all of OWL, and it works according to an OWL dialect partially covering the OWL 2 RDF-based semantics. The compliance with OWL in GraphDB is described on a dedicated web page. The page says that:

GraphDB不提供对键入文字(...)的扩展支持

GraphDB does not provide the extended support for typed literals (...)

默认情况下没有不一致规则

There are no inconsistency rules by default

这篇关于与使用xsd:integer作为rdfs:range发生冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆