public class FolderWrapper extends AnnotatableWrapper<FolderData> implements Folder
Wraps function calls to the FolderData contained.
Modifier and Type | Field and Description |
---|---|
static String |
ANNOTATION_LINK
Annotation link name for this type of object
|
data
Constructor and Description |
---|
FolderWrapper(DataManager dm,
String name)
Constructor of the FolderWrapper class.
|
FolderWrapper(Folder folder)
Constructor of the FolderWrapper class.
|
FolderWrapper(FolderData folder)
Constructor of the FolderWrapper class.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Folder folder)
Adds a child folder to this folder.
|
void |
addChildren(Collection<? extends Folder> folders)
Adds children folders to this folder.
|
protected String |
annotationLinkType()
Returns the type of annotation link for this object.
|
List<Folder> |
getChildren()
Retrieves the children folders for this folder.
|
String |
getDescription()
Gets the folder description
|
List<Image> |
getImages()
Retrieves the images contained in this folder.
|
String |
getName()
Gets the name of the folder
|
Folder |
getParent()
Retrieves the parent folders for this folder.
|
List<ROI> |
getROIs(DataManager dm,
long imageId)
Gets the ROIs contained in the folder associated with the provided image ID.
|
void |
reload(Browser browser)
Reloads the folder from OMERO, to update all links.
|
void |
setDescription(String description)
Sets the description of the folder.
|
void |
setName(String name)
Sets the name of the folder.
|
void |
setParent(Folder folder)
Sets the parent folder for this folder.
|
void |
unlinkAllROIs(DataManager dm)
Unlink all ROIs associated to this folder.
|
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
addImages, addROIs, addROIs, asDataObject, getChildren, getImages, getParents, getROIs, link, unlinkAllROIs, unlinkAllROIs, unlinkROIs, unlinkROIs
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
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, distinct, flatten, getCreated, getElementsOf, getGroupId, getId, getOwner, getUpdated, saveAndUpdate
public static final String ANNOTATION_LINK
public FolderWrapper(FolderData folder)
folder
- The FolderData to wrap.public FolderWrapper(Folder folder)
folder
- Folder to contain.public FolderWrapper(DataManager dm, String name) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.name
- Name of the folder.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.protected String annotationLinkType()
annotationLinkType
in class AnnotatableWrapper<FolderData>
public String getName()
getName
in interface RepositoryObject
public void setName(String name)
setName
in interface Folder
name
- The name of the folder. 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 Folder
description
- The folder description.public Folder getParent()
public void setParent(Folder folder)
public void addChild(Folder folder)
public void addChildren(Collection<? extends Folder> folders)
addChildren
in interface Folder
folders
- The new children folders.public List<Folder> getChildren()
getChildren
in interface Folder
public List<ROI> getROIs(DataManager dm, long imageId) throws ServiceException, AccessException, ExecutionException
getROIs
in interface Folder
dm
- The data manager.imageId
- The image.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.public void unlinkAllROIs(DataManager dm) throws ServiceException, AccessException, ExecutionException
The folder must be loaded beforehand.
ROIs are now linked to their images directly.
unlinkAllROIs
in interface Folder
dm
- The data manager.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.public void reload(Browser browser) throws AccessException, ServiceException, ExecutionException
reload
in interface Folder
reload
in interface RepositoryObject
browser
- The data browser.AccessException
- Cannot access data.ServiceException
- Cannot connect to OMERO.ExecutionException
- A Facility can't be retrieved or instantiated.Copyright © 2020–2023 GReD. All rights reserved.