Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding multiple domains to objectProperty in Protege 5

I have created an ontology using Protege 5-beta-17. In my ontology I have some classes:

Mountain, Lake, Location etc...

I also have an object property:

hasLocation.

For this object property I have set the range the "Location" class, and the domain the "Mountain" and "Lake" classes.

When I try to view the ontology using the CMap tool it shows that only the

"Mountain" "hasLocation" "Location".

The "Lake" class is presented without the "hasLocation" object property.

Did I do something wrong? Ore do I have do something else in Protege?

like image 899
whitefang1993 Avatar asked Aug 17 '15 13:08

whitefang1993


1 Answers

I found out what the problem was.

When adding a domain/range to object property in protege you have to click the following buttons and select one of your classes:

enter image description here

If you want to add another domain/range you simply click one of the buttons again and add another class. If you are doing it like this your telling Protege that the domain/range of your object property is an INTERSECTION of two classes. This means that the individual that will take the domains/ranges place is an INSTANCE OF BOTH CLASSES and NOT EXCLUSIVELY OF ONE OF THEM. This was my mistake. I was adding the classes to the domain in the wrong way.

So... The correct way for adding multiple distinct domains for an object property is the following:

Simply click the domain/range button again and select the "Class expression editor" tab: enter image description here

And in the "Class expression editor" type in your classes like this: "ClassA or ClassB or ClassC or ...".

In my case it was "Mountain or Lake".

After that click "ok" and thats it.

like image 92
whitefang1993 Avatar answered Sep 24 '22 00:09

whitefang1993