Package fr.igred.omero
Interface RemoteObject
-
- All Known Subinterfaces:
Annotatable
,Annotation
,Channel
,ContainerLinked
,Dataset
,Ellipse
,Experimenter
,FileAnnotation
,Folder
,Group
,HCSLinked
,Image
,ImageLinked
,Line
,MapAnnotation
,Mask
,Pixels
,PlaneInfo
,Plate
,PlateAcquisition
,Point
,Polygon
,Polyline
,Project
,RatingAnnotation
,Rectangle
,RepositoryObject
,ROI
,Screen
,Shape
,TagAnnotation
,Text
,TextualAnnotation
,Well
,WellSample
- All Known Implementing Classes:
AnnotatableWrapper
,AnnotationWrapper
,ChannelWrapper
,DatasetWrapper
,EllipseWrapper
,ExperimenterWrapper
,FileAnnotationWrapper
,FolderWrapper
,GroupWrapper
,ImageWrapper
,LineWrapper
,MapAnnotationWrapper
,MaskWrapper
,ObjectWrapper
,PixelsWrapper
,PlaneInfoWrapper
,PlateAcquisitionWrapper
,PlateWrapper
,PointWrapper
,PolygonWrapper
,PolylineWrapper
,ProjectWrapper
,RatingAnnotationWrapper
,RectangleWrapper
,RepositoryObjectWrapper
,ROIWrapper
,ScreenWrapper
,ShapeWrapper
,TagAnnotationWrapper
,TextualAnnotationWrapper
,TextWrapper
,WellSampleWrapper
,WellWrapper
public interface RemoteObject
Generic interface to handle OMERO objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description DataObject
asDataObject()
Returns a DataObject (or a subclass) corresponding to the handled object.boolean
canAnnotate()
Returnstrue
if the object can be annotatedfalse
otherwise, depending on permissions level.boolean
canChgrp()
Returnstrue
if the object can be moved by the user currently logged in,false
otherwise, depending on permissions level.boolean
canChown()
Returnstrue
if the object can be given by the user currently logged in,false
otherwise, depending on permissions level.boolean
canDelete()
Returnstrue
if the object can be deleted by the user currently logged in,false
otherwise, depending on permissions level.boolean
canEdit()
Returnstrue
if the object can be edited by the user currently logged infalse
otherwise, depending on permissions level.boolean
canLink()
Returnstrue
if the object can be linked e.g.static <T extends RemoteObject>
java.util.List<T>distinct(java.util.Collection<? extends T> objects)
Only keeps objects with different IDs in a collection.static <T extends RemoteObject>
java.util.List<T>flatten(java.util.Collection<? extends java.util.Collection<? extends T>> lists)
Flattens a collection of collections and only keeps objects with different IDs.java.sql.Timestamp
getCreated()
Gets the object creation datestatic <U extends RemoteObject,V extends U>
java.util.List<V>getElementsOf(java.util.Collection<? extends U> collection, java.lang.Class<? extends V> clazz)
Gets a list of elements of the specified class from a collection of RemoteObjects.java.lang.Long
getGroupId()
Gets the group IDlong
getId()
Gets the object idExperimenter
getOwner()
Gets the owner IDvoid
saveAndUpdate(DataManager dm)
Saves and updates object.
-
-
-
Method Detail
-
getElementsOf
static <U extends RemoteObject,V extends U> java.util.List<V> getElementsOf(java.util.Collection<? extends U> collection, java.lang.Class<? extends V> clazz)
Gets a list of elements of the specified class from a collection of RemoteObjects.- Type Parameters:
U
- Subclass of RemoteObject.V
- Subclass of U.- Parameters:
clazz
- Class of the wanted elements.collection
- The collection of RemoteObjects- Returns:
- See above.
-
distinct
static <T extends RemoteObject> java.util.List<T> distinct(java.util.Collection<? extends T> objects)
Only keeps objects with different IDs in a collection.- Type Parameters:
T
- The objects type.- Parameters:
objects
- A collection of objects.- Returns:
- Distinct objects list, sorted by ID.
-
flatten
static <T extends RemoteObject> java.util.List<T> flatten(java.util.Collection<? extends java.util.Collection<? extends T>> lists)
Flattens a collection of collections and only keeps objects with different IDs.- Type Parameters:
T
- The objects type.- Parameters:
lists
- A collection of objects collections.- Returns:
- Distinct objects list, sorted by ID.
-
asDataObject
DataObject asDataObject()
Returns a DataObject (or a subclass) corresponding to the handled object.- Returns:
- See above.
-
getId
long getId()
Gets the object id- Returns:
- id.
-
getCreated
java.sql.Timestamp getCreated()
Gets the object creation date- Returns:
- creation date.
-
getOwner
Experimenter getOwner()
Gets the owner ID- Returns:
- owner id.
-
getGroupId
java.lang.Long getGroupId()
Gets the group ID- Returns:
- group id.
-
saveAndUpdate
void saveAndUpdate(DataManager dm) throws java.util.concurrent.ExecutionException, ServiceException, AccessException
Saves and updates object.- 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.
-
canAnnotate
boolean canAnnotate()
Returnstrue
if the object can be annotatedfalse
otherwise, depending on permissions level.- Returns:
- See above.
-
canEdit
boolean canEdit()
Returnstrue
if the object can be edited by the user currently logged infalse
otherwise, depending on permissions level.- Returns:
- See above.
-
canLink
boolean canLink()
Returnstrue
if the object can be linked e.g. image add to dataset, by the user currently logged in,false
otherwise, depending on permissions level.- Returns:
- See above.
-
canDelete
boolean canDelete()
Returnstrue
if the object can be deleted by the user currently logged in,false
otherwise, depending on permissions level.- Returns:
- See above.
-
canChgrp
boolean canChgrp()
Returnstrue
if the object can be moved by the user currently logged in,false
otherwise, depending on permissions level.- Returns:
- See above.
-
canChown
boolean canChown()
Returnstrue
if the object can be given by the user currently logged in,false
otherwise, depending on permissions level.- Returns:
- See above.
-
-