OWL如何对类使用多个限制

时间:2016-05-23 21:12:39

标签: rdf owl

如何为给定的猫头鹰类设置多个限制?

实施例: 特定课程必须至少有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?

1 个答案:

答案 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] 
            ]
    ].