Object property problem

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

Object property problem

Mustafa
This post was updated on .
How to Add many different range and domain with the Object property without deleting the previous range and domain dynamically
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Object property problem

Jiba
Administrator
Hi,

You can add range with property.range.append(additional_range). The same for domains.

Note that if you have 2 or more ranges, OWL consider the INTERSECTION of the ranges, not their union as one usually want to. If you want the union of 2 ranges (either range1 or range2), you should do: property.range = [Or([range1, range2])]

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Object property problem

Mustafa
Hi Jiba

How can i do it dynamically if i have list

with onto:  
                h=prop[n] #property
                for X in ADD: # ADD is list
                    dom = X[0] #subj   of ADD
                    rang = X[1] #obj  of ADD


What should i do next
Reply | Threaded
Open this post in threaded view
|

Re: Object property problem

Jiba
Administrator
Hi,

If you want the intersection, you can you add the range and the domain, with h.range.append(rang) and h.domain.append(dom).

Jiba