Class DatasetWrapper

    • 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

      • DatasetWrapper

        public DatasetWrapper​(java.lang.String name,
                              java.lang.String description)
        Constructor of the DatasetWrapper class
        Parameters:
        name - Name of the dataset.
        description - Description of the dataset.
      • DatasetWrapper

        public DatasetWrapper​(DatasetData dataset)
        Constructor of the DatasetWrapper class
        Parameters:
        dataset - Dataset to be contained.
    • Method Detail

      • getName

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

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

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

        public void setDescription​(java.lang.String description)
        Sets the description of the dataset.
        Specified by:
        setDescription in interface Dataset
        Parameters:
        description - The description of the dataset.
      • getImages

        public java.util.List<Image> getImages()
        Gets all the images in the dataset (if it was properly loaded from OMERO).
        Specified by:
        getImages in interface Dataset
        Returns:
        See above.
      • removeImage

        public void removeImage​(Client client,
                                Image image)
                         throws ServiceException,
                                AccessException,
                                java.util.concurrent.ExecutionException,
                                ServerException,
                                java.lang.InterruptedException
        Removes an image from the dataset in OMERO.
        Specified by:
        removeImage in interface Dataset
        Parameters:
        client - The client handling the connection.
        image - Image to remove.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
        ServerException - Server error.
        java.lang.InterruptedException - If block(long) does not return.
      • importImages

        public boolean importImages​(Client client,
                                    java.lang.String... paths)
                             throws ServiceException,
                                    ServerException,
                                    AccessException,
                                    java.io.IOException,
                                    java.util.concurrent.ExecutionException
        Imports all images candidates in the paths to the dataset in OMERO.
        Specified by:
        importImages in interface Dataset
        Parameters:
        client - The client handling the connection.
        paths - Paths to the image files on the computer.
        Returns:
        If the import did not exit because of an error.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        ServerException - Server error.
        java.io.IOException - Cannot read file.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • importImage

        public java.util.List<java.lang.Long> importImage​(Client client,
                                                          java.lang.String path)
                                                   throws ServiceException,
                                                          AccessException,
                                                          ServerException,
                                                          java.util.concurrent.ExecutionException
        Imports one image file to the dataset in OMERO.
        Specified by:
        importImage in interface Dataset
        Parameters:
        client - The client handling the connection.
        path - Path to the image file on the computer.
        Returns:
        The list of IDs of the newly imported images.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        ServerException - Server error.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • reload

        public void reload​(Browser browser)
                    throws ServiceException,
                           AccessException,
                           java.util.concurrent.ExecutionException
        Reloads the dataset from OMERO.
        Specified by:
        reload in interface Dataset
        Parameters:
        browser - The data browser.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.