T - Subclass of DataObjectpublic abstract class ObjectWrapper<T extends DataObject> extends Object implements RemoteObject
| Modifier | Constructor and Description |
|---|---|
protected |
ObjectWrapper(T o)
Constructor of the class ObjectWrapper.
|
| Modifier and Type | Method and Description |
|---|---|
T |
asDataObject()
Returns the wrapped DataObject.
|
boolean |
canAnnotate()
Returns
true if the object can be annotated false otherwise, depending on permissions level. |
boolean |
canChgrp()
Returns
true if the object can be moved by the user currently logged in, false otherwise,
depending on permissions level. |
boolean |
canChown()
Returns
true if the object can be given by the user currently logged in, false otherwise,
depending on permissions level. |
boolean |
canDelete()
Returns
true if the object can be deleted by the user currently logged in, false otherwise,
depending on permissions level. |
boolean |
canEdit()
Returns
true if the object can be edited by the user currently logged in false otherwise,
depending on permissions level. |
boolean |
canLink()
Returns
true if the object can be linked e.g. image add to dataset, by the user currently logged in,
false otherwise, depending on permissions level. |
Timestamp |
getCreated()
Gets the time when the object was created.
|
Long |
getGroupId()
Gets the group ID
|
long |
getId()
Gets the object id
|
Experimenter |
getOwner()
Gets the owner ID
|
Timestamp |
getUpdated()
Gets the time when the object was last updated.
|
void |
saveAndUpdate(DataManager dm)
Saves and updates object.
|
String |
toString()
Overridden to return the name of the class and the object id.
|
static <U extends DataObject,V extends RemoteObject> |
wrap(Collection<U> objects,
Function<? super U,? extends V> mapper)
Converts a DataObject list to a ObjectWrapper list, sorted by
sorter. |
static <U extends DataObject,V extends RemoteObject,W extends Comparable<W>> |
wrap(Collection<U> objects,
Function<? super U,? extends V> mapper,
Function<? super V,? extends W> sorter)
Converts a DataObject list to an ObjectWrapper list, sorted by
sorter. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdistinct, flatten, getElementsOfprotected T extends DataObject data
protected ObjectWrapper(T o)
o - The DataObject to wrap in the ObjectWrapper.public static <U extends DataObject,V extends RemoteObject,W extends Comparable<W>> List<V> wrap(Collection<U> objects, Function<? super U,? extends V> mapper, Function<? super V,? extends W> sorter)
sorter.U - The type of input (extends DataObject).V - The type of output (extends ObjectWrapper).W - The type used to sort the output.objects - The DataObject list.mapper - The method used to map objects.sorter - The method used to sort the objects.public static <U extends DataObject,V extends RemoteObject> List<V> wrap(Collection<U> objects, Function<? super U,? extends V> mapper)
sorter.U - The type of input (extends DataObject).V - The type of output (extends ObjectWrapper).objects - The DataObject list.mapper - The method used to map objects.public T asDataObject()
asDataObject in interface RemoteObjectT.public long getId()
getId in interface RemoteObjectpublic Timestamp getCreated()
getCreated in interface RemoteObjectpublic Timestamp getUpdated()
getUpdated in interface RemoteObjectpublic Experimenter getOwner()
getOwner in interface RemoteObjectpublic Long getGroupId()
getGroupId in interface RemoteObjectpublic String toString()
public void saveAndUpdate(DataManager dm) throws ExecutionException, ServiceException, AccessException
saveAndUpdate in interface RemoteObjectdm - The data manager.ServiceException - Cannot connect to OMERO.AccessException - Cannot access data.ExecutionException - A Facility can't be retrieved or instantiated.public boolean canAnnotate()
true if the object can be annotated false otherwise, depending on permissions level.canAnnotate in interface RemoteObjectpublic boolean canEdit()
true if the object can be edited by the user currently logged in false otherwise,
depending on permissions level.canEdit in interface RemoteObjectpublic boolean canLink()
true if the object can be linked e.g. image add to dataset, by the user currently logged in,
false otherwise, depending on permissions level.canLink in interface RemoteObjectpublic boolean canDelete()
true if the object can be deleted by the user currently logged in, false otherwise,
depending on permissions level.canDelete in interface RemoteObjectpublic boolean canChgrp()
true if the object can be moved by the user currently logged in, false otherwise,
depending on permissions level.canChgrp in interface RemoteObjectpublic boolean canChown()
true if the object can be given by the user currently logged in, false otherwise,
depending on permissions level.canChown in interface RemoteObjectCopyright © 2020–2023 GReD. All rights reserved.