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
Nested Classes Modifier and Type Class Description static class
GenericRepositoryObjectWrapper.ReplacePolicy
Policy to specify how to handle objects when they are replaced.
-
Field Summary
-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericRepositoryObjectWrapper(T o)
Constructor of the class GenericRepositoryObjectWrapper.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
copyAnnotationLinks(Client client, GenericRepositoryObjectWrapper<?> object)
Copies annotation links from some other object to this one.abstract String
getDescription()
Gets the object descriptionabstract String
getName()
Gets the object name.protected static List<Long>
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.-
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, 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, saveAndUpdate, toString, wrap, wrap
-
-
-
-
Constructor Detail
-
GenericRepositoryObjectWrapper
protected GenericRepositoryObjectWrapper(T o)
Constructor of the class GenericRepositoryObjectWrapper.- Parameters:
o
- The DataObject to wrap in the GenericRepositoryObjectWrapper.
-
-
Method Detail
-
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
public abstract String getName()
Gets the object name.- Returns:
- See above.
-
getDescription
public abstract String 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.
-
-