Hi all!
We like to query the omero database directly using SQL and use that to find all the files in the /Files, /Thumbnails and /Pixels that belong to a screen or project.
Currently, for screens we use the following mechanism:
First we find all the WellSample records that belong to the screen.
The ID of this WellSample record is the same is the filename in the /Files folder.
For each WellSample, we find the Pixel record and the ID of the Pixel record if the same as the filename in the /Pixel folder.
For each Pixel, we find the Thumbnail record and the ID of this Thumbnail record is the same as the filename in the /Thumbnail folder.
For projects, we first find the datasetimagelink records that belong to the project.
The datasetimagelink.child is the same as the filename in the /Files folder.
For each datasetimagelink record, I find the Pixels and Thumbnail record and use their ID for the files in the /Pixels and /Thumbnails folder.
We had occasions however that we assumed that there shoud file files in the /Files folder (because there were WellSample records) but these files were not there.
We were noted not to use the WellSample or DatasetImageLink record to files the files in the /Files folder, but use the 'originalfile' table.
Can anybody confirm that?
I like to know if I can add the following to the query:
pixelsoriginalfilemap.child = originalfile.id
pixelsoriginalfilemap.parent = pixels.id
Then use the originalfile.id as the file in the /File folder.
Can someone confirm that this is the correct way of finding the files in the /Files, /Pixels and /Thumbnails folder?
Thanks,
Robbert vd Zon
note: In reality we use a more optimized queries