OWL 如何对 class 使用多重限制
OWL How to use multiple restrictions on a class
如何为给定的 owl class 设置多个限制?
示例:
给定课程必须由至少 1 名学生参加,但最多 10 名学生:
:Course a owl:Class;
owl:equivalentClass [a owl:Restriction;
owl:onProperty :takenBy;
owl:minCardinality 1] .
:Student a owl:Class .
:takenBy a rdf:Property;
rdfs:domain :Course;
rdfs:range :Student .
这设置了课程必须由至少 1 名学生参加的限制,但我如何同时应用限制 owl:maxCardinality 10?
您可以为此使用 owl:intersectionOf
。
:Course a owl:Class;
owl:equivalentClass [
owl:intersectionOf [ a owl:Restriction ;
owl:onProperty :takenBy;
owl:minCardinality 1] ;
[ a owl:Restriction ;
owl:onProperty :takenBy;
owl:maxCardinality 10]
]
].
如何为给定的 owl class 设置多个限制?
示例: 给定课程必须由至少 1 名学生参加,但最多 10 名学生:
:Course a owl:Class;
owl:equivalentClass [a owl:Restriction;
owl:onProperty :takenBy;
owl:minCardinality 1] .
:Student a owl:Class .
:takenBy a rdf:Property;
rdfs:domain :Course;
rdfs:range :Student .
这设置了课程必须由至少 1 名学生参加的限制,但我如何同时应用限制 owl:maxCardinality 10?
您可以为此使用 owl:intersectionOf
。
:Course a owl:Class;
owl:equivalentClass [
owl:intersectionOf [ a owl:Restriction ;
owl:onProperty :takenBy;
owl:minCardinality 1] ;
[ a owl:Restriction ;
owl:onProperty :takenBy;
owl:maxCardinality 10]
]
].