我有一些严重的问题导入" Rhizomik"所有常见本体编辑器中的MPEG7本体论。主要是我倾向于使用Protege。 导入总是导致几百个错误。我修了几个。剩下的一个似乎与下面的类有关:
<owl:Class rdf:about="&mpeg7;SpatioTemporalLocatorType">
<rdfs:subClassOf>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;CoordRef"/>
<owl:allValuesFrom>
<owl:Class>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;ref"/>
<owl:allValuesFrom rdf:resource="&xsd;string"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;ref"/>
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;spatialRef"/>
<owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema&mpeg7;boolean"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;spatialRef"/>
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
</owl:allValuesFrom>
</owl:Restriction>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;FigureTrajectory"/>
<owl:allValuesFrom rdf:resource="&mpeg7;FigureTrajectoryType"/>
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;ParameterTrajectory"/>
<owl:allValuesFrom rdf:resource="&mpeg7;ParameterTrajectoryType"/>
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="&mpeg7;MediaTime"/>
<owl:allValuesFrom rdf:resource="&mpeg7;MediaTimeType"/>
</owl:Restriction>
</owl:unionOf>
</owl:Class>
</owl:intersectionOf>
</owl:Class>
</rdfs:subClassOf>
</owl:Class>
是否有人可以检查此类是否存在任何逻辑错误?
亲切的问候, 帕特里克
答案 0 :(得分:0)
问题在于公理的构建。 subClassOf
公理似乎嵌入在类使用中,但在这些位置不允许使用rdfs:subClassOf
标记(有关已识别的映射,请参阅https://www.w3.org/TR/owl2-mapping-to-rdf/)。
例如,Error1 URL引用了这个公理:
ObjectPropertyRange(<#Mpeg7> <http://org.semanticweb.owlapi/error#Error1>)
相应的XML是:
<owl:ObjectProperty rdf:ID="Mpeg7">
<rdfs:range>
<owl:Class>
<rdfs:subClassOf rdf:resource="&mpeg7;Mpeg7Type"/>
<rdfs:subClassOf>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="#DescriptionUnit"/>
<owl:allValuesFrom rdf:resource="&mpeg7;Mpeg7BaseType"/>
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="#Description"/>
<owl:allValuesFrom rdf:resource="&mpeg7;CompleteDescriptionType"/>
</owl:Restriction>
</owl:unionOf>
</owl:Class>
</rdfs:subClassOf>
</owl:Class>
</rdfs:range>
</owl:ObjectProperty>
这里的意图很清楚,但是匿名类是一个交集 - 它不能被解析,因为它是作为嵌套的子类公理创建的,它们不是有效的OWL语法。
当上述样本改为:
<owl:ObjectProperty rdf:ID="Mpeg7">
<rdfs:range>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<rdf:Description rdf:about="&mpeg7;Mpeg7Type"/>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="#DescriptionUnit"/>
<owl:allValuesFrom rdf:resource="&mpeg7;Mpeg7BaseType"/>
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="#Description"/>
<owl:allValuesFrom rdf:resource="&mpeg7;CompleteDescriptionType"/>
</owl:Restriction>
</owl:unionOf>
</owl:Class>
</owl:intersectionOf>
</owl:Class>
</rdfs:range>
</owl:ObjectProperty>
解析的公理变为
ObjectPropertyRange(<#Mpeg7>
ObjectIntersectionOf(
<http://rhizomik.net/ontologies/2005/03/Mpeg7-2001.owl#Mpeg7Type>
ObjectUnionOf(
ObjectAllValuesFrom(<#Description> <http://rhizomik.net/ontologies/2005/03/Mpeg7-2001.owl#CompleteDescriptionType>)
ObjectAllValuesFrom(<#DescriptionUnit> <http://rhizomik.net/ontologies/2005/03/Mpeg7-2001.owl#Mpeg7BaseType>)
)
)
)
我在文件中计算了大约175个类似的问题...