Package fr.igred.omero.containers
Class FolderWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.RepositoryObjectWrapper<FolderData>
-
- fr.igred.omero.containers.FolderWrapper
-
- All Implemented Interfaces:
Annotatable
,Folder
,ImageLinked
,RemoteObject
,RepositoryObject
public class FolderWrapper extends RepositoryObjectWrapper<FolderData> implements Folder
Class containing a FolderData object.Wraps function calls to the FolderData contained.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANNOTATION_LINK
Annotation link name for this type of object-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description FolderWrapper(DataManager dm, java.lang.String name)
Constructor of the FolderWrapper class.FolderWrapper(FolderData folder)
Constructor of the FolderWrapper class.FolderWrapper(Folder folder)
Constructor of the FolderWrapper class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(Folder folder)
Adds a child folder to this folder.void
addChildren(java.util.Collection<? extends Folder> folders)
Adds children folders to this folder.protected java.lang.String
annotationLinkType()
Returns the type of annotation link for this object.java.util.List<Folder>
getChildren()
Retrieves the children folders for this folder.java.lang.String
getDescription()
Gets the folder descriptionjava.util.List<Image>
getImages()
Retrieves the images contained in this folder.java.lang.String
getName()
Gets the name of the folderFolder
getParent()
Retrieves the parent folders for this folder.java.util.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(java.lang.String description)
Sets the description of the folder.void
setName(java.lang.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.-
Methods inherited from class fr.igred.omero.RepositoryObjectWrapper
importImage, importImages
-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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.containers.Folder
addImages, addROIs, addROIs, asDataObject, getImages, getROIs, link, unlinkAllROIs, unlinkAllROIs, unlinkROIs
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
-
-
-
Field Detail
-
ANNOTATION_LINK
public static final java.lang.String ANNOTATION_LINK
Annotation link name for this type of object- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FolderWrapper
public FolderWrapper(FolderData folder)
Constructor of the FolderWrapper class.- Parameters:
folder
- The FolderData to wrap.
-
FolderWrapper
public FolderWrapper(Folder folder)
Constructor of the FolderWrapper class.- Parameters:
folder
- Folder to contain.
-
FolderWrapper
public FolderWrapper(DataManager dm, java.lang.String name) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Constructor of the FolderWrapper class. Save the folder in OMERO- Parameters:
dm
- The data manager.name
- Name of the folder.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-
Method Detail
-
annotationLinkType
protected java.lang.String annotationLinkType()
Returns the type of annotation link for this object.- Specified by:
annotationLinkType
in classAnnotatableWrapper<FolderData>
- Returns:
- See above.
-
getName
public java.lang.String getName()
Gets the name of the folder- Specified by:
getName
in interfaceRepositoryObject
- Returns:
- name.
-
setName
public void setName(java.lang.String name)
Sets the name of the folder.
-
getDescription
public java.lang.String getDescription()
Gets the folder description- Specified by:
getDescription
in interfaceRepositoryObject
- Returns:
- The folder description.
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the folder.- Specified by:
setDescription
in interfaceFolder
- Parameters:
description
- The folder description.
-
getParent
public Folder getParent()
Retrieves the parent folders for this folder.
-
setParent
public void setParent(Folder folder)
Sets the parent folder for this folder.
-
addChild
public void addChild(Folder folder)
Adds a child folder to this folder.
-
addChildren
public void addChildren(java.util.Collection<? extends Folder> folders)
Adds children folders to this folder.- Specified by:
addChildren
in interfaceFolder
- Parameters:
folders
- The new children folders.
-
getChildren
public java.util.List<Folder> getChildren()
Retrieves the children folders for this folder.- Specified by:
getChildren
in interfaceFolder
- Returns:
- See above
-
getImages
public java.util.List<Image> getImages()
Retrieves the images contained in this folder.
-
getROIs
public java.util.List<ROI> getROIs(DataManager dm, long imageId) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets the ROIs contained in the folder associated with the provided image ID.- Specified by:
getROIs
in interfaceFolder
- Parameters:
dm
- The data manager.imageId
- The image.- 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.
-
unlinkAllROIs
public void unlinkAllROIs(DataManager dm) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink all ROIs associated to this folder.The folder must be loaded beforehand.
ROIs are now linked to their images directly.
- Specified by:
unlinkAllROIs
in interfaceFolder
- Parameters:
dm
- The data manager.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
reload
public void reload(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException
Reloads the folder from OMERO, to update all links.- Specified by:
reload
in interfaceFolder
- Parameters:
browser
- The data browser.- Throws:
AccessException
- Cannot access data.ServiceException
- Cannot connect to OMERO.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-