繁体   English   中英

OWL如何对一个类使用多个限制

[英]OWL How to use multiple restrictions on a 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 .

这设置了一个限制,即课程必须至少由一名学生参加,但是我还应如何应用限制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] 
            ]
    ].

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM