Paul indeed has the right idea. The paths returned by this method are /-separated rooted under the directory configured by omero.managed.dir, and they have enough of the original depth preserved for their structure to be understood by Bio-Formats. The names
may have been altered slightly to be legal under the rules of
https://www.openmicroscopy.org/site/sup ... file-namesThe original paths from where on the client system the files were originally imported are also preserved, for instance,
- Code: Select all
query = 'SELECT clientPath FROM FilesetEntry WHERE fileset.id = :id'
params = omero.sys.ParametersI()
params.addId(omero.rtypes.rlong(filesetId))
for path in queryService.projection(query, params):
print path[0].val
will tell you those paths for the given fileset ID. (Paul's query is a bit like the above, but with a query of 'SELECT o.path || o.name FROM OriginalFile o, FilesetEntry e WHERE e.originalFile = o AND e.fileset.id = :id'.)
You could of course still add an annotation to images. If you have external ID numbers you could even use a LongAnnotation in a special namespace or suchlike.
I am not aware of anything in the web gateway that does anything like this for you already, the URI-based retrievals are all by image ID. We have been actively working on improving search for 5.0.3 though so if something through that API might be useful for you, do feel free to ask and I can check into how to index and retrieve the paths through Hibernate Search / Lucene.
Cheers,
Mark