首页 > 解决方案 > OWL 对象属性双向

问题描述

我需要说一个对象属性是双向的。我知道我们可以使用 inverseOf 属性来链接 2 属性,但是可以说 objectProperty 的 inverseOf 是他自己吗?

<owl:ObjectProperty rdf:about="http://www.co-ode.org/ontologies/ont.owl#isLinkedTo">
    <owl:inverseOf rdf:resource="http://www.co-ode.org/ontologies/ont.owl#isLinkedTo"/>
</owl:ObjectProperty>

或者我必须这样做:

<owl:Class rdf:about="http://micorr.ig.he-arc.ch/vocab#artefacts_alloy">
    <rdfs:subClassOf>
        <owl:Restriction>
            <owl:onProperty rdf:resource="http://www.co-ode.org/ontologies/ont.owl#isLinkedTo"/>
            <owl:allValuesFrom rdf:resource="http://micorr.ig.he-arc.ch/vocab#artefacts_metal"/>
        </owl:Restriction>
    </rdfs:subClassOf>
</owl:Class>

<owl:Class rdf:about="http://micorr.ig.he-arc.ch/vocab#artefacts_metal">
    <rdfs:subClassOf>
        <owl:Restriction>
            <owl:onProperty rdf:resource="http://www.co-ode.org/ontologies/ont.owl#isLinkedTo"/>
            <owl:allValuesFrom rdf:resource="http://micorr.ig.he-arc.ch/vocab#artefacts_alloy"/>
        </owl:Restriction>
    </rdfs:subClassOf>
</owl:Class>

谢谢你的帮助。

标签: owlbidirectionalobject-property

解决方案


您确实可以使属性与自身相反,这很好。然而,表达关系是双向的更明确的方式是定义属性是对称的:

<owl:SymmetricProperty rdf:about="http://www.co-ode.org/ontologies/ont.owl#isLinkedTo"/>

推荐阅读