1

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

Protege 读取 OWL 文件并显示我刚刚在两个列表中修复的属性。如果我修改任何内容并将本体保存回 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:range 已移动到副本中)

###  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 .

更新:这是最小的本体,在 protege 中打开后会导致上面显示的问题:

@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
4

1 回答 1

1

造成这种情况的根本原因是,在解析期间,(通过 OWL API)

rdfs:range xsd:string

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

它的起源似乎是在 schema.rdfs.org/all 导入中,可以在其中找到这种构造:

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

为了进行解析,数据类型 IRI 需要被选为 IRI 类。这是第一个 OWL 配置文件违规,其他违规是由它的副作用引起的。

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

于 2014-03-20T07:39:42.183 回答