我开发了一个本体,其组成为 hasPart 和 partOf。我必须将这些属性用于多个类。因此,我创建了没有域和范围的这些属性,并通过 owl 对类的限制来使用它们。这是正确的 ?此外,我读到 partOf 是可传递的。我也应该为 hasPart 添加传递吗?
然后,我将 hasPart 定义为 partOf 的倒数。我也应该在 hasPart 中定义逆吗?
例子 :
<owl:ObjectProperty rdf:about="&myontology;hasPart">
<rdfs:label xml:lang="en">hasPart</rdfs:label>
<rdfs:label xml:lang="fr">aCommePartie</rdfs:label>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="&myontology;partOf">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
<rdfs:label xml:lang="en">partOf</rdfs:label>
<rdfs:label xml:lang="fr">estPartieDe</rdfs:label>
<owl:inverseOf rdf:resource="&excelfile;hasPart"/>
</owl:ObjectProperty>
<owl:Class rdf:about="&myontology;A">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&myontology;hasPart"/>
<owl:someValuesFrom rdf:resource="&myontology;B"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="&myontology;B">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&myontology;partOf"/>
<owl:someValuesFrom rdf:resource="&myontology;A"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>