Class FolderWrapper

    • Field Detail

      • ANNOTATION_LINK

        public static final java.lang.String ANNOTATION_LINK
        Annotation link name for this type of object
        See Also:
        Constant Field Values
    • Constructor Detail

      • FolderWrapper

        public FolderWrapper​(FolderData folder)
        Constructor of the FolderWrapper class.
        Parameters:
        folder - The FolderData to wrap.
      • FolderWrapper

        public FolderWrapper​(Folder folder)
        Constructor of the FolderWrapper class.
        Parameters:
        folder - Folder to contain.
      • FolderWrapper

        public FolderWrapper​(DataManager dm,
                             java.lang.String name)
                      throws ServiceException,
                             AccessException,
                             java.util.concurrent.ExecutionException
        Constructor of the FolderWrapper class. Save the folder in OMERO
        Parameters:
        dm - The data manager.
        name - Name of the folder.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the folder
        Specified by:
        getName in interface RepositoryObject
        Returns:
        name.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of the folder.
        Specified by:
        setName in interface Folder
        Parameters:
        name - The name of the folder. Mustn't be null.
        Throws:
        java.lang.IllegalArgumentException - If the name is null.
      • getDescription

        public java.lang.String getDescription()
        Gets the folder description
        Specified by:
        getDescription in interface RepositoryObject
        Returns:
        The folder description.
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of the folder.
        Specified by:
        setDescription in interface Folder
        Parameters:
        description - The folder description.
      • getParent

        public Folder getParent()
        Retrieves the parent folders for this folder.
        Specified by:
        getParent in interface Folder
        Returns:
        See above
      • setParent

        public void setParent​(Folder folder)
        Sets the parent folder for this folder.
        Specified by:
        setParent in interface Folder
        Parameters:
        folder - The new parent folder.
      • addChild

        public void addChild​(Folder folder)
        Adds a child folder to this folder.
        Specified by:
        addChild in interface Folder
        Parameters:
        folder - The new child folder.
      • addChildren

        public void addChildren​(java.util.Collection<? extends Folder> folders)
        Adds children folders to this folder.
        Specified by:
        addChildren in interface Folder
        Parameters:
        folders - The new children folders.
      • getChildren

        public java.util.List<Folder> getChildren()
        Retrieves the children folders for this folder.
        Specified by:
        getChildren in interface Folder
        Returns:
        See above
      • getImages

        public java.util.List<Image> getImages()
        Retrieves the images contained in this folder.
        Specified by:
        getImages in interface Folder
        Returns:
        See above
      • getROIs

        public 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.
        Specified by:
        getROIs in interface Folder
        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.
      • unlinkAllROIs

        public 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.

        Specified by:
        unlinkAllROIs in interface Folder
        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.
      • reload

        public void reload​(Browser browser)
                    throws AccessException,
                           ServiceException,
                           java.util.concurrent.ExecutionException
        Reloads the folder from OMERO, to update all links.
        Specified by:
        reload in interface Folder
        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.