eu.etaxonomy.cdm.model.common
Class Annotation

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.VersionableEntity
          extended by eu.etaxonomy.cdm.model.common.AnnotatableEntity
              extended by eu.etaxonomy.cdm.model.common.LanguageStringBase
                  extended by eu.etaxonomy.cdm.model.common.Annotation
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IVersionableEntity, Serializable, Cloneable

@Entity
public class Annotation
extends LanguageStringBase
implements Cloneable

Version:
1.0
Author:
m.doering
See Also:
Serialized Form

Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.model.common.LanguageStringBase
language, text
 
Fields inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
annotations, markers
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
protected Annotation()
           
protected Annotation(String text, Language language)
          Constructor
 
Method Summary
 Object clone()
          Clones this versionable entity.
 Annotation clone(AnnotatableEntity annotatedObject)
          Clones this annotation and sets the clone's annotated object to 'annotatedObject'
 AnnotatableEntity getAnnotatedObj()
          Currently envers does not support @Any
 AnnotationType getAnnotationType()
           
 Person getCommentator()
           
 URI getLinkbackUri()
           
static Annotation NewDefaultLanguageInstance(String text)
          Factory method.
static Annotation NewInstance(String text, AnnotationType annotationType, Language lang)
           
static Annotation NewInstance(String text, Language lang)
          Factory method.
 void setAnnotatedObj(AnnotatableEntity newAnnotatedObj)
          Deprecated. should not be used, is only public for internal reasons
 void setAnnotationType(AnnotationType annotationType)
           
 void setCommentator(Person commentator)
           
 void setLinkbackUri(URI linkbackUri)
           
 String toString()
          Overrides Object.toString().
 
Methods inherited from class eu.etaxonomy.cdm.model.common.LanguageStringBase
getLanguage, getLanguageLabel, getLanguageLabel, getText, setLanguage, setText
 
Methods inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity
equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 

Constructor Detail

Annotation

protected Annotation()

Annotation

protected Annotation(String text,
                     Language language)
Constructor

Parameters:
text -
lang -
Method Detail

NewInstance

public static Annotation NewInstance(String text,
                                     Language lang)
Factory method.

Parameters:
text -
lang -
Returns:

NewInstance

public static Annotation NewInstance(String text,
                                     AnnotationType annotationType,
                                     Language lang)

NewDefaultLanguageInstance

public static Annotation NewDefaultLanguageInstance(String text)
Factory method. Using default language.

Parameters:
text -
Returns:

getAnnotatedObj

public AnnotatableEntity getAnnotatedObj()
Currently envers does not support @Any

Returns:

setAnnotatedObj

@Deprecated
public void setAnnotatedObj(AnnotatableEntity newAnnotatedObj)
Deprecated. should not be used, is only public for internal reasons

Parameters:
newAnnotatedObj -

getAnnotationType

public AnnotationType getAnnotationType()

setAnnotationType

public void setAnnotationType(AnnotationType annotationType)

getCommentator

public Person getCommentator()

setCommentator

public void setCommentator(Person commentator)

getLinkbackUri

public URI getLinkbackUri()

setLinkbackUri

public void setLinkbackUri(URI linkbackUri)

toString

public String toString()
Description copied from class: CdmBase
Overrides Object.toString(). This returns an String that identifies the object well without being necessarily unique. Internally the method is delegating the call to {link CdmBase.instanceToString().
Specification: This method should never call other object' methods so it can be well used for debugging without problems like lazy loading, unreal states etc.

Note: If overriding this method's javadoc always copy or link the above requirement. If not overwritten by a subclass method returns the class, id and uuid as a string for any CDM object.

For example: Taxon#13<b5938a98-c1de-4dda-b040-d5cc5bfb3bc0>

Overrides:
toString in class CdmBase
See Also:
Object.toString()

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: VersionableEntity
Clones this versionable entity. Set fields for nextVersion, previousVersion, updated, updatedBy and createdBy are set to null The id is set to 0. The uuid is created new. The createdWhen is set to the current date.

Overrides:
clone in class LanguageStringBase
Throws:
CloneNotSupportedException
See Also:
Object.clone()

clone

public Annotation clone(AnnotatableEntity annotatedObject)
                 throws CloneNotSupportedException
Clones this annotation and sets the clone's annotated object to 'annotatedObject'

Throws:
CloneNotSupportedException
See Also:
Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.