How to use Classes on properties?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use Classes on properties?

Jayr Alencar
Hi.
I need to fill a property on some instances pointing to a class.
How can I do this with owlready?
Reply | Threaded
Open this post in threaded view
|

Re: How to use Classes on properties?

Jiba
Administrator
Hi,

This is not allowed in OWL : properties can relate only individual to individual (or datatype).

The usual solution is to use a restriction, something like :

individual.is_a.append(property.some(Class))

You need to specify either "some" or "only", depending of what you exactly want to represent.

Best regards,
Jiba