sparqlontologysemantic-webprotegeknowledge-graph

isA relationship: how can we model it in protege? What is its difference with Instance?


For modelling an isA relationship, (1) is it enough to just make sub-properties or sub-classes? If not, what is the correct way?

(2) What is the difference of isA and Instance? From what I understood, isA is a predicate for objects whereas Instance is for demonstrating individuals. But I am not sure.

Thanks.


Solution

  • Yes, to make a sub-class, it’s enough to use the rdfs:subClassOf property.

    # "Y is-a X"
    :Y rdfs:subClassOf :X .
    

    In Protégé, this happens automatically if you use the "Add subclass" button.

    (The same goes for rdfs:subPropertyOf and the "Add sub property" button.)


    The term instance refers to a member of a class.

    If you say

    ex:Arbo94 rdf:type :Y .
    

    then ex:Arbo94 is an instance of the class :Y, and given the rdfs:subClassOf statement from above, also an instance of the class :X.

    It’s also an instance of rdfs:Resource ("the class of everything"), as everything in RDF is a member of this class.