rdf - 为什么必须 rdf :dataType subclass rdf:Class in RDF?

标签 rdf semantic-web ontology rdfs

来自 RDF Schema 1.1

2.4 rdfs:Datatype

rdfs:Datatype is the class of datatypes. All instances of rdfs:Datatype correspond to the RDF model of a datatype described in the RDF Concepts specification [RDF11-CONCEPTS]. rdfs:Datatype is both an instance of and a subclass of rdfs:Class. Each instance of rdfs:Datatype is a subclass of rdfs:Literal.

为什么必须 rdfs:Datatype 子类化 rdf:Class?为什么它不能只是 rdfs:Class 的一个实例?我不明白子类化的含义。

最佳答案

子类和实例

虽然可能存在细微差别,但通常可以将类视为集合以及子集的子类。当我们说“每个 X 也是一个 Y”时,我们通常会识别子集关系,在这种情况下 X ⊆ Y。当我们可以说“X 是 Y”时,我们通常会将事物理解为集合,在这种情况下,X 是一个元素并且Y 是一个集合。

我们肯定希望能够对 X 的值(例如 xsd:integer)说“X 是一个 rdfs:Datatype”,所以我们确实希望 rdfs:Datatype 是一个类,它表示我们想要

(1) rdfs:Datatype rdf:type rdfs:Class.

问题是我们是否想要

(2) rdfs:Datatype rdfs:subClassOf rdfs:Class.

因为 rdfs:subClassOf 的域是 rdfs:Class,所以 (2) 实际上隐含了 (1)。也就是说,任何事物的子类都是类,所以如果我们断言 (2),那么 (1) 逻辑上会遵循。我们绝对想要(1)。问题是我们是断言 (2) 并免费获得 (1) 和 (2),还是只断言 (1) 并跳过 (2)。

从概念上讲,(2) 是有道理的。任何属于数据类型的东西都是属于类型的东西。如果某个 D 是一种数据类型,那么像“x is a D”这样的句子是有意义的。这意味着数据类型集是所有类的子集。这证明接受 (2) 是合理的。

具体的可能性

(2)(和隐含的 (1))

将其视为实例、类和元类的层次结构可能会有所帮助。 rdfs:subClassOf 是同一层元素之间的链接,而 rdf:type 是一层元素和更高层元素之间的链接。如果 rdfs:Datatype 是 rdfs:Class 的子类,那么我们将所有“事物”保持在同一级别:

enter image description here

(1)单独(没有(2))

如果我们将 rdfs:Datatype 设为 rdfs:Class 的 instance,那么特定的数据类型,例如 xsd:integer,现在与我们的个人(如 John Doe)处于同一层,并且这些数据类型的实例,例如,三十,位于较低层:

enter image description here

现在,这是否是一件大事有待商榷。类和元类的概念 在像 RDF 这样的开放式表示中并不严格。毕竟,rdfs:Class 是 rdfs:Class 的一个instance!

评论中的一个选项

您在 your comment 中提到了第三种选择在 Jeen's answer (强调):

But suppose rdf:Datatype was just an instance of a class not a subclass. What difference would it make?! Everything you mentioned still holds. xsd:integer could still subclass rdf:Datatype, and instances of xsd:integer, would have class xsd:integer. There seems no reason to introduce sub classing of rdf:Class at all. I don't understand what it adds to the ~semantics.

您不希望 xsd:integer 成为 rdfs:Datatype 的子类,因为这会说“如果 X 是整数,则 X 是数据类型”,这确实不是我们所期望的。 30 是整数,但不是数据类型;我们通常不会说某事“属于 30 型”。在你的链条中

rdsf:Class ←X— rdfs:Datatype ←Y— xsd:integer

您可以将 X 设为 rdfs:subClassOf (case (2)) 或 rdf:type (case (1)),但 Y 确实需要是 rdf:type,而不是 rdfs:subClassOf,因为整数和数据类型是不同的种类

关于rdf - 为什么必须 rdf :dataType subclass rdf:Class in RDF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24817607/

相关文章:

rdf - 哪个 Triplestore 用于快速语义 Web 开发?

semantic-web - R2RML rr :objectMap 内的空白节点

json - JSON-LD 中的 IRI 映射和引用

java - 如何检索 <oboInOwl :hasExactSynonym> from every <rdf:Description> using OWL API

scala - 使用大量带有 self 类型的 mixin

python - GraphDB-Python Sparql 查询返回 : http status (404)

RDF 对 subClassOf 的正确方法

java - Jena 删除 OntClass

sparql - 使用 SPARQL UPDATE 添加个人的推荐方法是什么?

rdf - Must 的 OWL 限制