Interface Folder

    • Method Detail

      • asDataObject

        FolderData asDataObject()
        Returns a DataObject (or a subclass) corresponding to the handled object.
        Specified by:
        asDataObject in interface RemoteObject
        Returns:
        See above.
      • setName

        void setName​(java.lang.String name)
        Sets the name of the folder.
        Parameters:
        name - The name of the folder. Mustn't be null.
        Throws:
        java.lang.IllegalArgumentException - If the name is null.
      • 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 interface ImageLinked
        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.