public class DatasetWrapper extends ImportWrapper<DatasetData> implements Dataset
Wraps function calls to the DatasetData contained.
Modifier and Type | Field and Description |
---|---|
static String |
ANNOTATION_LINK
Annotation link name for this type of object
|
data
Constructor and Description |
---|
DatasetWrapper(DatasetData dataset)
Constructor of the DatasetWrapper class
|
DatasetWrapper(String name,
String description)
Constructor of the DatasetWrapper class
|
Modifier and Type | Method and Description |
---|---|
protected String |
annotationLinkType()
Returns the type of annotation link for this object.
|
String |
getDescription()
Gets the DatasetData description
|
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.
|
String |
getName()
Gets the DatasetData name
|
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.
|
void |
setDescription(String description)
Sets the description of the dataset.
|
void |
setName(String name)
Sets the name of the dataset.
|
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addImage, addImages, asDataObject, getChildren, getImages, getImagesLike, getImagesTagged, getImagesTagged, getImagesWithKey, getImagesWithKeyValuePair, getParents, getProjects, importAndReplaceImages, importAndReplaceImages, replaceImages
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
public static final String ANNOTATION_LINK
public DatasetWrapper(String name, String description)
name
- Name of the dataset.description
- Description of the dataset.public DatasetWrapper(DatasetData dataset)
dataset
- Dataset to be contained.public String getName()
getName
in interface RepositoryObject
public void setName(String name)
setName
in interface Dataset
name
- The name of the dataset. Mustn't be null
.IllegalArgumentException
- If the name is null
.public String getDescription()
getDescription
in interface RepositoryObject
public void setDescription(String description)
setDescription
in interface Dataset
description
- The description of the dataset.protected String annotationLinkType()
annotationLinkType
in class AnnotatableWrapper<DatasetData>
public List<Image> getImages()
public List<Image> getImages(Browser browser) throws ServiceException, AccessException, ExecutionException
getImages
in interface Dataset
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.public void removeImage(Client client, Image image) throws ServiceException, AccessException, ExecutionException, InterruptedException
removeImage
in interface Dataset
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.public boolean importImages(ConnectionHandler client, String... paths) throws ServiceException, AccessException, IOException
importImages
in interface Dataset
importImages
in class ImportWrapper<DatasetData>
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.public List<Long> importImage(ConnectionHandler client, String path) throws ServiceException, AccessException, IOException
importImage
in interface Dataset
importImage
in class ImportWrapper<DatasetData>
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.public void reload(Browser browser) throws ServiceException, AccessException, ExecutionException
reload
in interface Dataset
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.