Turtle
在 Turtle 中,没有类似的主题列表对象列表 https://www.w3.org/TR/turtle/#object-lists.
It is possible https://www.w3.org/TR/turtle/#collections写一些类似的东西(:a :b) rdfs:subClassOf :c
.
然而,这并不等于:a rdfs:SubClassOf :c . :b rdfs:SubClassOf :c
.
事实上,您可以使用以下内容编写最有用的内容RDF list https://www.w3.org/TR/rdf-schema/#ch_collectionvocab在主语位置是(:a :b) a rdf:List
.
即,没有句法的 sugar.
OWL
使用 OWL 推理功能,可以实现这样的目标。
可以声明一个逆属性,然后在序列化中使用 Turtle 对象列表:
:inverseProperty owl:inverseOf :directProperty .
:c :inverseProperty :a, :b .
局限性
但是,这不适用于rdfs:subClassOf
。对象属性连接个体,而不是类。就像是:c rdfs:superClassOf :a, :b
将被视为与同名相关个人.
就是这样猫头鹰双关语 https://www.w3.org/TR/owl2-new-features/#F12:_Punning作品(另见this https://stackoverflow.com/a/48270563/7879193令人大开眼界的答案)。
对于具体情况rdfs:subClassOf
, write [ owl:unionOf (:a :b) ] rdfs:subClassOf :c
,
如果您不需要简单地:c owl:unionOf (:a :b)
or :c owl:disjointUnionOf (:a :b)
.
很遗憾,一般类包含 http://ontogenesis.knowledgeblog.org/1288公理不能保存在曼彻斯特语法中。