Package fr.igred.omero.containers
Interface Folder
-
- All Superinterfaces:
Annotatable
,ImageLinked
,RemoteObject
,RepositoryObject
- All Known Implementing Classes:
FolderWrapper
public interface Folder extends RepositoryObject, ImageLinked
Interface to handle Folders on OMERO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addChild(Folder folder)
Adds a child folder to this folder.void
addChildren(java.util.Collection<? extends Folder> folders)
Adds children folders to this folder.default void
addImages(DataManager dm, Image... images)
Links images to the folder in OMERO.default void
addROIs(DataManager dm, long imageId, ROI... rois)
Adds ROIs to the folder and associate them to the provided image ID.default void
addROIs(DataManager dm, Image image, ROI... rois)
Adds ROIs to the folder and associate them to the provided image.FolderData
asDataObject()
Returns a DataObject (or a subclass) corresponding to the handled object.java.util.List<Folder>
getChildren()
Retrieves the children folders for this folder.java.util.List<Image>
getImages()
Retrieves the images contained in this folder.default java.util.List<Image>
getImages(Browser browser)
Retrieves the images contained in this folder.Folder
getParent()
Retrieves the parent folders for this folder.java.util.List<ROI>
getROIs(DataManager dm, long imageId)
Gets the ROIs contained in the folder associated with the provided image ID.default java.util.List<ROI>
getROIs(DataManager dm, Image image)
Gets the ROIs contained in the folder associated with the provided image.default <A extends AnnotationData>
voidlink(DataManager dm, A annotation)
Attach anAnnotationData
to this object.void
reload(Browser browser)
Reloads the folder from OMERO, to update all links.void
setDescription(java.lang.String description)
Sets the description of the folder.void
setName(java.lang.String name)
Sets the name of the folder.void
setParent(Folder folder)
Sets the parent folder for this folder.void
unlinkAllROIs(DataManager dm)
Unlink all ROIs associated to this folder.default void
unlinkAllROIs(DataManager dm, long imageId)
Unlink all ROIs associated to the provided image ID from the folder.default void
unlinkAllROIs(DataManager dm, Image image)
Unlink all ROIs associated to the provided image from the folder.default void
unlinkROIs(DataManager dm, ROI... rois)
Unlink ROIs from the folder.-
Methods inherited from interface fr.igred.omero.Annotatable
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, linkIfNotLinked, rate, unlink
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
Methods inherited from interface fr.igred.omero.RepositoryObject
getDescription, getName
-
-
-
-
Method Detail
-
asDataObject
FolderData asDataObject()
Returns a DataObject (or a subclass) corresponding to the handled object.- Specified by:
asDataObject
in interfaceRemoteObject
- Returns:
- See above.
-
link
default <A extends AnnotationData> void link(DataManager dm, A annotation) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Attach anAnnotationData
to this object.- Specified by:
link
in interfaceAnnotatable
- Type Parameters:
A
- The type of the annotation.- Parameters:
dm
- The client handling the connection.annotation
- TheAnnotationData
.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
setName
void setName(java.lang.String name)
Sets the name of the folder.- Parameters:
name
- The name of the folder. Mustn't benull
.- Throws:
java.lang.IllegalArgumentException
- If the name isnull
.
-
setDescription
void setDescription(java.lang.String description)
Sets the description of the folder.- Parameters:
description
- The folder description.
-
getParent
Folder getParent()
Retrieves the parent folders for this folder.- Returns:
- See above
-
setParent
void setParent(Folder folder)
Sets the parent folder for this folder.- Parameters:
folder
- The new parent folder.
-
addChild
void addChild(Folder folder)
Adds a child folder to this folder.- Parameters:
folder
- The new child folder.
-
addChildren
void addChildren(java.util.Collection<? extends Folder> folders)
Adds children folders to this folder.- Parameters:
folders
- The new children folders.
-
getChildren
java.util.List<Folder> getChildren()
Retrieves the children folders for this folder.- Returns:
- See above
-
addImages
default void addImages(DataManager dm, Image... images) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Links images to the folder in OMERO.The folder needs to be reloaded afterwards.
- Parameters:
dm
- The data manager.images
- Images to add.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImages
java.util.List<Image> getImages()
Retrieves the images contained in this folder.- Returns:
- See above
-
getImages
default java.util.List<Image> getImages(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException
Retrieves the images contained in this folder.- Specified by:
getImages
in interfaceImageLinked
- Parameters:
browser
- The data browser.- Returns:
- See above
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
addROIs
default void addROIs(DataManager dm, long imageId, ROI... rois) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Adds ROIs to the folder and associate them to the provided image ID.- Parameters:
dm
- The data manager.imageId
- The image ID.rois
- ROIs to add.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- If the ROIFacility can't be retrieved or instantiated.
-
addROIs
default void addROIs(DataManager dm, Image image, ROI... rois) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Adds ROIs to the folder and associate them to the provided image.- Parameters:
dm
- The data manager.image
- The image.rois
- ROIs to add.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- If the ROIFacility can't be retrieved or instantiated.
-
getROIs
java.util.List<ROI> getROIs(DataManager dm, long imageId) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets the ROIs contained in the folder associated with the provided image ID.- Parameters:
dm
- The data manager.imageId
- The image.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getROIs
default java.util.List<ROI> getROIs(DataManager dm, Image image) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets the ROIs contained in the folder associated with the provided image.- Parameters:
dm
- The data manager.image
- The image.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkAllROIs
default void unlinkAllROIs(DataManager dm, long imageId) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink all ROIs associated to the provided image ID from the folder.ROIs are now linked to the image directly.
- Parameters:
dm
- The data manager.imageId
- The image ID.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkAllROIs
default void unlinkAllROIs(DataManager dm, Image image) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink all ROIs associated to the provided image from the folder.ROIs are now linked to the image directly.
- Parameters:
dm
- The data manager.image
- The image.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkAllROIs
void unlinkAllROIs(DataManager dm) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink all ROIs associated to this folder.The folder must be loaded beforehand.
ROIs are now linked to their images directly.
- Parameters:
dm
- The data manager.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkROIs
default void unlinkROIs(DataManager dm, ROI... rois) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink ROIs from the folder.The ROIs are now linked to the image directly.
- Parameters:
dm
- The data manager.rois
- ROI to unlink.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
reload
void reload(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException
Reloads the folder from OMERO, to update all links.- Parameters:
browser
- The data browser.- Throws:
AccessException
- Cannot access data.ServiceException
- Cannot connect to OMERO.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-