Package fr.igred.omero.repository
Class ProjectWrapper
java.lang.Object
fr.igred.omero.GenericObjectWrapper<T>
fr.igred.omero.AnnotatableWrapper<T>
fr.igred.omero.repository.GenericRepositoryObjectWrapper<ProjectData>
fr.igred.omero.repository.ProjectWrapper
Class containing a ProjectData object.
Wraps function calls to the Project contained
-
Nested Class Summary
Nested classes/interfaces inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
GenericRepositoryObjectWrapper.ReplacePolicy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Annotation link name for this type of objectFields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
Constructor Summary
ConstructorDescriptionProjectWrapper
(Client client, String name, String description) Constructor of the ProjectWrapper class.ProjectWrapper
(ProjectData project) Constructor of the ProjectWrapper class. -
Method Summary
Modifier and TypeMethodDescriptionaddDataset
(Client client, DatasetWrapper dataset) Adds a dataset to the project in OMERO.addDataset
(Client client, String name, String description) Creates a dataset and adds it to the project in OMERO.protected String
Returns the type of annotation link for this object.Deprecated.Returns the ProjectData contained.Gets all the datasets in the project available from OMERO.getDatasets
(String name) Gets the dataset with the specified name from OMEROGets the project descriptionGets all images in the project available from OMERO.Gets all images in the project with a certain name from OMERO.Gets all images with a certain name from datasets with the specified name inside this project on OMERO.getImagesKey
(Client client, String key) Deprecated.Gets all images in the project with a certain keygetImagesLike
(Client client, String motif) Gets all images in the project with a certain motif in their name from OMERO.getImagesPairKeyValue
(Client client, String key, String value) Deprecated.Gets all images in the project with a certain key value pair from OMERO.getImagesTagged
(Client client, TagAnnotationWrapper tag) Gets all images in the project tagged with a specified tag from OMERO.getImagesTagged
(Client client, Long tagId) Gets all images in the project tagged with a specified tag from OMERO.getImagesWithKey
(Client client, String key) Gets all images in the project with a certain keygetImagesWithKeyValuePair
(Client client, String key, String value) Gets all images in the project with a certain key value pair from OMERO.getName()
Gets the ProjectData namevoid
Reloads the project from OMERO.void
removeDataset
(Client client, DatasetWrapper dataset) Removes a dataset from the project in OMERO.void
setDescription
(String description) Sets the description of the project.void
Sets the name of the project.Methods inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
copyAnnotationLinks, importImage, importImages, refresh
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addFileAnnotation, addKeyValuePair, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTags, addTags, copyAnnotationLinks, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getRatings, getTable, getTables, getTags, getValue, isLinked, link, link, linkIfNotLinked, rate, removeLink, unlink
Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
-
Field Details
-
ANNOTATION_LINK
Annotation link name for this type of object- See Also:
-
-
Constructor Details
-
ProjectWrapper
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 Details
-
getName
Gets the ProjectData name- Specified by:
getName
in classGenericRepositoryObjectWrapper<ProjectData>
- Returns:
- ProjectData name.
-
setName
Sets the name of the project.- Parameters:
name
- The name of the project. Mustn't benull
.- Throws:
IllegalArgumentException
- If the name isnull
.
-
asProjectData
Deprecated.Returns the ProjectData contained. UseGenericObjectWrapper.asDataObject()
instead.- Returns:
- See above.
-
getDescription
Gets the project description- Specified by:
getDescription
in classGenericRepositoryObjectWrapper<ProjectData>
- Returns:
- The project description.
-
setDescription
Sets the description of the project.- Parameters:
description
- The description of the project.
-
annotationLinkType
Returns the type of annotation link for this object.- Specified by:
annotationLinkType
in classAnnotatableWrapper<ProjectData>
- Returns:
- See above.
-
getDatasets
Gets all the datasets in the project available from OMERO.- Returns:
- Collection of DatasetWrapper.
-
getDatasets
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 Creates a dataset and adds it to the project in OMERO.The project needs to be reloaded afterwards to list the new 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 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.ExecutionException
- A Facility can't be retrieved or instantiated.
-
removeDataset
public void removeDataset(Client client, DatasetWrapper dataset) throws ServiceException, AccessException, ExecutionException, OMEROServerError, 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.ExecutionException
- A Facility can't be retrieved or instantiated.OMEROServerError
- Server error.InterruptedException
- If block(long) does not return.
-
getImages
public List<ImageWrapper> getImages(Client client) throws ServiceException, AccessException, ExecutionException Gets all images in the project available from OMERO.- Parameters:
client
- The client handling the connection.- Returns:
- See above.
- 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, String name) throws ServiceException, AccessException, ExecutionException Gets all images in the project with a certain name from OMERO.- Parameters:
client
- The client handling the connection.name
- Name searched.- Returns:
- See above.
- 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, String datasetName, String imageName) throws ServiceException, AccessException, 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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesLike
public List<ImageWrapper> getImagesLike(Client client, String motif) throws ServiceException, AccessException, 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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesTagged
public List<ImageWrapper> getImagesTagged(Client client, TagAnnotationWrapper tag) throws ServiceException, AccessException, OMEROServerError, ExecutionException 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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesTagged
public List<ImageWrapper> getImagesTagged(Client client, Long tagId) throws ServiceException, AccessException, OMEROServerError, 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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesKey
@Deprecated public List<ImageWrapper> getImagesKey(Client client, String key) throws ServiceException, AccessException, ExecutionException Deprecated.Gets all images in the project with a certain key- Parameters:
client
- The client handling the connection.key
- Name of the key researched.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesWithKey
public List<ImageWrapper> getImagesWithKey(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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesPairKeyValue
@Deprecated public List<ImageWrapper> getImagesPairKeyValue(Client client, String key, String value) throws ServiceException, AccessException, ExecutionException Deprecated.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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesWithKeyValuePair
public List<ImageWrapper> getImagesWithKeyValuePair(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:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
reload
Reloads the project from OMERO.- Overrides:
reload
in classGenericRepositoryObjectWrapper<ProjectData>
- Parameters:
browser
- The client handling the connection.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-