Class _IContainerDisp
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.api._IContainerDisp
-
- All Implemented Interfaces:
Ice.Object
,java.io.Serializable
,java.lang.Cloneable
,_IContainerOperations
,_IContainerOperationsNC
,_ServiceInterfaceOperations
,_ServiceInterfaceOperationsNC
,IContainer
,ServiceInterface
- Direct Known Subclasses:
_IContainerTie
public abstract class _IContainerDisp extends Ice.ObjectImpl implements IContainer
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 theParameters
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?
For all write calls, the options map (see below) must contain the userId and the userGroupId for the newly created objects. TODO umask.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
__ids
static long
serialVersionUID
-
Fields inherited from interface omero.api.IContainer
ice_staticId
-
-
Constructor Summary
Constructors Constructor Description _IContainerDisp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ice.DispatchStatus
___createDataObject(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___createDataObjects(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___findContainerHierarchies(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getCollectionCount(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getImages(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getImagesByOptions(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getImagesBySplitFilesets(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___getUserImages(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___link(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___loadContainerHierarchy(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___retrieveCollection(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___unlink(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___updateDataObject(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
static Ice.DispatchStatus
___updateDataObjects(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
Ice.DispatchStatus
__dispatch(IceInternal.Incoming in, Ice.Current __current)
protected void
__readImpl(IceInternal.BasicStream __is)
protected void
__writeImpl(IceInternal.BasicStream __os)
void
createDataObject_async(AMD_IContainer_createDataObject __cb, IObject obj, Parameters options)
Creates the specified data object.void
createDataObjects_async(AMD_IContainer_createDataObjects __cb, java.util.List<IObject> dataObjects, Parameters options)
Convenience method to save network calls.void
findContainerHierarchies_async(AMD_IContainer_findContainerHierarchies __cb, java.lang.String rootType, java.util.List<java.lang.Long> imageIds, Parameters options)
Retrieves hierarchy trees in various hierarchies that contain the specified Images.void
getCollectionCount_async(AMD_IContainer_getCollectionCount __cb, java.lang.String type, java.lang.String property, java.util.List<java.lang.Long> ids, Parameters options)
Counts the number of members in a collection for a given object.void
getImages_async(AMD_IContainer_getImages __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options)
Retrieve a user's (or all users') images within any given container.void
getImagesByOptions_async(AMD_IContainer_getImagesByOptions __cb, Parameters options)
Retrieves images by options.void
getImagesBySplitFilesets_async(AMD_IContainer_getImagesBySplitFilesets __cb, java.util.Map<java.lang.String,java.util.List<java.lang.Long>> included, Parameters options)
Given a list of IDs of certain entity types, calculates which filesets are split such that a non-empty proper subset of their images are referenced, directly or indirectly, as being included.void
getUserImages_async(AMD_IContainer_getUserImages __cb, Parameters options)
Retrieves a user's images.protected void
ice_copyStateFrom(Ice.Object __obj)
java.lang.String
ice_id()
java.lang.String
ice_id(Ice.Current __current)
java.lang.String[]
ice_ids()
java.lang.String[]
ice_ids(Ice.Current __current)
boolean
ice_isA(java.lang.String s)
boolean
ice_isA(java.lang.String s, Ice.Current __current)
static java.lang.String
ice_staticId()
void
link_async(AMD_IContainer_link __cb, java.util.List<IObject> links, Parameters options)
Convenience method for creating links.void
loadContainerHierarchy_async(AMD_IContainer_loadContainerHierarchy __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options)
Retrieves hierarchy trees rooted by a given node (unless orphan is specified -- See below)void
retrieveCollection_async(AMD_IContainer_retrieveCollection __cb, IObject obj, java.lang.String collectionName, Parameters options)
Retrieves a collection with all members initialized (loaded).void
unlink_async(AMD_IContainer_unlink __cb, java.util.List<IObject> links, Parameters options)
Removes links between OmeroDataObjects e.g Project-Dataset, Dataset-Image Note that the objects themselves aren't deleted, only the Link objects.void
updateDataObject_async(AMD_IContainer_updateDataObject __cb, IObject obj, Parameters options)
Updates a data object.void
updateDataObjects_async(AMD_IContainer_updateDataObjects __cb, java.util.List<IObject> objs, Parameters options)
Convenience method to save network calls.-
Methods inherited from class Ice.ObjectImpl
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface omero.api._IContainerOperations
createDataObject_async, createDataObjects_async, findContainerHierarchies_async, getCollectionCount_async, getImages_async, getImagesByOptions_async, getImagesBySplitFilesets_async, getUserImages_async, link_async, loadContainerHierarchy_async, retrieveCollection_async, unlink_async, updateDataObject_async, updateDataObjects_async
-
-
-
-
Field Detail
-
__ids
public static final java.lang.String[] __ids
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
ice_copyStateFrom
protected void ice_copyStateFrom(Ice.Object __obj) throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException
-
ice_isA
public boolean ice_isA(java.lang.String s)
- Specified by:
ice_isA
in interfaceIce.Object
- Overrides:
ice_isA
in classIce.ObjectImpl
-
ice_isA
public boolean ice_isA(java.lang.String s, Ice.Current __current)
- Specified by:
ice_isA
in interfaceIce.Object
- Overrides:
ice_isA
in classIce.ObjectImpl
-
ice_ids
public java.lang.String[] ice_ids()
- Specified by:
ice_ids
in interfaceIce.Object
- Overrides:
ice_ids
in classIce.ObjectImpl
-
ice_ids
public java.lang.String[] ice_ids(Ice.Current __current)
- Specified by:
ice_ids
in interfaceIce.Object
- Overrides:
ice_ids
in classIce.ObjectImpl
-
ice_id
public java.lang.String ice_id()
- Specified by:
ice_id
in interfaceIce.Object
- Overrides:
ice_id
in classIce.ObjectImpl
-
ice_id
public java.lang.String ice_id(Ice.Current __current)
- Specified by:
ice_id
in interfaceIce.Object
- Overrides:
ice_id
in classIce.ObjectImpl
-
ice_staticId
public static java.lang.String ice_staticId()
-
createDataObject_async
public final void createDataObject_async(AMD_IContainer_createDataObject __cb, IObject obj, Parameters options) throws ServerError
Creates the specified data object.A placeholder parent object is created if the data object is to be put in a collection.
For example, if the object is a
Dataset
, we first create aProject
as parent then we set the Dataset parent as follows://pseudo-code TODO Project p = new Project(id,false); dataset.addProject(p);
then for each parent relationship a DataObjectILink
is created.- Specified by:
createDataObject_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.obj
- IObject. Supported: Project, Dataset, Annotation, Group, Experimenter. Not null.options
- Parameters as above.- Throws:
ServerError
-
createDataObjects_async
public final void createDataObjects_async(AMD_IContainer_createDataObjects __cb, java.util.List<IObject> dataObjects, Parameters options) throws ServerError
Convenience method to save network calls. Loops over the array of IObjects callingcreateDataObject
.- Specified by:
createDataObjects_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.dataObjects
- Array of OmeroIObjects
options
- Parameters as above.- Throws:
ServerError
-
findContainerHierarchies_async
public final void findContainerHierarchies_async(AMD_IContainer_findContainerHierarchies __cb, java.lang.String rootType, java.util.List<java.lang.Long> imageIds, Parameters options) throws ServerError
Retrieves hierarchy trees in various hierarchies that contain the specified Images.This method will look for all the containers containing the specified Images and then for all containers containing those containers and on up the container hierarchy.
This method returns a
Set
with all root nodes that were found. Every root node is linked to the found objects and so on until the leaf nodes, which areImage
objects. Note that the type of any root node in the returned set can be the given rootNodeType, any of its containees or anImage
.For example, say that you pass in the ids of six Images:
i1, i2, i3, i4, i5, i6
. If the P/D/I hierarchy in the DB looks like this:| __p1__ | / \ | _d1_ _d2_ d3 | / \ / \ | | i1 i2 i3 i4 i5 i6
Then the returned set will contain
p1, d3, i5, i6
. All objects will be properly linked up.Finally, this method will only retrieve the nodes that are connected in a tree to the specified leaf image nodes. Back to the previous example, if
d1
contained imageimg500
, then the returned object would not containimg500
. In a similar way, ifp1
containedds300
and this dataset weren't linked to any of thei1, i2, i3, i4, i5, i6
images, thends300
would not be part of the returned tree rooted byp1
.- Specified by:
findContainerHierarchies_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.rootType
- top-most type which will be searched for Can beProject
. Not null.imageIds
- Contains the ids of the Images that sit at the bottom of the trees. Not null.options
- Parameters as above.annotator
used.experimenter|group
may be applied at the top-level only or at each level in the hierarchy, but will not apply to the leaf (Image) level.- Throws:
ServerError
-
getCollectionCount_async
public final void getCollectionCount_async(AMD_IContainer_getCollectionCount __cb, java.lang.String type, java.lang.String property, java.util.List<java.lang.Long> ids, Parameters options) throws ServerError
Counts the number of members in a collection for a given object. For example, if you wanted to retrieve the number of Images contained in a Dataset you would pass TODO.- Specified by:
getCollectionCount_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.type
- The fully-qualified classname of the object to be testedproperty
- Name of the property on that class, omitting getters and setters.ids
- Set of Longs, the ids of the objects to testoptions
- Parameters. Unused.- Throws:
ServerError
-
getImages_async
public final void getImages_async(AMD_IContainer_getImages __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options) throws ServerError
Retrieve a user's (or all users') images within any given container. For example, all images in project, applying temporal filtering or pagination.- Specified by:
getImages_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.rootType
- A Class which will have its hierarchy searched for Images. Not null.rootIds
- A set of ids of typerootNodeType
Not null.options
- Parameters as above. No notion ofleaves
.experimenter|group
apply at the Image level. OPTIONS: - startTime and/or endTime should be Timestamp.valueOf("YYYY-MM-DD hh:mm:ss.ms");limit
andoffset
are applied at the Image-level. That is, calling with Dataset.class, limit == 10 and offset == 0 will first perform one query to get an effective set of rootNodeIds, then getImages will be called with an effective rootNodeType of Image.class and the new ids.acquisition data
is only relevant for images.- Throws:
ServerError
-
getImagesByOptions_async
public final void getImagesByOptions_async(AMD_IContainer_getImagesByOptions __cb, Parameters options) throws ServerError
Retrieves images by options.- Specified by:
getImagesByOptions_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.options
- Parameters as above. No notion ofleaves
.experimenter|group
apply at the Image level and must be present. OPTIONS: - startTime and/or endTime should be Timestamp.valueOf("YYYY-MM-DD hh:mm:ss.ms").acquisition data
is only relevant for images.- Throws:
ServerError
-
getImagesBySplitFilesets_async
public final void getImagesBySplitFilesets_async(AMD_IContainer_getImagesBySplitFilesets __cb, java.util.Map<java.lang.String,java.util.List<java.lang.Long>> included, Parameters options) throws ServerError
Given a list of IDs of certain entity types, calculates which filesets are split such that a non-empty proper subset of their images are referenced, directly or indirectly, as being included. The return value lists both the fileset IDs and the image IDs in ascending order, the image ID lists separated by if they were included. Warning: following discussion in trac ticket 11019 the return type may be changed.- Specified by:
getImagesBySplitFilesets_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.included
- the entities included- Throws:
ServerError
-
getUserImages_async
public final void getUserImages_async(AMD_IContainer_getUserImages __cb, Parameters options) throws ServerError
Retrieves a user's images.- Specified by:
getUserImages_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.options
- Parameters as above. No notion ofleaves
.experimenter|group
apply at the Image level and must be present.- Throws:
ServerError
-
link_async
public final void link_async(AMD_IContainer_link __cb, java.util.List<IObject> links, Parameters options) throws ServerError
Convenience method for creating links. Functionality also available fromcreateDataObject
- Specified by:
link_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.links
- Array of links to be created.- Throws:
ServerError
-
loadContainerHierarchy_async
public final void loadContainerHierarchy_async(AMD_IContainer_loadContainerHierarchy __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options) throws ServerError
Retrieves hierarchy trees rooted by a given node (unless orphan is specified -- See below)This method also retrieves the Experimenters linked to the objects in the tree. Similarly, all Images will be linked to their Pixel objects if included.
Note that objects are never duplicated. For example, if an Experimenter owns all the objects in the retrieved tree, then those objects will be linked to the same instance of
Experimenter
. Or if an Image is contained in more than one Dataset in the retrieved tree, then all enclosingDataset
objects will point to the sameImage
object. And so on.- Specified by:
loadContainerHierarchy_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.rootType
- The type of the root node. Can beProject
,Dataset
,Screen
orPlate
. Cannot be null.rootIds
- The ids of the root nodes. Can be null if an Experimenter is specified inoptions
, otherwise an Exception is thrown to prevent all images in the entire database from being downloaded.options
- Parameters as above.annotator
,leaves
,orphan
,acquisition data
used.acquisition data
is only relevant for images and taken into account if the images are loaded. IfrootNodeIds==null
,experimenter|group
must be set and filtering will be applied at the Class-level; e.g. to retrieve a user's Projects, or user's Datasets. IfrootNodeIds!=null
, the result will be filtered by theexperimenter|group
at theImage
and intermediate levels if available. Due to the amount of data potentially linked a Screen/Plate, theleaves
option is not taken into account when the root node is aScreen
.orphan
implies that objects which are not contained in an object of rootNodeType should also be returned.- Throws:
ServerError
-
retrieveCollection_async
public final void retrieveCollection_async(AMD_IContainer_retrieveCollection __cb, IObject obj, java.lang.String collectionName, Parameters options) throws ServerError
Retrieves a collection with all members initialized (loaded). This is useful when a collection has been nulled in a previous query.- Specified by:
retrieveCollection_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.obj
- Can be unloaded.options
- Parameters. Unused.- Throws:
ServerError
-
unlink_async
public final void unlink_async(AMD_IContainer_unlink __cb, java.util.List<IObject> links, Parameters options) throws ServerError
Removes links between OmeroDataObjects e.g Project-Dataset, Dataset-Image Note that the objects themselves aren't deleted, only the Link objects.- Specified by:
unlink_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.links
- Not null.- Throws:
ServerError
-
updateDataObject_async
public final void updateDataObject_async(AMD_IContainer_updateDataObject __cb, IObject obj, Parameters options) throws ServerError
Updates a data object.To link or unlink objects to the specified object, we should call the methods link or unlink. TODO Or do we use for example dataset.setProjects(set of projects) to add. Link has to be set as follows dataset→project and project→dataset. Alternatively, you can make sure that the collection is exactly how it should be in the database. If you can't guarantee this, it's best to send all your collections back as
null
- Specified by:
updateDataObject_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.obj
- Pojos-based IObject. Supported: Project, Dataset, Annotation, Group, Experimenter.options
- Parameters as above.- Throws:
ServerError
-
updateDataObjects_async
public final void updateDataObjects_async(AMD_IContainer_updateDataObjects __cb, java.util.List<IObject> objs, Parameters options) throws ServerError
Convenience method to save network calls. Loops over the array of IObjects callingupdateDataObject
.- Specified by:
updateDataObjects_async
in interface_IContainerOperationsNC
- Parameters:
__cb
- The callback object for the operation.objs
-- Throws:
ServerError
-
___loadContainerHierarchy
public static Ice.DispatchStatus ___loadContainerHierarchy(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___findContainerHierarchies
public static Ice.DispatchStatus ___findContainerHierarchies(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getImages
public static Ice.DispatchStatus ___getImages(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getUserImages
public static Ice.DispatchStatus ___getUserImages(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getImagesByOptions
public static Ice.DispatchStatus ___getImagesByOptions(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getImagesBySplitFilesets
public static Ice.DispatchStatus ___getImagesBySplitFilesets(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___getCollectionCount
public static Ice.DispatchStatus ___getCollectionCount(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___retrieveCollection
public static Ice.DispatchStatus ___retrieveCollection(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___createDataObject
public static Ice.DispatchStatus ___createDataObject(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___createDataObjects
public static Ice.DispatchStatus ___createDataObjects(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___unlink
public static Ice.DispatchStatus ___unlink(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___link
public static Ice.DispatchStatus ___link(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___updateDataObject
public static Ice.DispatchStatus ___updateDataObject(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
___updateDataObjects
public static Ice.DispatchStatus ___updateDataObjects(IContainer __obj, IceInternal.Incoming __inS, Ice.Current __current)
-
__dispatch
public Ice.DispatchStatus __dispatch(IceInternal.Incoming in, Ice.Current __current)
- Specified by:
__dispatch
in interfaceIce.Object
- Overrides:
__dispatch
in classIce.ObjectImpl
-
__writeImpl
protected void __writeImpl(IceInternal.BasicStream __os)
- Overrides:
__writeImpl
in classIce.ObjectImpl
-
__readImpl
protected void __readImpl(IceInternal.BasicStream __is)
- Overrides:
__readImpl
in classIce.ObjectImpl
-
-