Search() query for specific relations

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

Search() query for specific relations

Rusne
Hello!

I am confused about the behaviour of the search() query. Here is very simple code:

o = get_ontology("http://test.org/onto.owl")

with o:
    class Actor(Thing):
        pass

    class Locality(Thing):
        pass

    class isAt(ObjectProperty):
        pass


    for name in ('actor1', 'actor2'):
        loc = o.Locality(name + '_loc')
        actor = o.Actor(name, isAt=[loc])

    AllDisjoint(o.Actor.instances())
    AllDisjoint(o.Locality.instances())


if I query with list(o.isAt.get_relations()), it returns tuples of actor-locality instances, however if I use o.search(isAt="*") then it returns an empty list, although I would expect a list of actors.

Why is it like that?
Reply | Threaded
Open this post in threaded view
|

Re: Search() query for specific relations

Jiba
Administrator
Hi,

You are right, the use of "*" as a jocker was no longer working on entities. I fixed it in the development version or Owlready (on BitBucket).

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

Re: Search() query for specific relations

Rusne
Great, thanks a lot!
I was just confused if I was missing something in the documentation about it but good to know that was not the case.


On 17 Jan 2019, at 16:14, Jiba [via Owlready] <[hidden email]> wrote:

Hi,

You are right, the use of "*" as a jocker was no longer working on entities. I fixed it in the development version or Owlready (on BitBucket).

Thank you,
Best regards,
Jiba


If you reply to this email, your message will be added to the discussion below:
http://owlready.8326.n8.nabble.com/Search-query-for-specific-relations-tp766p783.html
To start a new topic under Owlready, [hidden email]
To unsubscribe from Search() query for specific relations, click here.
NAML