[英]How to reuse a list in OWL?
假設我要定義酒精類:
:Alcohol rdf:type owl:Class ;
owl:equivalentClass [
rdf:type owl:Class ;
owl:oneOf ( :Vodka :Champagne :Bourbon :Tequila :Whiskey ) ] .
但我希望成員與眾不同:
[ rdf:type owl:AllDifferent ;
owl:distinctMembers ( :Bourbon :Vodka :Champagne :Whiskey :Tequila ) ] .
如何在不重復列表的情況下寫這兩個語句?
謝謝。
如注釋中所述,使用空白節點引用:
:Alcohol a owl:Class ;
owl:equivalentClass [ a owl:Class ;
owl:oneOf _:b0 ] .
[ a owl:AllDifferent ;
owl:distinctMembers _:b0 ] .
_:b0 rdf:first :Vodka ;
rdf:rest ( :Champagne :Bourbon :Tequila :Whiskey ) .
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.