We're Hiring!

How to search with java api? Or use SQL?

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

How to search with java api? Or use SQL?

Postby andersla » Wed Mar 06, 2019 7:31 pm

I would like to query the omero database and find images that for example belong to a Screen and also have some values in MapAnnotations that are attached to images, how is this done? Is there some examples?
I looked here but only find browse examples?:
https://docs.openmicroscopy.org/omero/5 ... /Java.html

Is it possible to use SQL from the java API? Or If I want to find this data from another program, should I not use the Omero-api but instead search straight from the Postgres database?

All the best,
Posts: 9
Joined: Wed Feb 13, 2019 8:18 am

Re: How to search with java api? Or use SQL?

Postby mtbc » Wed Mar 06, 2019 7:44 pm

Dear Anders,

The query service accepts HQL: the three links from the first paragraph about HQL at https://docs.openmicroscopy.org/latest/ ... l-examples are probably the best start for you (also see the section above). With map annotations the HQL examples at https://docs.openmicroscopy.org/latest/ ... nd-queries should help you along too.

User avatar
Team Member
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest