pojos
Class AnnotationData

java.lang.Object
  extended by pojos.DataObject
      extended by pojos.AnnotationData
Direct Known Subclasses:
BooleanAnnotationData, DoubleAnnotationData, FileAnnotationData, LongAnnotationData, 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 given Annotation instance in a wrapper.

Since:
OME2.2
Author:
Jean-Marie Burel, j.burel at dundee.ac.uk, Andrea Falconi, a.falconi at dundee.ac.uk, Josh Moore, josh at glencoesoftware.com

Constructor Summary
protected AnnotationData(A annotation)
          Creates a new instance.
protected AnnotationData(Class<? extends omero.model.Annotation> annotationClass)
          Creates a new instance.
 
Method Summary
abstract  Object getContent()
          Returns the content of the annotation.
abstract  String getContentAsString()
          Returns the content of the annotation as a String, which is parsed on a Class-by-Class basis.
 Timestamp getLastModified()
          Returns the time when the annotation was last modified.
 String getNameSpace()
          Retrieves the nameSpace of the underlying Annotation instance.
abstract  void setContent(Object content)
          Sets the annotation value.
 void setNameSpace(String name)
          Sets the name space of the underlying Annotation instance.
 
Methods inherited from class pojos.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, getCreated, getDetails, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setDirty, setId, setValue, setVersion, timeOfEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationData

protected AnnotationData(Class<? extends omero.model.Annotation> annotationClass)
Creates a new instance.

Parameters:
annotationClass - The type of annotation to create.
Throws:
IllegalArgumentException - If the type is not supported or if the passed parameter is null.

AnnotationData

protected AnnotationData(A annotation)
Creates a new instance.

Parameters:
annotation - The Annotation object corresponding to this DataObject. Mustn't be null.
Throws:
IllegalArgumentException - If the object is null.
Method Detail

setNameSpace

public void setNameSpace(String name)
Sets the name space of the underlying Annotation instance.

Parameters:
name - The value to set.

getNameSpace

public String getNameSpace()
Retrieves the nameSpace of the underlying Annotation instance.

Returns:
See above.

getLastModified

public Timestamp getLastModified()
Returns the time when the annotation was last modified.

Returns:
See above.

setContent

public abstract void setContent(Object content)
Sets the annotation value. If the improper content is given for the current Annotation, then an IllegalArgumentException will be thrown.

Parameters:
content - The value to set.

getContent

public abstract Object getContent()
Returns the content of the annotation.

Returns:
See above.

getContentAsString

public abstract String getContentAsString()
Returns the content of the annotation as a String, which is parsed on a Class-by-Class basis.

Returns:
See above


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.