Class ProjectWrapper

    • 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

      • ProjectWrapper

        public ProjectWrapper​(ProjectData project)
        Constructor of the ProjectWrapper class.
        Parameters:
        project - ProjectData to be contained.
      • ProjectWrapper

        public ProjectWrapper​(Client client,
                              java.lang.String name,
                              java.lang.String description)
                       throws ServiceException,
                              AccessException,
                              java.util.concurrent.ExecutionException
        Constructor of the ProjectWrapper class. Creates a new project and save it to OMERO.
        Parameters:
        client - The client handling the connection.
        name - Project name.
        description - Project description.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets the name of the project.
        Parameters:
        name - The name of the project. Mustn't be null.
        Throws:
        java.lang.IllegalArgumentException - If the name is null.
      • asProjectData

        public ProjectData asProjectData()
        Returns the ProjectData contained.
        Returns:
        See above.
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of the project.
        Parameters:
        description - The description of the project.
      • getDatasets

        public java.util.List<DatasetWrapper> getDatasets()
        Gets all the datasets in the project available from OMERO.
        Returns:
        Collection of DatasetWrapper.
      • getDatasets

        public java.util.List<DatasetWrapper> getDatasets​(java.lang.String name)
        Gets the dataset with the specified name from OMERO
        Parameters:
        name - Name of the dataset searched.
        Returns:
        List of dataset with the given name.
      • addDataset

        public DatasetWrapper addDataset​(Client client,
                                         java.lang.String name,
                                         java.lang.String description)
                                  throws ServiceException,
                                         AccessException,
                                         java.util.concurrent.ExecutionException
        Adds a dataset to the project in OMERO. Create the dataset.
        Parameters:
        client - The client handling the connection.
        name - Dataset name.
        description - Dataset description.
        Returns:
        The object saved in OMERO.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • addDataset

        public DatasetWrapper addDataset​(Client client,
                                         DatasetWrapper dataset)
                                  throws ServiceException,
                                         AccessException,
                                         java.util.concurrent.ExecutionException
        Adds a dataset to the project in OMERO.
        Parameters:
        client - The client handling the connection.
        dataset - Dataset to be added.
        Returns:
        The object saved in OMERO.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • removeDataset

        public void removeDataset​(Client client,
                                  DatasetWrapper dataset)
                           throws ServiceException,
                                  AccessException,
                                  java.util.concurrent.ExecutionException,
                                  OMEROServerError,
                                  java.lang.InterruptedException
        Removes a dataset from the project in OMERO.
        Parameters:
        client - The client handling the connection.
        dataset - Dataset to remove.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
        OMEROServerError - Server error.
        java.lang.InterruptedException - If block(long) does not return.
      • getImages

        public java.util.List<ImageWrapper> getImages​(Client client)
                                               throws ServiceException,
                                                      AccessException,
                                                      java.util.concurrent.ExecutionException
        Gets all images in the project available from OMERO.
        Parameters:
        client - The client handling the connection.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImages

        public java.util.List<ImageWrapper> getImages​(Client client,
                                                      java.lang.String name)
                                               throws ServiceException,
                                                      AccessException,
                                                      java.util.concurrent.ExecutionException
        Gets all images in the project with a certain name from OMERO.
        Parameters:
        client - The client handling the connection.
        name - Name searched.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImages

        public java.util.List<ImageWrapper> getImages​(Client client,
                                                      java.lang.String datasetName,
                                                      java.lang.String imageName)
                                               throws ServiceException,
                                                      AccessException,
                                                      java.util.concurrent.ExecutionException
        Gets all images with a certain name from datasets with the specified name inside this project on OMERO.
        Parameters:
        client - The client handling the connection.
        datasetName - Expected dataset name.
        imageName - Expected image name.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImagesLike

        public java.util.List<ImageWrapper> getImagesLike​(Client client,
                                                          java.lang.String motif)
                                                   throws ServiceException,
                                                          AccessException,
                                                          java.util.concurrent.ExecutionException
        Gets all images in the project with a certain motif in their name from OMERO.
        Parameters:
        client - The client handling the connection.
        motif - Motif searched in an image name.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImagesTagged

        public java.util.List<ImageWrapper> getImagesTagged​(Client client,
                                                            java.lang.Long tagId)
                                                     throws ServiceException,
                                                            AccessException,
                                                            OMEROServerError,
                                                            java.util.concurrent.ExecutionException
        Gets all images in the project tagged with a specified tag from OMERO.
        Parameters:
        client - The client handling the connection.
        tagId - Id of the tag researched.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        OMEROServerError - Server error.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImagesKey

        public java.util.List<ImageWrapper> getImagesKey​(Client client,
                                                         java.lang.String key)
                                                  throws ServiceException,
                                                         AccessException,
                                                         java.util.concurrent.ExecutionException
        Gets all images in the project with a certain key
        Parameters:
        client - The client handling the connection.
        key - Name of the key researched.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getImagesPairKeyValue

        public java.util.List<ImageWrapper> getImagesPairKeyValue​(Client client,
                                                                  java.lang.String key,
                                                                  java.lang.String value)
                                                           throws ServiceException,
                                                                  AccessException,
                                                                  java.util.concurrent.ExecutionException
        Gets all images in the project with a certain key value pair from OMERO.
        Parameters:
        client - The client handling the connection.
        key - Name of the key researched.
        value - Value associated with the key.
        Returns:
        ImageWrapper list.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • refresh

        public void refresh​(Client client)
                     throws ServiceException,
                            AccessException,
                            java.util.concurrent.ExecutionException
        Refreshes the wrapped project.
        Parameters:
        client - The client handling the connection.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.