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 givenAnnotationinstance in a wrapper.- Since:
- OME2.2
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFILE_TRANSFER_NSThe name space used to identify the file transfer type.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotationData(A annotation)Creates a new instance.protectedAnnotationData(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.ObjectgetContent()Returns the content of the annotation.abstract java.lang.StringgetContentAsString()Returns the content of the annotation as aString, which is parsed on aClass-by-Classbasis.java.lang.StringgetDescription()Retrieves thedescriptionof the underlyingAnnotationinstance.java.sql.TimestampgetLastModified()Returns the time when the annotation was last modified.java.lang.StringgetNameSpace()Retrieves thenameSpaceof the underlyingAnnotationinstance.abstract voidsetContent(java.lang.Object content)Sets the annotation value.voidsetDescription(java.lang.String description)Sets the description of the underlyingAnnotationinstance.voidsetNameSpace(java.lang.String name)Sets the name space of the underlyingAnnotationinstance.-
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- TheAnnotationobject 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 underlyingAnnotationinstance.- Parameters:
name- The value to set.
-
getNameSpace
public java.lang.String getNameSpace()
Retrieves thenameSpaceof the underlyingAnnotationinstance.- 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 thedescriptionof the underlyingAnnotationinstance.- Returns:
- See above
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the underlyingAnnotationinstance.- 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 anIllegalArgumentExceptionwill 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-Classbasis.- Returns:
- See above
-
-