简体   繁体   中英

Issues importing an ontology into Protege

I have some severe issues importing the "Rhizomik" MPEG7 Ontology in all common ontology Editors. Primarily I tend to work with Protege. Import allways leads to several 100 errors. I fixed a few of them. One of the remaining seems to be connected to the following class:

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

Is someone in the position to check this class for any logical error?

Kind regards, Patrick

The problem is in the construction of the axioms. subClassOf axioms appear embedded in class usage, but the rdfs:subClassOf token is not allowed in those positions (see https://www.w3.org/TR/owl2-mapping-to-rdf/ for the recognised mappings).

For example, the Error1 URL refers to this axiom:

ObjectPropertyRange(<#Mpeg7> <http://org.semanticweb.owlapi/error#Error1>)

The corresponding XML is:

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

The intent here is clear, but the anonymous class is intended to be an intersection - it cannot be parsed as such because it is created as nested subclass axioms, which are not valid OWL syntax.

When the above sample is changed to this:

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

The parsed axiom becomes

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>)
        )
    )
)

I count about 175 similar problems in the file...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM