public abstract class DataObject
extends java.lang.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.
|
ome.model.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.PlaneInfo |
asPlaneInfo()
Returns the hosted IObject as a PlaneInfo.
|
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 java.util.Set |
asPojos(java.util.Collection iObjects)
Converts the collection of
IObject s into the corresponding
DataObject s |
static java.util.Map |
asPojos(java.util.Map iObjects)
Converts the map of
IObject s into the corresponding
DataObject s |
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 |
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. |
java.sql.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.
|
java.sql.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(java.lang.Double d) |
protected float |
nullSafe(java.lang.Float f) |
protected int |
nullSafe(java.lang.Integer i) |
protected double |
nullSafe(omero.model.Length l) |
protected long |
nullSafe(java.lang.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 java.sql.Timestamp |
timeOfEvent(omero.model.Event event) |
java.lang.String |
toString()
Overridden to return the name of the class and the object id.
|
public static java.util.Set asPojos(java.util.Collection iObjects)
IObject
s into the corresponding
DataObject
siObjects
- The map to handle.public static java.util.Map asPojos(java.util.Map iObjects)
IObject
s into the corresponding
DataObject
siObjects
- 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
null
public 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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
protected int nullSafe(java.lang.Integer i)
protected int nullSafe(omero.RInt i)
protected long nullSafe(java.lang.Long l)
protected double nullSafe(java.lang.Double d)
protected float nullSafe(java.lang.Float f)
protected float nullSafe(omero.RFloat f)
protected double nullSafe(omero.RDouble d)
protected double nullSafe(omero.model.Length l)
protected java.sql.Timestamp timeOfEvent(omero.model.Event event)
protected boolean nullDetails()
true
if the details are null
otherwise false
otherwise.protected omero.model.Details getDetails()
public java.sql.Timestamp getCreated()
public java.sql.Timestamp getUpdated()
public long getGroupId()
public omero.model.IObject asIObject()
public ome.model.IAnnotated asIAnnotated()
java.lang.ClassCastException
public omero.model.Experimenter asExperimenter()
java.lang.ClassCastException
public omero.model.ExperimenterGroup asGroup()
java.lang.ClassCastException
public omero.model.Annotation asAnnotation()
java.lang.ClassCastException
public omero.model.Image asImage()
java.lang.ClassCastException
public omero.model.Dataset asDataset()
java.lang.ClassCastException
public omero.model.Project asProject()
java.lang.ClassCastException
public omero.model.Folder asFolder()
java.lang.ClassCastException
public omero.model.Pixels asPixels()
java.lang.ClassCastException
public omero.model.Screen asScreen()
java.lang.ClassCastException
public omero.model.Plate asPlate()
java.lang.ClassCastException
public omero.model.Well asWell()
java.lang.ClassCastException
public omero.model.WellSample asWellSample()
java.lang.ClassCastException
public omero.model.Channel asChannel()
java.lang.ClassCastException
public omero.model.PlaneInfo asPlaneInfo()
java.lang.ClassCastException
public 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.public boolean canChgrp()
true
if the object can be moved by the user
currently logged in,
false
otherwise, depending on permissions level.public boolean canChown()
true
if the object can be given by the user
currently logged in,
false
otherwise, depending on permissions level.