3

I'm using Protegé to create an OWL ontology and I have Question.

I have the following set up:

        (relation1)
ClassA isTriggeredBy ClassB

        (relation1)
ClassC isTriggeredBy ClassD

Nevertheless the relation should be either (ClassA, ClassB) or (ClassC,ClassD). I don't want combinations like (ClassA, ClassD) to be possible since it makes no sense from the ontology semantic perspective. I tried to avoid that by specifying the following in the Object Property Description of relation1 isTriggeredBy:

Domain (intersection)
ClassA or ClassC

Ranges (intersection)
ClassB or ClassD

and I added local constraints in both Class Description of ClassA and ClassC:

Description:ClassA
SubClass Of
isTriggeredBy some ClassB

Description:ClassC
SubClass of
isTriggeredBy some ClassD

But I don't know if this is correct. Moreover I don't know if this the more appropriate way to do this or if it necessary to create different object properties.

Thanks for the attention and support,

pLs

PLS
  • 231
  • 2
  • 6
  • 14
  • You may also want to look at [this related SO question](https://stackoverflow.com/questions/49961407/type-inference-using-class-expresions-on-protege/49963090#49963090) that I answered. – Henriette Harmse Jul 31 '18 at 15:19
  • Thank you, I'm looking at it now – PLS Aug 01 '18 at 11:39

1 Answers1

3

To answer your question, it is important to understand the reason for using domain and range restrictions. If have

ObjectProperty: isTriggeredBy
  Domain: A
  Range: B 

what you want to achieve is that whenever you know that an individual a is related via isTriggeredBy to individual b, the reasoner can infer that a is of type A and b is of type B.

If you have

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

it can at most infer that individual a is of type ClassA or ClassC and individual b is of type ClassB or ClassD. That is even with the added axioms

Class:ClassA
  SubClassOf: isTriggeredBy some ClassB

Class:ClassC
  SubClassOf:isTriggeredBy some ClassD

you will not get to differentiate between the relations (ClassA, ClassB) and (ClassC,ClassD).

A way to achieve this differentiation is to use subproperties:

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

ObjectProperty: isTriggeredByB
  SubPropertyOf: isTriggeredBy
  Domain: ClassA
  Range:ClassB

ObjectProperty: isTriggeredByD
  SubPropertyOf: isTriggeredBy
  Domain: ClassC
  Range:ClassD

Then when you have an individual a that is associated via isTriggeredByB to individual b, it will infer that a is of type ClassA and b is of type ClassB.

Henriette Harmse
  • 4,167
  • 1
  • 13
  • 22
  • Thanks for the detailed explanation. I really appreciate that. Do you think this is the best alternative or it is better to create 2 diferentes object properties with no sub-properties? – PLS Aug 01 '18 at 12:19
  • It depends on the needs of your application domain. If you need to know that `isTriggeredByB` and `isTriggeredByD` are `isTriggeredBy` relations, then you need to define them as subproperties. If you don't need to know that, you can just have the 2 properties without being subproperties of `isTriggeredBy`. – Henriette Harmse Aug 01 '18 at 13:04
  • Are you trying to translate UML class diagrams to OWL by any chance? – Henriette Harmse Aug 01 '18 at 13:07
  • I'm not. But I'm trying to define a ubiquitous language terminology related to my application domain using ontology. So I'm trying to keep the ontology terminology as close to the domain terminology as possible. – PLS Aug 01 '18 at 13:15
  • Ok, well in that case you probably need to know that `isTriggeredByB` and `isTriggeredByD` are `isTriggeredBy` relations. – Henriette Harmse Aug 01 '18 at 13:20
  • Would you mind accepting my answer as correct? Thanks! – Henriette Harmse Aug 01 '18 at 13:20
  • On my blog I write about modelling issues in OWL, which might be of interest to you. You can also ask questions there if you like. See https://henrietteharmse.com. – Henriette Harmse Aug 01 '18 at 13:28
  • I will check now. Again, thanks for collaboration and detailed explanation. Any doubts I will post here =] – PLS Aug 01 '18 at 13:29