Package fr.igred.omero.repository
Class FolderWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.repository.GenericRepositoryObjectWrapper<FolderData>
-
- fr.igred.omero.repository.FolderWrapper
-
public class FolderWrapper extends GenericRepositoryObjectWrapper<FolderData>
Class containing a FolderData object.Wraps function calls to the FolderData contained.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
GenericRepositoryObjectWrapper.ReplacePolicy
-
-
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.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description FolderWrapper(Client client, 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
addROI(Client client, ROIWrapper roi)
Add an ROI to the folder and associate it to the image id set(an image need to be associated)protected void
addTag(Client client, TagAnnotationData tagData)
Private function.protected java.lang.String
annotationLinkType()
Returns the type of annotation link for this objectFolderData
asFolderData()
Gets the folder contained in the FolderWrapperjava.lang.String
getDescription()
Gets the folder descriptionjava.lang.String
getName()
Gets the name of the folderjava.util.List<ROIWrapper>
getROIs(Client client)
Gets the ROI contained in the folder associated with the image id set (an image need to be associated)void
setDescription(java.lang.String description)
Sets the description of the folder.void
setImage(long id)
Sets the image associated to the foldervoid
setImage(ImageWrapper image)
Sets the image associated to the foldervoid
setName(java.lang.String name)
Sets the name of the folder.void
unlinkAllROI(Client client)
Unlink all ROI, associated to the image set, in the folder.void
unlinkROI(Client client, ROIWrapper roi)
Unlink an ROI, associated to the image set, in the folder.-
Methods inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addFileAnnotation, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTags, addTags, copyAnnotationLinks, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getTable, getTables, getTags, getValue, importImage, importImages, removeLink, unlink
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
-
-
-
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
- FolderData to contain.
-
FolderWrapper
public FolderWrapper(Folder folder)
Constructor of the FolderWrapper class.- Parameters:
folder
- Folder to contain.
-
FolderWrapper
public FolderWrapper(Client client, java.lang.String name) throws ServiceException, OMEROServerError
Constructor of the FolderWrapper class. Save the folder in OMERO- Parameters:
client
- The client handling the connection.name
- Name of the folder.- Throws:
ServiceException
- Cannot connect to OMERO.OMEROServerError
- Server error.
-
-
Method Detail
-
annotationLinkType
protected java.lang.String annotationLinkType()
Returns the type of annotation link for this object- Specified by:
annotationLinkType
in classGenericRepositoryObjectWrapper<FolderData>
- Returns:
- See above.
-
addTag
protected void addTag(Client client, TagAnnotationData tagData) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Private function. Adds a tag to the object in OMERO, if possible.- Overrides:
addTag
in classGenericRepositoryObjectWrapper<FolderData>
- Parameters:
client
- The client handling the connection.tagData
- Tag to be added.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getName
public java.lang.String getName()
Gets the name of the folder- Specified by:
getName
in classGenericRepositoryObjectWrapper<FolderData>
- Returns:
- name.
-
setName
public void setName(java.lang.String name)
Sets the name of the folder.- Parameters:
name
- The name of the folder. Mustn't benull
.- Throws:
java.lang.IllegalArgumentException
- If the name isnull
.
-
asFolderData
public FolderData asFolderData()
Gets the folder contained in the FolderWrapper- Returns:
- the FolderData.
-
getDescription
public java.lang.String getDescription()
Gets the folder description- Specified by:
getDescription
in classGenericRepositoryObjectWrapper<FolderData>
- Returns:
- The folder description.
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the folder.- Parameters:
description
- The folder description.
-
setImage
public void setImage(long id)
Sets the image associated to the folder- Parameters:
id
- ID of the image to associate.
-
setImage
public void setImage(ImageWrapper image)
Sets the image associated to the folder- Parameters:
image
- Image to associate.
-
addROI
public void addROI(Client client, ROIWrapper roi) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Add an ROI to the folder and associate it to the image id set(an image need to be associated)- Parameters:
client
- The client handling the connection.roi
- ROI to add.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- If the ROIFacility can't be retrieved or instantiated.
-
getROIs
public java.util.List<ROIWrapper> getROIs(Client client) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets the ROI contained in the folder associated with the image id set (an image need to be associated)- Parameters:
client
- The client handling the connection.- Returns:
- List of ROIWrapper containing the ROI.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkAllROI
public void unlinkAllROI(Client client) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink all ROI, associated to the image set, in the folder. ROIs are now linked to the image directly- Parameters:
client
- The client handling the connection.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
unlinkROI
public void unlinkROI(Client client, ROIWrapper roi) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Unlink an ROI, associated to the image set, in the folder. the ROI is now linked to the image directly- Parameters:
client
- The client handling the connection.roi
- ROI to unlink.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-