Search code examples
sparqlontologyclass-diagramprotege

Representing a class diagram using protege


I'm developing an ontology for a searching laboratory and I need to represent my class diagram with "Protege". I don't know how to represent relations cardinals. How can I do it for this one for example?

enter image description here

And what about the cardinals : 0...*

2..5

3..*

0..1

etc

Thank you very much


Solution

  • To say that an instance of Faculty teaches at exactly one University, you'd use a property restriction and a subclass axiom:

    (1)        Faculty SubClassOf (teachesAt exactly 1 University)

    To say that at least one instance of Faculty teaches at every University, you'd use another peoperty restriction and a subclass axiom, but you'll need to use the inverse property:

    (2)        University SubClassOf (inverse(teachesAt) min 1 University)

    If you prefer, you can use some instead of min 1 in axiom (2).

    In general, there are a few restrictions that will impose cardinalities:

    • some (at least one (equivalent to min 1))
    • min n (at least n)
    • max n (at most n)
    • exactly n (exactly n)

    So for some other ranges, you could say things like:

    • Mammals have between two and four (2..4) legs:
      Mammal SubClassOf ((hasLegs min 2) and (hasLegs max 4))
    • Forests have at least 300 (300..) trees:
      Forest SubClassOf hasTree min 300
    • Cars have at most one (0..1) radio:
      Car SubClassOf hasRadio max 1