3

I want to design an object property which is always linked only between the same level of classes. For example,

enter image description here

I want to limit the property isCounterPartOf to be an arc of the sibling nodes which belong to the same upper class, such as

house isCounterPartOf cars
bad isCounterPartOf good
slow isCounterPartOf fast

and the property should NOT link between classes of different levels (those having different ancestors), like

cars isCounterPartOf bad
cars isCounterPartOf object
cars isCounterPartOf Entity

Is there a way to do this with defining only one property?

MJ Park
  • 303
  • 1
  • 10

1 Answers1

3

Assuming your objective is when :isCounterPartOf links two individuals, and one is a member of e.g. :Bad, then the other should be classified as :Good, you don't need to define domain and range of :isCounterPartOf, just that it is owl:SymmetricProperty. You only need to define your classes, :Bad to be equivalent of :isCounterPartOf some :Good and :Good to be equivalent of :isCounterPartOf some :Bad, and for all "pairs" of classes respectively.

Then if:

:A :isCounterPartOf :B

:C :isCounterPartOf :B

:A a :Slow

:C a :Bad

then :B will be classified as :Fast and :Good.

Clarification (based on the comments)

In the example above, 1. :isCouterPartOf is a symetric object property:

:isCounterPartOf rdf:type owl:ObjectProperty ,
                          owl:SymmetricProperty .
  1. :Good, :Bad, :Slow and :Fast are OWL classes, for which: (no idea why the code formatting doesn't work)

    :Bad rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :isCounterPartOf ; owl:someValuesFrom :Good ] .

    :Fast rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :isCounterPartOf ; owl:someValuesFrom :Slow ] .

    :Good rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :isCounterPartOf ; owl:someValuesFrom :Bad ] .

    :Slow rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :isCounterPartOf ; owl:someValuesFrom :Fast ] .

  2. :A, :B, and :C are individuals, for which it is asserted that: (again, no idea why the code formatting doesn't work)

    :A rdf:type owl:NamedIndividual , :Slow ;

    :isCounterPartOf :B .

    :B rdf:type owl:NamedIndividual , owl:Thing .

    :C rdf:type owl:NamedIndividual , :Bad ;
    :isCounterPartOf :B .

Based on these assertions, when you run the reasoner, you'll have the following situation:

:A rdf:type owl:NamedIndividual ,
            :Bad , #inferred
            :Slow ;

   :isCounterPartOf :B .

:B rdf:type owl:NamedIndividual ,
            :Fast , #inferred
            :Good , #inferred
            owl:Thing ;

   :isCounterPartOf :A , #inferred
                    :C . #inferred

:C rdf:type owl:NamedIndividual ,
            :Bad ,
            :Slow ; #inferred

   :isCounterPartOf :B .
Ivo Velitchkov
  • 2,361
  • 11
  • 21
  • Sorry, I'm a newbie in owl syntax. I don't understand what `:A a :Slow` stands for. Is it Manchester syntax? Is there any references that I could refer to? – MJ Park May 10 '16 at 00:18
  • This is a Turtle notation, where `a` stands for `rdf:type` and when `:` is used without prefix it is the usual way to say that the resource is defined in the namespace of the current ontology. So, in the context provided by your question, `:A a :Slow` was intended to mean "The individual A, defined in this knowledge base, is a member of class Slow, defined in this knowledge base". Thank you for your comment, I'll update the answer to clarify this. – Ivo Velitchkov May 10 '16 at 10:12
  • Thank you so much. I'm looking forward to seeing your update. I don't think I've really understood your answer. Is B an individual or a Class? – MJ Park May 10 '16 at 13:30
  • @MJPark I've updated my answer. Please let me know if now it's clear. – Ivo Velitchkov May 10 '16 at 19:22
  • Thank you so much. It's crystal clear now. But I'm afraid your answer is a bit different from what I originally wanted to do. I actually wanted `isCounterPartOf`occurs between `bad` and `good` as the result of inference. Your answer, however, looks like we assert the relationship `isCounterPartOf` in advance (`:C :isCounterPartOf :B`) , after that the inference results in showing `:B a :good`. Please take a look [another post](http://stackoverflow.com/questions/37141784/owl-how-to-get-inheritance-of-property-relations-between-two-classes-from-those) if you will. Thank you. – MJ Park May 11 '16 at 05:36
  • Classes in OWL can only be linked through subClass relationship. All other properties can link individuals to other individuals, individuals to literals (datatype and annotation properties), classes to literals (annotation properties), and individuals to classes via `rdf:type`, but not classes to classes. We could say that there are relations between classes only in the sense that classes are described or defined through other classes and properties via restrictions and domain/range. Making any parallels between DL and OO can bring false expectations. – Ivo Velitchkov May 11 '16 at 06:39