Package fr.igred.omero.containers
Interface Dataset
-
- All Superinterfaces:
Annotatable
,ContainerLinked
,ImageLinked
,RemoteObject
,RepositoryObject
- All Known Implementing Classes:
DatasetWrapper
public interface Dataset extends RepositoryObject, ContainerLinked
Interface to handle Datasets on OMERO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addImage(Client client, Image image)
Adds a single image to the dataset in OMEROdefault void
addImages(Client client, java.lang.Iterable<? extends Image> images)
Adds a list of image to the dataset in OMERO.DatasetData
asDataObject()
Returns aDatasetData
corresponding to the handled object.default java.util.List<Dataset>
getDatasets(Browser browser)
Reloads and returns this dataset (updated from OMERO) as a singleton list.java.util.List<Image>
getImages()
Gets all the images in the dataset (if it was properly loaded from OMERO).java.util.List<Image>
getImages(Browser browser)
Gets all images in the dataset available from OMERO.default java.util.List<Image>
getImages(Browser browser, java.lang.String name)
Gets all images in the dataset with a certain name from OMERO.default java.util.List<Image>
getImagesLike(Browser browser, java.lang.String motif)
Gets all images in the dataset with a certain motif in their name from OMERO.default java.util.List<Image>
getImagesTagged(Browser browser, TagAnnotation tag)
Gets all images in the dataset tagged with a specified tag from OMERO.default java.util.List<Image>
getImagesTagged(Browser browser, java.lang.Long tagId)
Gets all images in the dataset tagged with a specified tag from OMERO.default java.util.List<Image>
getImagesWithKey(Browser browser, java.lang.String key)
Gets all images in the dataset with a certain keydefault java.util.List<Image>
getImagesWithKeyValuePair(Browser browser, java.lang.String key, java.lang.String value)
Gets all images in the dataset with a certain key value pair from OMEROdefault java.util.List<Project>
getProjects(Browser browser)
Retrieves the projects containing this dataset.default java.util.List<java.lang.Long>
importAndReplaceImages(Client client, java.lang.String path)
Imports one image file to the dataset in OMERO and replace older images sharing the same name after copying their annotations and ROIs, and concatenating the descriptions (on new lines) by unlinking them.default java.util.List<java.lang.Long>
importAndReplaceImages(Client client, java.lang.String path, ReplacePolicy policy)
Imports one image file to the dataset in OMERO and replace older images sharing the same name after copying their annotations and ROIs, and concatenating the descriptions (on new lines) by unlinking or even deleting them.java.util.List<java.lang.Long>
importImage(Client client, java.lang.String path)
Imports one image file to the dataset in OMERO.boolean
importImages(Client client, java.lang.String... paths)
Imports all images candidates in the paths to the dataset in OMERO.void
reload(Browser browser)
Reloads the dataset from OMERO.void
removeImage(Client client, Image image)
Removes an image from the dataset in OMERO.default java.util.List<Image>
replaceImages(Client client, java.util.Collection<? extends Image> oldImages, Image newImage)
Replaces (and unlinks) a collection of images from this dataset by a new image, after copying their annotations and ROIs, and concatenating the descriptions (on new lines).void
setDescription(java.lang.String description)
Sets the description of the dataset.void
setName(java.lang.String name)
Sets the name of the dataset.-
Methods inherited from interface fr.igred.omero.Annotatable
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, linkIfNotLinked, rate, unlink
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
Methods inherited from interface fr.igred.omero.RepositoryObject
getDescription, getName
-
-
-
-
Method Detail
-
asDataObject
DatasetData asDataObject()
Returns aDatasetData
corresponding to the handled object.- Specified by:
asDataObject
in interfaceRemoteObject
- Returns:
- See above.
-
setName
void setName(java.lang.String name)
Sets the name of the dataset.- Parameters:
name
- The name of the dataset. Mustn't benull
.- Throws:
java.lang.IllegalArgumentException
- If the name isnull
.
-
setDescription
void setDescription(java.lang.String description)
Sets the description of the dataset.- Parameters:
description
- The description of the dataset.
-
getProjects
default java.util.List<Project> getProjects(Browser browser) throws ServerException, ServiceException, AccessException, java.util.concurrent.ExecutionException
Retrieves the projects containing this dataset.- Specified by:
getProjects
in interfaceContainerLinked
- Parameters:
browser
- The data browser.- Returns:
- See above.
- Throws:
ServerException
- Server error.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getDatasets
default java.util.List<Dataset> getDatasets(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException
Reloads and returns this dataset (updated from OMERO) as a singleton list.- Specified by:
getDatasets
in interfaceContainerLinked
- Parameters:
browser
- The data browser.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImages
java.util.List<Image> getImages()
Gets all the images in the dataset (if it was properly loaded from OMERO).- Returns:
- See above.
-
getImages
java.util.List<Image> getImages(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the dataset available from OMERO.- Specified by:
getImages
in interfaceImageLinked
- Parameters:
browser
- The data browser.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImages
default java.util.List<Image> getImages(Browser browser, java.lang.String name) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the dataset with a certain name from OMERO.- Parameters:
browser
- The data browser.name
- Name searched.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesLike
default java.util.List<Image> getImagesLike(Browser browser, java.lang.String motif) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the dataset with a certain motif in their name from OMERO.- Parameters:
browser
- The data browser.motif
- Motif searched in an image name.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesTagged
default java.util.List<Image> getImagesTagged(Browser browser, TagAnnotation tag) throws ServiceException, AccessException, ServerException, java.util.concurrent.ExecutionException
Gets all images in the dataset tagged with a specified tag from OMERO.- Parameters:
browser
- The data browser.tag
- TagAnnotation containing the tag researched.- Returns:
- See above.
- 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.
-
getImagesTagged
default java.util.List<Image> getImagesTagged(Browser browser, java.lang.Long tagId) throws ServiceException, AccessException, ServerException, java.util.concurrent.ExecutionException
Gets all images in the dataset tagged with a specified tag from OMERO.- Parameters:
browser
- The data browser.tagId
- ID of the tag researched.- Returns:
- See above.
- 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.
-
getImagesWithKey
default java.util.List<Image> getImagesWithKey(Browser browser, java.lang.String key) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the dataset with a certain key- Parameters:
browser
- The data browser.key
- Name of the key researched.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImagesWithKeyValuePair
default java.util.List<Image> getImagesWithKeyValuePair(Browser browser, java.lang.String key, java.lang.String value) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the dataset with a certain key value pair from OMERO- Parameters:
browser
- The data browser.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.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
addImages
default void addImages(Client client, java.lang.Iterable<? extends Image> images) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Adds a list of image to the dataset in OMERO.- Parameters:
client
- The client handling the connection.images
- Image to add to the dataset.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
addImage
default void addImage(Client client, Image image) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Adds a single image to the dataset in OMERO- Parameters:
client
- The client handling the connection.image
- Image to add.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
removeImage
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.- 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
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.- 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
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.- 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.
-
replaceImages
default java.util.List<Image> replaceImages(Client client, java.util.Collection<? extends Image> oldImages, Image newImage) throws AccessException, ServiceException, java.util.concurrent.ExecutionException, ServerException, java.lang.InterruptedException
Replaces (and unlinks) a collection of images from this dataset by a new image, after copying their annotations and ROIs, and concatenating the descriptions (on new lines).- Parameters:
client
- The client handling the connection.oldImages
- The list of old images to replace.newImage
- The new image.- Returns:
- The list of images that became orphaned once replaced.
- 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.java.lang.InterruptedException
- If block(long) does not return.
-
importAndReplaceImages
default java.util.List<java.lang.Long> importAndReplaceImages(Client client, java.lang.String path, ReplacePolicy policy) throws ServiceException, AccessException, ServerException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Imports one image file to the dataset in OMERO and replace older images sharing the same name after copying their annotations and ROIs, and concatenating the descriptions (on new lines) by unlinking or even deleting them.- Parameters:
client
- The client handling the connection.path
- Path to the image on the computer.policy
- Whether older images should be unlinked, deleted or deleted only if they become orphaned.- 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.java.lang.InterruptedException
- If block(long) does not return.
-
importAndReplaceImages
default java.util.List<java.lang.Long> importAndReplaceImages(Client client, java.lang.String path) throws ServiceException, AccessException, ServerException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Imports one image file to the dataset in OMERO and replace older images sharing the same name after copying their annotations and ROIs, and concatenating the descriptions (on new lines) by unlinking them.- Parameters:
client
- The client handling the connection.path
- Path to the image 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.java.lang.InterruptedException
- If block(long) does not return.
-
reload
void reload(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Reloads the dataset from OMERO.- 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.
-
-