Subclass表达式中的DataProperties

时间:2017-11-24 13:32:51

标签: owl graphdb

我尝试使用OWL2-RL规则构建到graphdb中。我显然做错了什么或者理解错了。这是我的玩具本体论。

<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/rlehmann/ontologies/2017/10/untitled-ontology-182#"
     xml:base="http://www.semanticweb.org/rlehmann/ontologies/2017/10/untitled-ontology-182"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:untitled-ontology-182="http://www.semanticweb.org/rlehmann/ontologies/2017/10/untitled-ontology-182#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:ontology="http://www.some/ontology/">
    <owl:Ontology rdf:about="http://www.semanticweb.org/rlehmann/ontologies/2017/10/untitled-ontology-182"/>

    <!-- http://www.some/ontology/hasValue -->
    <owl:DatatypeProperty rdf:about="http://www.some/ontology/hasValue">
         <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
    </owl:DatatypeProperty>

    <!-- http://www.some/ontology/ClassA -->
    <owl:Class rdf:about="http://www.some/ontology/ClassA"/>

    <!-- http://www.some/ontology/InvA -->
    <owl:NamedIndividual rdf:about="http://www.some/ontology/InvA">
        <rdf:type rdf:resource="http://www.some/ontology/ClassA"/>
        <ontology:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">StringValue</ontology:hasValue>
    </owl:NamedIndividual>

    <!-- http://www.some/ontology/InvB -->
    <owl:NamedIndividual rdf:about="http://www.some/ontology/InvB">
        <ontology:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">FooBar</ontology:hasValue>
    </owl:NamedIndividual>


    <owl:Restriction>
        <owl:onProperty rdf:resource="http://www.some/ontology/hasValue"/>
        <owl:someValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
        <rdfs:subClassOf rdf:resource="http://www.some/ontology/ClassA"/>
    </owl:Restriction>
</rdf:RDF>

如果我没有误解OWL2-Profiles中的表2,这个本体应该是OWL2 RL配置文件。我希望“InvB”被归类为ClassA类型。但事实并非如此。它实际上与reasoners(HermiT,Pellet,...)有关,但与规则(Drools,Graphdb)不同,这是规范中的一个空白。

我的Ontology如何“修复”或有任何解决方法?

干杯,

罗伯特

1 个答案:

答案 0 :(得分:2)

不在GCI左侧使用匿名类不是我们的应用程序的选项。是的对象属性可以很好地工作。

经过一些研究,我们实际发现,它永远不会那样工作。在与RL-Profile相对应的GraphDB .pie文件中,只有一些规则的概念&#34; //这些规则未实现(并且可能无法实现)&#34;。这包括规则&#34; dt-type2&#34;在OWL2 RL Section 4.3 Table 8中定义。 RDF第3.1节给出了为什么这不应该起作用的实际答案。

  
      
  1. RDF图表

         

    RDF图是一组RDF三元组。

         

    3.1三元组

         

    RDF三元组由三部分组成:

         
        
    • 主题,即IRI或空白节点

    •   
    • 谓词,这是一个IRI

    •   
    • 对象,它是IRI,文字或空白节点

    •   
  2.   

&#34; FooBar&#34; ^^ xsd:string rdf:type xsd:string这是不允许的,但显然是必需的。

除了RDF之外,我们还很不确定w3c的人在想什么?!

就像现在一样,这种推理在GraphDB中根本不起作用(一般没有规则引擎?)。但这不是GraphDB的错,而只是规范链中的一个缺口。

然而,我们在我们的本体中解决了这个问题,并且正在为我们工作。我们只是

  • 为我们使用的数据类型定义了新概念
  • 将所有DataProperties转换为ObjectProperties
  • 引入了新的DataType属性,其中包含一个新的数据类型概念,范围为xsd:xyz。例如Property:hasStringValue Domain:string Range:xsd:string

这对我们有用。