[英]RDF : Is it possible to set the range of a property to a literal in Turtle
[英]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".
因為“ rdfs:range的rdfs:range是類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") ].
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.