Provides methods for dealing with the core "Pojos" of OME. Included are:
Projects, Datasets, Images.
Read API
The names of the methods correlate to how the function operates:
- load: start at container objects and work down toward the
leaves, returning hierarchy (Project->Dataset->Image
- find: start at leaf objects and work up to containers,
returning hierarchy
- get: retrieves only leaves in the hierarchy (currently only
Images)
Options Mechanism
The options are used to add some constraints to the generic method e.g. load
hierarchy trees images for a given user. This mechanism should give
us enough flexibility to extend the API if necessary, e.g. in some cases we
might want to retrieve the images with or without annotations
Most methods take such an options
map which is built on the
client-side using the
Parameters class. The currently supported
options are:
- annotator(Integer): If key exists but value null, annotations
are retrieved for all objects in the hierarchy where they exist; if a valid
experimenterID, annotations are only retrieved for that user. May not be used
be all methods. Default: all annotations
- leaves(Boolean): if FALSE omits images from the returned
hierarchy. May not be used by all methods. Default: true
- experimenter(Integer): enables filtering on a per-experimenter
basis. This option has a method-specific (and possibly context-specific)
meaning. Please see the individual methods.
- group(Integer): enables filtering on a per-group basis. The
experimenter value is ignored if present and instead a similar
filtering is done using all experimenters in the given group.
Write API
As outlined in TODO, the semantics of the Omero write API are based on three
rules:
- IObject-valued fields for which
isLoaded()
returns false
are assumed filtered
- Collection-valued fields that are null are assumed filtered
- Collection-valued fields for which
getDetails().isFiltered(String collectionName)
returns true
are assumed filtered. TODO: should we accept isFiltered for all fields?
In each of these cases, the server will reload that given field
before
attempting to save the graph.
For all write calls, the options map (see below) must contain the userId and
the userGroupId for the newly created objects. TODO umask.