'Problem in Infer Data Property in Protege

I have a two disjoint ontology classes Book and Learner.

  • hasRated is an object property that links Learner with book

    e.g. Learner hasRated Book

  • withRatingValue is a data property with Domain as Learner

    e.g. Learner withRatingValue 5

How to infer withRatingValue of Book by the Learner?

I want to infer:

Learner (Class) hasRated (Object Property) Book (Class) withRatingValue (DataProperty) 5 (Value)



Solution 1:[1]

This situation matches a general pattern, i.e., how to define an n-ary relationship, where you have two individuals and want to describe a relation between the two that has extra attributes. The common solution to this is to introduce an anonymous individual representing the relation, with object and data property departing from the anonymous individual.

See https://www.w3.org/TR/swbp-n-aryRelations/#useCase1 for examples.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ignazio