[ome-users] OMERO: No exceptions thrown upon missing images
Chris Allan
callan at blackcat.ca
Wed Jul 15 10:22:42 BST 2009
On Wed, 2009-07-15 at 11:00 +0200, b.gerritsen at nki.nl wrote:
> Hello Chris,
Hi Bram.
>
> Thanks for clarifying this!
No problem at all.
>
> We would like the possibility to tell OMERO that an omero object (image, plate, dataset, project, etc...) is not available because it has been archived. In our case all images including the database will be archived. Since our production system will have limited space we will have to remove the pixel data of some images while keeping the omero database intact as if they hadn't been removed. If omero generates images on the fly we will have no way of knowing something is wrong until maybe after analysis of large datasets. Currently we're considering to remove the data from an image and make the file inaccessible so that omero will throw a permission denied exception when a user or client-program tries to access it.
Likely your best entry point for this would be something we call the
original file metadata provider:
http://svn.openmicroscopy.org.uk/svn/omero/trunk/components/romio/src/ome/io/nio/OriginalFileMetadataProvider.java
You can see the base implementation we use, here:
http://svn.openmicroscopy.org.uk/svn/omero/trunk/components/server/src/ome/services/OmeroOriginalFileMetadataProvider.java
Now, while this wasn't really designed to handle archiving it would be a
simple location to raise an exception if a file had been archived,
assuming you had a programmatic way of determining this; if (!
file.exists()) would certainly be a valid one.
We're looking to make this and a few other I/O subsystem entry points
startup time configurable so that you'd be able to inject your own code
in the next OMERO version. Any feedback you have on what you'd like to
see would be helpful.
>
> Kind Regards,
> Bram
-Chris
More information about the ome-users
mailing list