Re: Object property

Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/Object-property-tp2513p2524.html

Hi,

You can add instances (not classes) to range / domain by using a "OneOf" OWL construct (it transforms a list of instances into a class):

one_of = OneOf([])

one_of.instances.append(sub1)
one_of.instances.append(sub2)

prop.domain.append(one_of)


You may also use Prop.get_relations() to list all the (sub, obj) pairs for that property.

Jiba