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​(DataManager dm,
                              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:
        dm - The data manager.
        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

      • getName

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

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

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

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

        public java.util.List<Dataset> getDatasets()
        Gets all the datasets in the project available from OMERO.
        Specified by:
        getDatasets in interface Project
        Returns:
        Collection of Dataset.
      • addDataset

        public Dataset 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.
        Specified by:
        addDataset in interface Project
        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.
      • removeDataset

        public void removeDataset​(Client client,
                                  Dataset dataset)
                           throws ServiceException,
                                  AccessException,
                                  java.util.concurrent.ExecutionException,
                                  ServerException,
                                  java.lang.InterruptedException
        Removes a dataset from the project in OMERO.
        Specified by:
        removeDataset in interface Project
        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.
        ServerException - Server error.
        java.lang.InterruptedException - If block(long) does not return.
      • reload

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