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 RemoteObjectGeneric interface to handle OMERO objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description DataObjectasDataObject()Returns a DataObject (or a subclass) corresponding to the handled object.booleancanAnnotate()Returnstrueif the object can be annotatedfalseotherwise, depending on permissions level.booleancanChgrp()Returnstrueif the object can be moved by the user currently logged in,falseotherwise, depending on permissions level.booleancanChown()Returnstrueif the object can be given by the user currently logged in,falseotherwise, depending on permissions level.booleancanDelete()Returnstrueif the object can be deleted by the user currently logged in,falseotherwise, depending on permissions level.booleancanEdit()Returnstrueif the object can be edited by the user currently logged infalseotherwise, depending on permissions level.booleancanLink()Returnstrueif 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.TimestampgetCreated()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.LonggetGroupId()Gets the group IDlonggetId()Gets the object idExperimentergetOwner()Gets the owner IDvoidsaveAndUpdate(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()
Returnstrueif the object can be annotatedfalseotherwise, depending on permissions level.- Returns:
- See above.
-
canEdit
boolean canEdit()
Returnstrueif the object can be edited by the user currently logged infalseotherwise, depending on permissions level.- Returns:
- See above.
-
canLink
boolean canLink()
Returnstrueif the object can be linked e.g. image add to dataset, by the user currently logged in,falseotherwise, depending on permissions level.- Returns:
- See above.
-
canDelete
boolean canDelete()
Returnstrueif the object can be deleted by the user currently logged in,falseotherwise, depending on permissions level.- Returns:
- See above.
-
canChgrp
boolean canChgrp()
Returnstrueif the object can be moved by the user currently logged in,falseotherwise, depending on permissions level.- Returns:
- See above.
-
canChown
boolean canChown()
Returnstrueif the object can be given by the user currently logged in,falseotherwise, depending on permissions level.- Returns:
- See above.
-
-