声明 属性 的范围是有限数量的文字值之一的最简单方法
The simplest way of declaring that a property’s range is one of a limited number of literal values
这似乎是一个应该有明显简单答案的问题,但 google 没有任何帮助。
声明 属性 的范围是有限数量的文字值之一的最简单方法是什么?据我了解,以下内容无效:
example:myProperty rdfs:range "yes", "no".
因为"The rdfs:range of rdfs:range is the class rdfs:Class."(RDF Schema 1.1 规范)。
这在 RDF 模式中通常是如何声明的?如果有替代方法,它们的优缺点是什么?
感谢您为我指明正确的方向,ASKW!
# Declare datatype
example:YesNo rdf:type rdfs:Datatype;
owl:oneOf ("yes" "no").
# Use the datatype as rdfs:range
example:myProperty rdfs:range example:YesNo.
# Or else just declare the DataRange inline as anonymous class
example:myProperty rdfs:range [ owl:oneOf ("yes" "no") ].
这似乎是一个应该有明显简单答案的问题,但 google 没有任何帮助。
声明 属性 的范围是有限数量的文字值之一的最简单方法是什么?据我了解,以下内容无效:
example:myProperty rdfs:range "yes", "no".
因为"The rdfs:range of rdfs:range is the class rdfs:Class."(RDF Schema 1.1 规范)。
这在 RDF 模式中通常是如何声明的?如果有替代方法,它们的优缺点是什么?
感谢您为我指明正确的方向,ASKW!
# Declare datatype
example:YesNo rdf:type rdfs:Datatype;
owl:oneOf ("yes" "no").
# Use the datatype as rdfs:range
example:myProperty rdfs:range example:YesNo.
# Or else just declare the DataRange inline as anonymous class
example:myProperty rdfs:range [ owl:oneOf ("yes" "no") ].