这似乎是一个应该有一个明显简单答案的问题,但谷歌一直没有帮助。
声明属性的范围是有限数量的文字值之一的最简单方法是什么?据我了解,以下内容无效:
example:myProperty rdfs:range "yes", "no".
因为" rdfs:range的rdfs:range是类rdfs:Class。" (RDF Schema 1.1规范)。
这通常如何在RDF模式中声明?如果有其他方法,那么他们的优点是什么?缺点
答案 0 :(得分:2)
感谢您指点我正确的方向,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") ].