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.ExperimenterGroup |
asGroup()
Returns the hosted IObject as an Experimenter Group.
|
ome.model.IAnnotated |
asIAnnotated()
not null; may through 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
IObject s into the corresponding
DataObject s |
static Map |
asPojos(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 |
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)
IObject
s into the corresponding
DataObject
siObjects
- The map to handle.public static Map asPojos(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 String toString()
toString
in class Object
Object.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 ome.model.IAnnotated asIAnnotated()
ClassCastException
public omero.model.Experimenter asExperimenter()
ClassCastException
public omero.model.ExperimenterGroup asGroup()
ClassCastException
public omero.model.Annotation asAnnotation()
ClassCastException
public omero.model.Image asImage()
ClassCastException
public omero.model.Dataset asDataset()
ClassCastException
public omero.model.Project asProject()
ClassCastException
public omero.model.Pixels asPixels()
ClassCastException
public omero.model.Screen asScreen()
ClassCastException
public omero.model.Plate asPlate()
ClassCastException
public omero.model.Well asWell()
ClassCastException
public omero.model.WellSample asWellSample()
ClassCastException
public omero.model.Channel asChannel()
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.
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.