Page 1 of 1

How to search with java api? Or use SQL?

PostPosted: Wed Mar 06, 2019 7:31 pm
by andersla
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,
Anders

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

PostPosted: Wed Mar 06, 2019 7:44 pm
by mtbc
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.

Cheers,
Mark