Search code examples
computer-scienceowlontologysemantic-webrdfs

What is the difference between owl:equivalentClass and rdfs;subClassOf when making owl:Restrictions


I need to create theset that is restricted to items that are only delivered to Italy.

I don't fully understand the difference between owl:equivalentClass and rdfs:subClassOf in the context of my problem.

:deliversToItaly owl:equivalentClass [a owl:restriction; 
                                      owl:ownProperty ebay:shipsTo;
                                      owl:allValuesFrom geo:Italy].

vs.

:deliversToItaly rdfs:subClassOf [a owl:restriction; 
                                  owl:ownProperty ebay:shipsTo;
                                  owl:allValuesFrom geo:Italy].

Could someone explain the difference between the two, and possibly explain it in context between the two examples I have provided?


Solution

  • Semantically, you are defining the class as Primitive (subClassOf) versus Defined (equivalentClass). The main difference is in inferencing in one or both directions.

    The Primitive class is single direction:

    • any Thing with ShipsTo with values from Italy can be inferred to be a deliversToItaly The Defined class is both directions:
    • as above, and
    • any Thing that is a deliversToItay can be inferred to have shipTo with values from Italy

    A Defined class is used when you are confident that you have necessary and sufficient rules for class membership - otherwise Primitive is used for necessary rules only.