Package fr.igred.omero.repository
Class GenericRepositoryObjectWrapper<T extends DataObject>
java.lang.Object
fr.igred.omero.GenericObjectWrapper<T>
fr.igred.omero.AnnotatableWrapper<T>
fr.igred.omero.repository.GenericRepositoryObjectWrapper<T>
- Type Parameters:
T
- Subclass ofDataObject
- Direct Known Subclasses:
DatasetWrapper
,FolderWrapper
,ImageWrapper
,PlateAcquisitionWrapper
,PlateWrapper
,ProjectWrapper
,ScreenWrapper
,WellWrapper
public abstract class GenericRepositoryObjectWrapper<T extends DataObject>
extends AnnotatableWrapper<T>
Generic class containing a DataObject (or a subclass) object.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Policy to specify how to handle objects when they are replaced. -
Field Summary
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor of the class GenericRepositoryObjectWrapper. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyAnnotationLinks
(Client client, GenericRepositoryObjectWrapper<?> object) Copies annotation links from some other object to this one.abstract String
Gets the object descriptionabstract String
getName()
Gets the object name.importImage
(GatewayWrapper client, DataObject target, String path) Imports one image file to the target in OMERO.protected static boolean
importImages
(GatewayWrapper client, DataObject target, int threads, String... paths) Imports all images candidates in the paths to the target in OMERO.void
Deprecated.Reloads the object from OMERO.void
Reloads the object from OMERO.Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addFileAnnotation, addKeyValuePair, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTags, addTags, annotationLinkType, copyAnnotationLinks, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getRatings, getTable, getTables, getTags, getValue, isLinked, link, link, linkIfNotLinked, rate, removeLink, unlink
Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
-
Constructor Details
-
GenericRepositoryObjectWrapper
Constructor of the class GenericRepositoryObjectWrapper.- Parameters:
o
- The DataObject to wrap in the GenericRepositoryObjectWrapper.
-
-
Method Details
-
importImages
protected static boolean importImages(GatewayWrapper client, DataObject target, int threads, String... paths) throws ServiceException, OMEROServerError, IOException Imports all images candidates in the paths to the target in OMERO.- Parameters:
client
- The client handling the connection.target
- The import target.threads
- The number of threads (same value used for filesets and uploads).paths
- Paths to the image files on the computer.- Returns:
- If the import did not exit because of an error.
- Throws:
ServiceException
- Cannot connect to OMERO.OMEROServerError
- Server error.IOException
- Cannot read file.
-
importImage
protected static List<Long> importImage(GatewayWrapper client, DataObject target, String path) throws ServiceException, OMEROServerError Imports one image file to the target in OMERO.- Parameters:
client
- The client handling the connection.target
- The import target.path
- Path to the image file on the computer.- Returns:
- The list of IDs of the newly imported images.
- Throws:
ServiceException
- Cannot connect to OMERO.OMEROServerError
- Server error.
-
getName
Gets the object name.- Returns:
- See above.
-
getDescription
Gets the object description- Returns:
- See above.
-
copyAnnotationLinks
public void copyAnnotationLinks(Client client, GenericRepositoryObjectWrapper<?> object) throws AccessException, ServiceException, ExecutionException Copies annotation links from some other object to this one.Kept for API compatibility purposes.
- Parameters:
client
- The client handling the connection.object
- Other repository object to copy annotations from.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
refresh
@Deprecated public void refresh(Client client) throws ServiceException, AccessException, ExecutionException Deprecated.Reloads the object from OMERO.- Parameters:
client
- The data browser.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
reload
Reloads the object from OMERO.- Parameters:
browser
- The data browser.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-