Protege(OWL)中的对象属性断言

时间:2018-04-13 11:11:12

标签: owl protege

我已经定义了一个需要两个人的对象属性。但是,Protege不允许我添加这两个但只添加一个。问题可归纳如下:我有A和B属于一个类(该类的实例)。我有一个对象属性,说得当,我想表达:正确的A,B。这是我写的知道的代码。

@prefix : <http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age> .

<http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age> rdf:type owl:Ontology .

#################################################################
#    Object Properties
#################################################################

###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Interact2
:Interact2 rdf:type owl:ObjectProperty ,
                    owl:FunctionalProperty ;
           rdfs:domain :Person ;
           rdfs:range :Person .


#################################################################
#    Data properties
#################################################################

###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Interact
:Interact rdf:type owl:DatatypeProperty .


###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#hasAge
:hasAge rdf:type owl:DatatypeProperty .


#################################################################
#    Classes
#################################################################

###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Person
:Person rdf:type owl:Class ;
        rdfs:subClassOf [ rdf:type owl:Restriction ;
                          owl:onProperty :Interact2 ;
                          owl:qualifiedCardinality "2"^^xsd:nonNegativeInteger ;
                          owl:onClass :Person
                        ] ,
                        [ rdf:type owl:Restriction ;
                          owl:onProperty :hasAge ;
                          owl:cardinality "1"^^xsd:nonNegativeInteger
                        ] .


#################################################################
#    Individuals
#################################################################

###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Pallino
:Pallino rdf:type owl:NamedIndividual ,
                  :Person .


###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Pinco
:Pinco rdf:type owl:NamedIndividual ,
                :Person .


###  http://stackoverflow.com/q/24188632/1281433/people-have-exactly-one-age#Pinco_Pallino
:Pinco_Pallino rdf:type owl:NamedIndividual ,
                        :Person ;
               :Interact2 :Pinco .


###  Generated by the OWL API (version 4.2.8.20170104-2310) https://github.com/owlcs/owlapi

0 个答案:

没有答案
相关问题