Search code examples
rdfsemantic-webowlontologyprotege

Why the reasoner inferred that this class is a sub class of this class


This is my first class Ratings2016, it is an equivalent class to: Ratings and the value of createdOn bigger than 2016.

<!-- http://semanticrecommender.com/rs#Ratings2016 -->

    <owl:Class rdf:about="http://semanticrecommender.com/rs#Ratings2016">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://semanticrecommender.com/rs#Rates"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://semanticrecommender.com/rs#createdOn"/>
                        <owl:someValuesFrom>
                            <rdfs:Datatype>
                                <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
                                <owl:withRestrictions rdf:parseType="Collection">
                                    <rdf:Description>
                                        <xsd:minInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-01-01T00:00:00</xsd:minInclusive>
                                    </rdf:Description>
                                </owl:withRestrictions>
                            </rdfs:Datatype>
                        </owl:someValuesFrom>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>

This is another class Ratings2015 it is an equivalent to Ratings and createdOn bigger than 2015

 <!-- http://semanticrecommender.com/rs#Ratings2015 -->

    <owl:Class rdf:about="http://semanticrecommender.com/rs#Ratings2015">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://semanticrecommender.com/rs#Rates"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://semanticrecommender.com/rs#createdOn"/>
                        <owl:someValuesFrom>
                            <rdfs:Datatype>
                                <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
                                <owl:withRestrictions rdf:parseType="Collection">
                                    <rdf:Description>
                                        <xsd:minInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-01-01T00:00:00</xsd:minInclusive>
                                    </rdf:Description>
                                </owl:withRestrictions>
                            </rdfs:Datatype>
                        </owl:someValuesFrom>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>

when I run the reasoner, the reasoner says that Ratings2016 is sub class of Ratings 2015

image

that is not correct, why is that and how to solve it?


Solution

  • The reason is that you are using xsd:minInclusive to specify the date of creation. But, according to XMLSchema, xsdminInclusive specifies just a lower bound for a possible value. So, since Ratings2016 has a date of creation which is greater than the date of Ratings2015, it is enclosed in the values specified for the Ratings2015 (which starts from the beginning of 2015 and do not terminate), and belongs to that class.

    A way of solving this problem depends of course from your problem, but maybe it could be sufficient for instance to declare also xsd:maxInclusive values for your Ratings.