Class ContainerI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.ContainerI
-
- All Implemented Interfaces:
_IContainerOperations,_ServiceInterfaceOperations,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class ContainerI extends AbstractAmdServant implements _IContainerOperations
Implementation of the IContainer service.- Since:
- 3.0-Beta4
- See Also:
IContainer
-
-
Constructor Summary
Constructors Constructor Description ContainerI(ome.api.IContainer service, BlitzExecutor be)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateDataObject_async(AMD_IContainer_createDataObject __cb, IObject obj, Parameters options, Ice.Current __current)Creates the specified data object.voidcreateDataObjects_async(AMD_IContainer_createDataObjects __cb, java.util.List<IObject> dataObjects, Parameters options, Ice.Current __current)Convenience method to save network calls.voidfindContainerHierarchies_async(AMD_IContainer_findContainerHierarchies __cb, java.lang.String rootType, java.util.List<java.lang.Long> imageIds, Parameters options, Ice.Current __current)Retrieves hierarchy trees in various hierarchies that contain the specified Images.voidgetCollectionCount_async(AMD_IContainer_getCollectionCount __cb, java.lang.String type, java.lang.String property, java.util.List<java.lang.Long> ids, Parameters options, Ice.Current __current)Counts the number of members in a collection for a given object.voidgetImages_async(AMD_IContainer_getImages __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options, Ice.Current __current)Retrieve a user's (or all users') images within any given container.voidgetImagesByOptions_async(AMD_IContainer_getImagesByOptions __cb, Parameters options, Ice.Current __current)Retrieves images by options.voidgetImagesBySplitFilesets_async(AMD_IContainer_getImagesBySplitFilesets __cb, java.util.Map<java.lang.String,java.util.List<java.lang.Long>> included, Parameters options, Ice.Current __current)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.voidgetUserImages_async(AMD_IContainer_getUserImages __cb, Parameters options, Ice.Current __current)Retrieves a user's images.voidlink_async(AMD_IContainer_link __cb, java.util.List<IObject> links, Parameters options, Ice.Current __current)Convenience method for creating links.voidloadContainerHierarchy_async(AMD_IContainer_loadContainerHierarchy __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options, Ice.Current __current)Retrieves hierarchy trees rooted by a given node (unless orphan is specified -- See below)voidretrieveCollection_async(AMD_IContainer_retrieveCollection __cb, IObject obj, java.lang.String collectionName, Parameters options, Ice.Current __current)Retrieves a collection with all members initialized (loaded).voidunlink_async(AMD_IContainer_unlink __cb, java.util.List<IObject> links, Parameters options, Ice.Current __current)Removes links between OmeroDataObjects e.g Project-Dataset, Dataset-Image Note that the objects themselves aren't deleted, only the Link objects.voidupdateDataObject_async(AMD_IContainer_updateDataObject __cb, IObject obj, Parameters options, Ice.Current __current)Updates a data object.voidupdateDataObjects_async(AMD_IContainer_updateDataObjects __cb, java.util.List<IObject> objs, Parameters options, Ice.Current __current)Convenience method to save network calls.-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
-
-
-
Constructor Detail
-
ContainerI
public ContainerI(ome.api.IContainer service, BlitzExecutor be)
-
-
Method Detail
-
createDataObject_async
public void createDataObject_async(AMD_IContainer_createDataObject __cb, IObject obj, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsCreates 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 aProjectas 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 DataObjectILinkis created.- Specified by:
createDataObject_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.obj- IObject. Supported: Project, Dataset, Annotation, Group, Experimenter. Not null.options- Parameters as above.__current- The Current object for the invocation.- Throws:
ServerError
-
createDataObjects_async
public void createDataObjects_async(AMD_IContainer_createDataObjects __cb, java.util.List<IObject> dataObjects, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsConvenience method to save network calls. Loops over the array of IObjects callingcreateDataObject.- Specified by:
createDataObjects_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.dataObjects- Array of OmeroIObjectsoptions- Parameters as above.__current- The Current object for the invocation.- Throws:
ServerError
-
findContainerHierarchies_async
public void findContainerHierarchies_async(AMD_IContainer_findContainerHierarchies __cb, java.lang.String rootType, java.util.List<java.lang.Long> imageIds, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieves 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
Setwith all root nodes that were found. Every root node is linked to the found objects and so on until the leaf nodes, which areImageobjects. 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
d1contained imageimg500, then the returned object would not containimg500. In a similar way, ifp1containedds300and this dataset weren't linked to any of thei1, i2, i3, i4, i5, i6images, thends300would not be part of the returned tree rooted byp1.- Specified by:
findContainerHierarchies_asyncin interface_IContainerOperations- 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.annotatorused.experimenter|groupmay be applied at the top-level only or at each level in the hierarchy, but will not apply to the leaf (Image) level.__current- The Current object for the invocation.- Throws:
ServerError
-
getCollectionCount_async
public void getCollectionCount_async(AMD_IContainer_getCollectionCount __cb, java.lang.String type, java.lang.String property, java.util.List<java.lang.Long> ids, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsCounts 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_asyncin interface_IContainerOperations- 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.__current- The Current object for the invocation.- Throws:
ServerError
-
getImagesByOptions_async
public void getImagesByOptions_async(AMD_IContainer_getImagesByOptions __cb, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieves images by options.- Specified by:
getImagesByOptions_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.options- Parameters as above. No notion ofleaves.experimenter|groupapply 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 datais only relevant for images.__current- The Current object for the invocation.- Throws:
ServerError
-
getImages_async
public void getImages_async(AMD_IContainer_getImages __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieve 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_asyncin interface_IContainerOperations- 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 typerootNodeTypeNot null.options- Parameters as above. No notion ofleaves.experimenter|groupapply at the Image level. OPTIONS: - startTime and/or endTime should be Timestamp.valueOf("YYYY-MM-DD hh:mm:ss.ms");limitandoffsetare 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 datais only relevant for images.__current- The Current object for the invocation.- Throws:
ServerError
-
getImagesBySplitFilesets_async
public void getImagesBySplitFilesets_async(AMD_IContainer_getImagesBySplitFilesets __cb, java.util.Map<java.lang.String,java.util.List<java.lang.Long>> included, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsGiven 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_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.included- the entities included__current- The Current object for the invocation.- Throws:
ServerError
-
getUserImages_async
public void getUserImages_async(AMD_IContainer_getUserImages __cb, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieves a user's images.- Specified by:
getUserImages_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.options- Parameters as above. No notion ofleaves.experimenter|groupapply at the Image level and must be present.__current- The Current object for the invocation.- Throws:
ServerError
-
link_async
public void link_async(AMD_IContainer_link __cb, java.util.List<IObject> links, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsConvenience method for creating links. Functionality also available fromcreateDataObject- Specified by:
link_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.links- Array of links to be created.__current- The Current object for the invocation.- Throws:
ServerError
-
loadContainerHierarchy_async
public void loadContainerHierarchy_async(AMD_IContainer_loadContainerHierarchy __cb, java.lang.String rootType, java.util.List<java.lang.Long> rootIds, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieves 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 enclosingDatasetobjects will point to the sameImageobject. And so on.- Specified by:
loadContainerHierarchy_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.rootType- The type of the root node. Can beProject,Dataset,ScreenorPlate. 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 dataused.acquisition datais only relevant for images and taken into account if the images are loaded. IfrootNodeIds==null,experimenter|groupmust 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|groupat theImageand intermediate levels if available. Due to the amount of data potentially linked a Screen/Plate, theleavesoption is not taken into account when the root node is aScreen.orphanimplies that objects which are not contained in an object of rootNodeType should also be returned.__current- The Current object for the invocation.- Throws:
ServerError
-
retrieveCollection_async
public void retrieveCollection_async(AMD_IContainer_retrieveCollection __cb, IObject obj, java.lang.String collectionName, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRetrieves a collection with all members initialized (loaded). This is useful when a collection has been nulled in a previous query.- Specified by:
retrieveCollection_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.obj- Can be unloaded.options- Parameters. Unused.__current- The Current object for the invocation.- Throws:
ServerError
-
unlink_async
public void unlink_async(AMD_IContainer_unlink __cb, java.util.List<IObject> links, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsRemoves links between OmeroDataObjects e.g Project-Dataset, Dataset-Image Note that the objects themselves aren't deleted, only the Link objects.- Specified by:
unlink_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.links- Not null.__current- The Current object for the invocation.- Throws:
ServerError
-
updateDataObject_async
public void updateDataObject_async(AMD_IContainer_updateDataObject __cb, IObject obj, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsUpdates 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_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.obj- Pojos-based IObject. Supported: Project, Dataset, Annotation, Group, Experimenter.options- Parameters as above.__current- The Current object for the invocation.- Throws:
ServerError
-
updateDataObjects_async
public void updateDataObjects_async(AMD_IContainer_updateDataObjects __cb, java.util.List<IObject> objs, Parameters options, Ice.Current __current) throws ServerError
Description copied from interface:_IContainerOperationsConvenience method to save network calls. Loops over the array of IObjects callingupdateDataObject.- Specified by:
updateDataObjects_asyncin interface_IContainerOperations- Parameters:
__cb- The callback object for the operation.__current- The Current object for the invocation.- Throws:
ServerError
-
-