public interface Dataset extends RepositoryObject, Annotatable
Modifier and Type | Method and Description |
---|---|
default void |
addImage(DataManager dm,
Image image)
Adds a single image to the dataset in OMERO
|
default void |
addImages(DataManager dm,
Iterable<? extends Image> images)
Adds multiple images to the dataset in OMERO.
|
DatasetData |
asDataObject()
Returns a
DatasetData corresponding to the handled object. |
default List<RepositoryObject> |
getChildren(Browser browser)
Gets the object children.
|
List<Image> |
getImages()
Gets all the images in the dataset (if it was properly loaded from OMERO).
|
List<Image> |
getImages(Browser browser)
Gets all images in the dataset available from OMERO.
|
default List<Image> |
getImages(Browser browser,
String name)
Gets all images in the dataset with a certain name from OMERO.
|
default List<Image> |
getImagesLike(Browser browser,
String motif)
Gets all images in the dataset with a certain motif in their name from OMERO.
|
default List<Image> |
getImagesTagged(Browser browser,
Long tagId)
Gets all images in the dataset tagged with a specified tag from OMERO.
|
default List<Image> |
getImagesTagged(Browser browser,
TagAnnotation tag)
Gets all images in the dataset tagged with a specified tag from OMERO.
|
default List<Image> |
getImagesWithKey(Browser browser,
String key)
Gets all images in the dataset with a certain key
|
default List<Image> |
getImagesWithKeyValuePair(Browser browser,
String key,
String value)
Gets all images in the dataset with a certain key value pair from OMERO
|
default List<RepositoryObject> |
getParents(Browser browser)
Gets the object parents.
|
default List<Project> |
getProjects(Browser browser)
Retrieves the projects containing this dataset.
|
default List<Long> |
importAndReplaceImages(Client client,
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 List<Long> |
importAndReplaceImages(Client client,
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.
|
List<Long> |
importImage(ConnectionHandler client,
String path)
Imports one image file to the dataset in OMERO.
|
boolean |
importImages(ConnectionHandler client,
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 List<Image> |
replaceImages(Client client,
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(String description)
Sets the description of the dataset.
|
void |
setName(String name)
Sets the name of the dataset.
|
getDescription, getName
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, link, linkIfNotLinked, rate, unlink
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, distinct, flatten, getCreated, getElementsOf, getGroupId, getId, getOwner, getUpdated, saveAndUpdate
DatasetData asDataObject()
DatasetData
corresponding to the handled object.asDataObject
in interface RemoteObject
void setName(String name)
name
- The name of the dataset. Mustn't be null
.IllegalArgumentException
- If the name is null
.void setDescription(String description)
description
- The description of the dataset.default List<RepositoryObject> getParents(Browser browser) throws AccessException, ServiceException, ExecutionException
getParents
in interface RepositoryObject
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<RepositoryObject> getChildren(Browser browser) throws AccessException, ServiceException, ExecutionException
getChildren
in interface RepositoryObject
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Project> getProjects(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.List<Image> getImages()
List<Image> getImages(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImages(Browser browser, String name) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.name
- Name searched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImagesLike(Browser browser, String motif) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.motif
- Motif searched in an image name.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImagesTagged(Browser browser, TagAnnotation tag) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.tag
- TagAnnotation containing the tag researched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImagesTagged(Browser browser, Long tagId) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.tagId
- ID of the tag researched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImagesWithKey(Browser browser, String key) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.key
- Name of the key researched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Image> getImagesWithKeyValuePair(Browser browser, String key, String value) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.key
- Name of the key researched.value
- Value associated with the key.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void addImages(DataManager dm, Iterable<? extends Image> images) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.images
- Image to add to the dataset.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void addImage(DataManager dm, Image image) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.image
- Image to add.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.void removeImage(Client client, Image image) throws ServiceException, AccessException, ExecutionException, InterruptedException
client
- The client handling the connection.image
- Image to remove.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- If block(long) does not return.boolean importImages(ConnectionHandler client, String... paths) throws ServiceException, AccessException, IOException
client
- The client handling the connection.paths
- Paths to the image files on the computer.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.IOException
- Cannot read file.List<Long> importImage(ConnectionHandler client, String path) throws ServiceException, AccessException, IOException
client
- The client handling the connection.path
- Path to the image file on the computer.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.IOException
- Cannot read file.default List<Image> replaceImages(Client client, Collection<? extends Image> oldImages, Image newImage) throws AccessException, ServiceException, ExecutionException, InterruptedException
client
- The client handling the connection.oldImages
- The list of old images to replace.newImage
- The new image.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- If block(long) does not return.default List<Long> importAndReplaceImages(Client client, String path, ReplacePolicy policy) throws ServiceException, AccessException, IOException, ExecutionException, InterruptedException
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.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.IOException
- Cannot read file.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- If block(long) does not return.default List<Long> importAndReplaceImages(Client client, String path) throws ServiceException, AccessException, IOException, ExecutionException, InterruptedException
client
- The client handling the connection.path
- Path to the image on the computer.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.IOException
- Cannot read file.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- If block(long) does not return.void reload(Browser browser) throws ServiceException, AccessException, ExecutionException
reload
in interface RepositoryObject
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.Copyright © 2020–2023 GReD. All rights reserved.