public abstract class DataObject extends Object
IObject instances. Modifications are
propagated. Not thread-safe.| Constructor and Description |
|---|
DataObject() |
| Modifier and Type | Method and Description |
|---|---|
omero.model.Annotation |
asAnnotation()
Returns the hosted IObject as an Annotation.
|
omero.model.Channel |
asChannel()
Returns the hosted IObject as a Well.
|
omero.model.Dataset |
asDataset()
Returns the hosted IObject as a Dataset.
|
omero.model.Experimenter |
asExperimenter()
Returns the hosted IObject as an Experimenter.
|
omero.model.Folder |
asFolder()
Returns the hosted IObject as a Folder.
|
omero.model.ExperimenterGroup |
asGroup()
Returns the hosted IObject as an Experimenter Group.
|
IAnnotated |
asIAnnotated()
not null; may throw class-cast exception
|
omero.model.Image |
asImage()
Returns the hosted IObject as an Image.
|
omero.model.IObject |
asIObject()
not null; no exceptions.
|
omero.model.Pixels |
asPixels()
Returns the hosted IObject as a Pixels.
|
omero.model.Plate |
asPlate()
Returns the hosted IObject as a Plate.
|
static DataObject |
asPojo(omero.model.IObject obj)
Converts the passed
IObject into its corresponding Pojo object. |
static Set |
asPojos(Collection iObjects)
Converts the collection of
IObjects into the corresponding
DataObjects |
static Map |
asPojos(Map iObjects)
Converts the map of
IObjects into the corresponding
DataObjects |
omero.model.Project |
asProject()
Returns the hosted IObject as a Project.
|
omero.model.Screen |
asScreen()
Returns the hosted IObject as a Screen.
|
omero.model.Well |
asWell()
Returns the hosted IObject as a Well.
|
omero.model.WellSample |
asWellSample()
Returns the hosted IObject as a Well.
|
boolean |
canAnnotate()
Returns
true if the object can be annotated
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()
Returns the creation time of the object.
|
protected omero.model.Details |
getDetails()
Returns the details of the object.
|
long |
getGroupId()
Returns the id of the group.
|
long |
getId()
Returns the database id of the IObject or
-1 if
null |
ExperimenterData |
getOwner()
Returns the owner of the object.
|
PermissionData |
getPermissions()
Returns the permission of the object.
|
Timestamp |
getUpdated()
Returns the updated time of the object.
|
protected int |
getVersion()
Returns the version of the object if the object is immutable,
false otherwise. |
boolean |
isDirty()
Returns
true if setter value has modified the value of the
stored IObject, false otherwise. |
boolean |
isLoaded()
Returns
true if the object is loaded, false
otherwise. |
protected boolean |
nullDetails()
Returns
true if the details are null
otherwise false otherwise. |
protected double |
nullSafe(Double d) |
protected float |
nullSafe(Float f) |
protected int |
nullSafe(Integer i) |
protected double |
nullSafe(omero.model.Length l) |
protected long |
nullSafe(Long l) |
protected double |
nullSafe(omero.RDouble d) |
protected float |
nullSafe(omero.RFloat f) |
protected int |
nullSafe(omero.RInt i) |
protected void |
setDirty(boolean dirty)
Sets to
true if the value has been modified, |
void |
setId(long id)
Sets the database id.
|
protected void |
setValue(omero.model.IObject value)
Sets the
IObject. |
protected void |
setVersion(int version)
Sets the version of the object if it is immutable.
|
protected Timestamp |
timeOfEvent(omero.model.Event event) |
String |
toString()
Overridden to return the name of the class and the object id.
|
public static Set asPojos(Collection iObjects)
IObjects into the corresponding
DataObjectsiObjects - The map to handle.public static Map asPojos(Map iObjects)
IObjects into the corresponding
DataObjectsiObjects - The map to handle.public static DataObject asPojo(omero.model.IObject obj)
IObject into its corresponding Pojo object.obj - The object to convert.protected void setValue(omero.model.IObject value)
IObject.value - The value to set.public boolean isDirty()
true if setter value has modified the value of the
stored IObject, false otherwise.protected void setDirty(boolean dirty)
true if the value has been modified, dirty - The value to set.public long getId()
-1 if
nullpublic void setId(long id)
id - The value to set.protected int getVersion()
false otherwise.protected void setVersion(int version)
version - The value to set.public boolean isLoaded()
true if the object is loaded, false
otherwise.public ExperimenterData getOwner()
public PermissionData getPermissions()
public String toString()
toString in class ObjectObject.toString()protected int nullSafe(Integer i)
protected int nullSafe(omero.RInt i)
protected long nullSafe(Long l)
protected double nullSafe(Double d)
protected float nullSafe(Float f)
protected float nullSafe(omero.RFloat f)
protected double nullSafe(omero.RDouble d)
protected double nullSafe(omero.model.Length l)
protected Timestamp timeOfEvent(omero.model.Event event)
protected boolean nullDetails()
true if the details are null
otherwise false otherwise.protected omero.model.Details getDetails()
public Timestamp getCreated()
public Timestamp getUpdated()
public long getGroupId()
public omero.model.IObject asIObject()
public IAnnotated asIAnnotated()
ClassCastExceptionpublic omero.model.Experimenter asExperimenter()
ClassCastExceptionpublic omero.model.ExperimenterGroup asGroup()
ClassCastExceptionpublic omero.model.Annotation asAnnotation()
ClassCastExceptionpublic omero.model.Image asImage()
ClassCastExceptionpublic omero.model.Dataset asDataset()
ClassCastExceptionpublic omero.model.Project asProject()
ClassCastExceptionpublic omero.model.Folder asFolder()
ClassCastExceptionpublic omero.model.Pixels asPixels()
ClassCastExceptionpublic omero.model.Screen asScreen()
ClassCastExceptionpublic omero.model.Plate asPlate()
ClassCastExceptionpublic omero.model.Well asWell()
ClassCastExceptionpublic omero.model.WellSample asWellSample()
ClassCastExceptionpublic omero.model.Channel asChannel()
ClassCastExceptionpublic boolean canAnnotate()
true if the object can be annotated
false otherwise, depending on permissions level.public boolean canEdit()
true if the object can be edited by the user
currently logged in false otherwise,
depending on permissions level.public 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.public boolean canDelete()
true if the object can be deleted by the user
currently logged in,
false otherwise, depending on permissions level.
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.