如何为给定的猫头鹰类设置多个限制?
实施例: 特定课程必须至少有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?
答案 0 :(得分:2)
您可以使用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]
]
].