Package fr.igred.omero.repository
Class ProjectWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.repository.GenericRepositoryObjectWrapper<ProjectData>
-
- fr.igred.omero.repository.ProjectWrapper
-
public class ProjectWrapper extends GenericRepositoryObjectWrapper<ProjectData>
Class containing a ProjectDataImplements function using the Project contained
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.igred.omero.GenericObjectWrapper
GenericObjectWrapper.SortById<U extends GenericObjectWrapper<?>>
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description ProjectWrapper(Client client, String name, String description)
Constructor of the ProjectWrapper class.ProjectWrapper(ProjectData project)
Constructor of the ProjectWrapper class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetWrapper
addDataset(Client client, DatasetWrapper dataset)
Add a dataset to the project in OMERO.DatasetWrapper
addDataset(Client client, String name, String description)
Add a dataset to the project in OMERO.ProjectData
asProjectData()
List<DatasetWrapper>
getDatasets()
Gets all the datasets in the project available from OMERO.List<DatasetWrapper>
getDatasets(String name)
Gets the dataset with the specified name from OMEROString
getDescription()
Gets the project descriptionList<ImageWrapper>
getImages(Client client)
Gets all images in the project available from OMERO.List<ImageWrapper>
getImages(Client client, String name)
Gets all images in the project with a certain from OMERO.List<ImageWrapper>
getImagesKey(Client client, String key)
Gets all images in the project with a certain keyList<ImageWrapper>
getImagesLike(Client client, String motif)
Gets all images in the project with a certain motif in their name from OMERO.List<ImageWrapper>
getImagesPairKeyValue(Client client, String key, String value)
Gets all images in the project with a certain key value pair from OMERO.List<ImageWrapper>
getImagesTagged(Client client, TagAnnotationWrapper tag)
Gets all images in the project tagged with a specified tag from OMERO.List<ImageWrapper>
getImagesTagged(Client client, Long tagId)
Gets all images in the project tagged with a specified tag from OMERO.String
getName()
Gets the ProjectData namevoid
refresh(Client client)
Refreshes the wrapped project.void
setDescription(String description)
Sets the description of the project.void
setName(String name)
Sets the name of the project.-
Methods inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
addFile, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTag, addTags, addTags, getKeyValuePairs, getTable, getTables, getTags, getValue
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString
-
-
-
-
Constructor Detail
-
ProjectWrapper
public ProjectWrapper(ProjectData project)
Constructor of the ProjectWrapper class.- Parameters:
project
- ProjectData to be contained.
-
ProjectWrapper
public ProjectWrapper(Client client, String name, String description) throws ServiceException, AccessException, 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-
Method Detail
-
getName
public String getName()
Gets the ProjectData name- Returns:
- ProjectData name.
-
setName
public void setName(String name)
Sets the name of the project.- Parameters:
name
- The name of the project. Mustn't benull
.- Throws:
IllegalArgumentException
- If the name isnull
.
-
getDescription
public String getDescription()
Gets the project description- Returns:
- The project description.
-
setDescription
public void setDescription(String description)
Sets the description of the project.- Parameters:
description
- The description of the project.
-
asProjectData
public ProjectData asProjectData()
- Returns:
- the ProjectData contained.
-
getDatasets
public List<DatasetWrapper> getDatasets()
Gets all the datasets in the project available from OMERO.- Returns:
- Collection of DatasetWrapper.
-
getDatasets
public List<DatasetWrapper> getDatasets(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, String name, String description) throws ServiceException, AccessException, ExecutionException
Add 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
addDataset
public DatasetWrapper addDataset(Client client, DatasetWrapper dataset) throws ServiceException, AccessException, ExecutionException
Add 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImages
public List<ImageWrapper> getImages(Client client) throws ServiceException, AccessException
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.
-
getImages
public List<ImageWrapper> getImages(Client client, String name) throws ServiceException, AccessException
Gets all images in the project with a certain 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.
-
getImagesLike
public List<ImageWrapper> getImagesLike(Client client, String motif) throws ServiceException, AccessException
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.
-
getImagesTagged
public List<ImageWrapper> getImagesTagged(Client client, TagAnnotationWrapper tag) throws ServiceException, AccessException, OMEROServerError
Gets all images in the project tagged with a specified tag from OMERO.- Parameters:
client
- The client handling the connection.tag
- TagAnnotationWrapper containing the tag researched.- Returns:
- ImageWrapper list.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.
-
getImagesTagged
public List<ImageWrapper> getImagesTagged(Client client, Long tagId) throws ServiceException, AccessException, OMEROServerError
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.
-
getImagesKey
public List<ImageWrapper> getImagesKey(Client client, String key) throws ServiceException, AccessException, 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesPairKeyValue
public List<ImageWrapper> getImagesPairKeyValue(Client client, String key, String value) throws ServiceException, AccessException, 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
refresh
public void refresh(Client client) throws ServiceException, AccessException
Refreshes the wrapped project.- Parameters:
client
- The client handling the connection.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.
-
-