7

I want to create an ontology with Protege that contains two classes, Animal and FatherAnimal, and the object property hasFather, with domain Animal and range FatherAnimal.

Also, I create two other classes: Son and Father which are linked with the same object property, hasFather. The problem here is that I'm not allowed to create multiple domain and range for the same object property. I'd really like to avoid creating a new object property. Is there any other solution?

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • 1
    "The problem here is that I'm not allowed to create multiple domain and range for the same objectProperty." You can specify multiple domains and ranges on ObjectProperties in OWL and Protege. – Joshua Taylor May 11 '15 at 16:31
  • Yes i know but as you said the interpretation is the intersection. Sorry, i wasn't clear enough. Also a union of these classes would not be a solution in my case because i want the reasoner to give me an error when i use the objectProperty with different classes. – Katerina Dimitraki May 12 '15 at 16:49

1 Answers1

12

It's not really clear what the problem is. You can add multiple domains and ranges to object properties, but the interpretation is the intersection. That means that you if say, for instance,

hasFather rdfs:domain Son
hasFather rdfs:domain Animal

whenever you have

X hasFather Y

you'll be able to infer

X rdf:type Son
X rdf:type Animal

which probably isn't what you want.

As I see it, you could do this:

  • Don't declare any domain or range on hasFather. There's no need to do that. You can just declare the property, and then use it however you see fit.

If you want a bit more type inference available to you, then you could also add two subclass axioms:

        Son SubClassOf (hasFather only Father)
        Animal SubClassOf (hasFather only AnimalFather)

these axioms say that if something is a Son and it's related to something by the property hasFather, then that something is an instance of Father. Similiary, if something is an Animal and is related to something by the property hasFather, then that something is an instance of AnimalFather.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • I really appreciate your answer. Thank you very very much! It is exactly what i needed. I have seen that sb can define a concept like that as a subclass but i didn't know the meaning. Thank you again! :) – Katerina Dimitraki May 12 '15 at 16:57
  • the definition of `rdfs:domain` that states what this answer explains, can be found here: https://www.w3.org/TR/rdf-schema/#ch_domain – hoijui Apr 27 '21 at 18:37