为什么Protege将DatatypeProperty的副本作为ObjectProperty

时间:2014-03-19 11:48:25

标签: owl protege owl-api

我注意到Protege会创建"副本"我创建的属性DatatypeProperty并将它们标记为ObjectProperty。这反过来又使它们同时成为数据类型和对象属性。 我试图在OWL文件中手动修复它。 已分配" xsd:string"作为范围。 什么都没有帮助。

在OWL文件中进行Protege读取,并显示我刚刚在两个列表中修复的属性。如果我修改任何内容并将本体保存回OWL文件,则会输入两个条目。

更多"有趣"我的Range规范(到xsd:string)设置为ObjectProperty条目,而不是原始数据类型。

有什么想法吗?

这是一个例子。

"原"

###  http://www.umwd.dolnyslask.pl/ontologies/2014/03/midas#title

:title rdf:type owl:DatatypeProperty ,
               owl:FunctionalProperty ;

      rdfs:label "tytuł"@pl ;

      skos:definition """xxxxxx""" ;

      rdfs:comment """comment"""@pl ;

      rdfs:domain :Annotation ,
                  :Entity .

Protege添加的复制(请注意rdfs:范围已移至副本)

###  http://www.umwd.dolnyslask.pl/ontologies/2014/03/midas#title

:title rdf:type owl:ObjectProperty ;

       rdfs:label "tytuł"@pl ;

       skos:definition """xxxxxx""" ;

       rdfs:comment """comment"""@pl ;

       rdfs:range xsd:string .

更新:这是最小的本体,在保护中打开后会出现上面显示的问题:

@prefix : <http://my.ontolo.gy/test#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@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 bibo: <http://purl.org/ontology/bibo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix midas: <http://my.ontolo.gy/test#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix schema: <http://schema.rdfs.org/all#> .
@prefix dbpedia: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix location: <http://www.w3.org/ns/locn#> .
@base <http://my.ontolo.gy/test> .

<http://my.ontolo.gy/test> rdf:type owl:Ontology ;
                         rdfs:label "Ontologia"@pl ;
                         rdfs:comment "Komentarz"@pl ;
                         owl:imports bibo: ,
                                     <http://schema.rdfs.org/all> ,
                                     <http://www.w3.org/2006/vcard/ns> ,
                                     <http://www.w3.org/ns/locn> .

###  http://my.ontolo.gy/test#title

:title rdf:type owl:DatatypeProperty ,
             owl:FunctionalProperty ;
    rdfs:label "tytuł"@pl ;
    skos:definition """definition""" ;
    rdfs:comment """komentarz"""@pl ;
    rdfs:range xsd:string ;
    rdfs:domain :Annotation ,
                :Entity .

将其保存回文件后:

@prefix : <http://my.ontolo.gy/test#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@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 bibo: <http://purl.org/ontology/bibo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix midas: <http://my.ontolo.gy/test#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix schema: <http://schema.rdfs.org/all#> .
@prefix dbpedia: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix location: <http://www.w3.org/ns/locn#> .
@base <http://my.ontolo.gy/test> .

<http://my.ontolo.gy/test> rdf:type owl:Ontology ;

                           rdfs:label "Ontologia"@pl ;

                           rdfs:comment "Komentarz"@pl ;

                           owl:imports bibo: ,
                                       <http://schema.rdfs.org/all> ,
                                       <http://www.w3.org/2006/vcard/ns> ,
                                       <http://www.w3.org/ns/locn> .


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


###  http://my.ontolo.gy/test#title

:title rdf:type owl:ObjectProperty ;

       rdfs:label "tytuł "@pl ;

       skos:definition "definition" ;

       rdfs:comment "komentarz"@pl ;

       rdfs:range xsd:string .





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


###  http://my.ontolo.gy/test#title

:title rdf:type owl:DatatypeProperty ,
                owl:FunctionalProperty ;

       rdfs:label "tytuł "@pl ;

       skos:definition "definition" ;

       rdfs:comment "komentarz"@pl ;

       rdfs:domain :Annotation ,
                   :Entity .





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


###  http://my.ontolo.gy/test#Annotation

:Annotation rdf:type owl:Class .



###  http://my.ontolo.gy/test#Entity

:Entity rdf:type owl:Class .




###  Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net

1 个答案:

答案 0 :(得分:1)

这个的根本原因是,在解析期间(通过OWL API)

rdfs:range xsd:string

被认为断言范围是xsd:string / class /。这显然是个问题。我之前看到过,当本体包含xsd:string作为类的错误声明时,这违反了OWL 2DL配置文件。

它的起源似乎在schema.rdfs.org/all import中,可以找到这种结构:

rdfs:range [ a owl:Class; owl:unionOf (xsd:decimal xsd:string) ];

为了解析这个问题,需要将数据类型IRI合并为类IRI。这是第一次OWL配置文件违规,其他违规是由其副作用引起的。

架构本体似乎是RDF而不是OWL,所以我不确定尝试解决这些问题是否有意义。

相关问题