OWL Same Object Property for different Classes

384 views Asked by At

I am trying to convert a UML Class Diagram into an Ontoloy and I have a Question.

Let's say I have the following setup:

        rel1
ClassA ------> ClassB

        rel1
ClassC ------> ClassD

For the first case I converted the Relation "rel1" to an Object Property as follows:

_x:rel1 rdf:type owl:ObjectProperty ;
    rdfs:domain _x:ClassA ;
    rdfs:range _x:ClassB .

But I don't know how to go about the Second one. What I want to have is: rel1 has the domain-range pair (ClassA,ClassB) OR (ClassC, ClassD). First I thought about using a union, but it doesn't model it in an appropriate way, because combinations like (ClassA, ClassD) or (ClassC, ClassB) could be possible.

I hope somebody can help.

Thank you, John

1

There are 1 answers

5
Henriette Harmse On

What your rel1 association is saying is that it has as domain the union of ClassA and ClassC with the range the union of ClassB and ClassD, which you can specify as follows:

ObjectProperty: rel1
  Domain: ClassA or ClassC
  Range: ClassB or ClassD

The main benefit of specifying domain and range restrictions for a property is that if 2 individuals are linked via that property, the reasoner can infer the types of the individuals. Specifying the domain and range as stated above will not allow this because ClassA or ClassC is an anonymous class and reasoners typically only give inferences on named classes, not anonymous classes. To get around this you can do the following:

Class: Rel1Domain 
  EquivalentTo: ClassA or ClassC

Class: Rel1Range 
  EquivalentTo: ClassB or ClassD

ObjectProperty: rel1
  Domain: Rel1Domain
  Range: Rel1Range