Package omero.gateway.model
Class AnnotationData
- java.lang.Object
-
- omero.gateway.model.DataObject
-
- omero.gateway.model.AnnotationData
-
- Direct Known Subclasses:
BooleanAnnotationData
,DoubleAnnotationData
,FileAnnotationData
,LongAnnotationData
,MapAnnotationData
,RatingAnnotationData
,TagAnnotationData
,TermAnnotationData
,TextualAnnotationData
,TimeAnnotationData
,XMLAnnotationData
public abstract class AnnotationData extends DataObject
Holds a textual annotation of a given data object and a reference to the Experimenter that wrote it. This class wraps a givenAnnotation
instance in a wrapper.- Since:
- OME2.2
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILE_TRANSFER_NS
The name space used to identify the file transfer type.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotationData(A annotation)
Creates a new instance.protected
AnnotationData(java.lang.Class<? extends omero.model.Annotation> annotationClass)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Object
getContent()
Returns the content of the annotation.abstract java.lang.String
getContentAsString()
Returns the content of the annotation as aString
, which is parsed on aClass
-by-Class
basis.java.lang.String
getDescription()
Retrieves thedescription
of the underlyingAnnotation
instance.java.sql.Timestamp
getLastModified()
Returns the time when the annotation was last modified.java.lang.String
getNameSpace()
Retrieves thenameSpace
of the underlyingAnnotation
instance.abstract void
setContent(java.lang.Object content)
Sets the annotation value.void
setDescription(java.lang.String description)
Sets the description of the underlyingAnnotation
instance.void
setNameSpace(java.lang.String name)
Sets the name space of the underlyingAnnotation
instance.-
Methods inherited from class omero.gateway.model.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asFolder, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlaneInfo, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getDetails, getGroupId, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setDirty, setId, setValue, setVersion, timeOfEvent, toString
-
-
-
-
Field Detail
-
FILE_TRANSFER_NS
public static final java.lang.String FILE_TRANSFER_NS
The name space used to identify the file transfer type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AnnotationData
protected AnnotationData(java.lang.Class<? extends omero.model.Annotation> annotationClass)
Creates a new instance.- Parameters:
annotationClass
- The type of annotation to create.- Throws:
java.lang.IllegalArgumentException
- If the type is not supported or if the passed parameter isnull
.
-
AnnotationData
protected AnnotationData(A annotation)
Creates a new instance.- Parameters:
annotation
- TheAnnotation
object corresponding to thisDataObject
. Mustn't benull
.- Throws:
java.lang.IllegalArgumentException
- If the object isnull
.
-
-
Method Detail
-
setNameSpace
public void setNameSpace(java.lang.String name)
Sets the name space of the underlyingAnnotation
instance.- Parameters:
name
- The value to set.
-
getNameSpace
public java.lang.String getNameSpace()
Retrieves thenameSpace
of the underlyingAnnotation
instance.- Returns:
- See above.
-
getLastModified
public java.sql.Timestamp getLastModified()
Returns the time when the annotation was last modified.- Returns:
- See above.
-
getDescription
public java.lang.String getDescription()
Retrieves thedescription
of the underlyingAnnotation
instance.- Returns:
- See above
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the underlyingAnnotation
instance.- Parameters:
description
- The description
-
setContent
public abstract void setContent(java.lang.Object content)
Sets the annotation value. If the improper content is given for the currentAnnotation
, then anIllegalArgumentException
will be thrown.- Parameters:
content
- The value to set.
-
getContent
public abstract java.lang.Object getContent()
Returns the content of the annotation.- Returns:
- See above.
-
getContentAsString
public abstract java.lang.String getContentAsString()
Returns the content of the annotation as aString
, which is parsed on aClass
-by-Class
basis.- Returns:
- See above
-
-