Boolean Data Property

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

Boolean Data Property

jritch33
Suppose the following:

class has_boolean_property(DataProperty, FunctionalProperty):
    domain = [onto.DomainClass]
    range = [bool]

onto.EquivalencyClass.equivalent_to = [
    (onto.has_boolean_property) & (onto.has_object_property.some(onto.obj_property))
]

I'm getting errors on the bold line but can't find an example online of the correct syntax. What is the correct syntax?
Reply | Threaded
Open this post in threaded view
|

Re: Boolean Data Property

Jiba
Administrator
Hi,

I guess you mean that has_boolean_property must be true ? In Python, the true is often implicit, but not in OWL, so you should write :

    (onto.has_boolean_property.value(True)) & (onto.has_object_property.some(onto.obj_property))

Best regards,
Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Boolean Data Property

jritch33
Yes! You nailed it. Thanks!