eu.etaxonomy.cdm.model.occurrence
Class SpecimenOrObservationBase<S extends IIdentifiableEntityCacheStrategy>

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.IdentifiableEntity<S>
                  extended by eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity<S>
                      extended by eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase<S>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IIdentifiableEntity, IMultiLanguageTextHolder, ISourceable<IdentifiableSource>, IVersionableEntity, IMediaDocumented, IMediaEntity, Serializable, Cloneable
Direct Known Subclasses:
DerivedUnitBase, FieldObservation

@Entity
public abstract class SpecimenOrObservationBase<S extends IIdentifiableEntityCacheStrategy>
extends IdentifiableMediaEntity<S>
implements IMultiLanguageTextHolder

type figures are observations with at least a figure object in media

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

Field Summary
protected  Map<Language,LanguageString> definition
           
protected  Set<DerivationEvent> derivationEvents
           
 
Fields inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
 
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 SpecimenOrObservationBase()
          Constructor
 
Method Summary
 void addDefinition(LanguageString description)
          Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDefinition method instead
 void addDefinition(String text, Language language)
          Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDefinition method instead
 void addDerivationEvent(DerivationEvent derivationEvent)
           
 void addDescription(DescriptionBase description)
          Adds a new description to this specimen or observation
 void addDetermination(DeterminationEvent determination)
           
 Object clone()
          Clones this versionable entity.
 String generateTitle()
           
 Map<Language,LanguageString> getDefinition()
           
 Set<DerivationEvent> getDerivationEvents()
           
 Set<DescriptionBase> getDescriptions()
          The descriptions this specimen or observation is part of.
A specimen can not only have it's own specimen description but can also be part of a taxon description or a taxon name description.
 Set<DeterminationEvent> getDeterminations()
           
 Integer getIndividualCount()
           
 Stage getLifeStage()
           
 SpecimenOrObservationBase getOriginalUnit()
          for derived units get the single next higher parental/original unit.
 Sex getSex()
           
 Set<SpecimenDescription> getSpecimenDescriptionImageGallery()
          Returns the specimen descriptions this specimen is part of.
 Set<SpecimenDescription> getSpecimenDescriptions()
          Returns the specimen descriptions this specimen is part of.
 Set<SpecimenDescription> getSpecimenDescriptions(boolean includeImageGallery)
          Returns the specimen descriptions this specimen is part of.
 void putDefinition(LanguageString description)
          adds the description to the multilanguage text used to define this specimen or observation.
 void putDefinition(Language language, String text)
          Creates a language string based on the given text string and the given language and adds it to the multilanguage text used to define this specimen or observation.
 void removeDefinition(Language lang)
           
 void removeDerivationEvent(DerivationEvent derivationEvent)
           
 void removeDescription(DescriptionBase description)
          Removes a specimen from a description (removes a description from this specimen)
 void removeDetermination(DeterminationEvent determination)
           
 void setIndividualCount(Integer individualCount)
           
 void setLifeStage(Stage lifeStage)
           
 void setSex(Sex sex)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity
addMedia, getMedia, removeMedia
 
Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTitleCache, getTruncatedCache, initListener, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, toString
 
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.IAnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
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
 

Field Detail

definition

@IndexedEmbedded
@NotNull
protected Map<Language,LanguageString> definition

derivationEvents

@NotNull
protected Set<DerivationEvent> derivationEvents
Constructor Detail

SpecimenOrObservationBase

protected SpecimenOrObservationBase()
Constructor

Method Detail

getDescriptions

public Set<DescriptionBase> getDescriptions()
The descriptions this specimen or observation is part of.
A specimen can not only have it's own specimen description but can also be part of a taxon description or a taxon name description.

Returns:
See Also:
getSpecimenDescriptions()

getSpecimenDescriptions

public Set<SpecimenDescription> getSpecimenDescriptions()
Returns the specimen descriptions this specimen is part of.

Returns:
See Also:
getDescriptions()

getSpecimenDescriptions

public Set<SpecimenDescription> getSpecimenDescriptions(boolean includeImageGallery)
Returns the specimen descriptions this specimen is part of.

Returns:
See Also:
getDescriptions()

getSpecimenDescriptionImageGallery

public Set<SpecimenDescription> getSpecimenDescriptionImageGallery()
Returns the specimen descriptions this specimen is part of.

Returns:
See Also:
getDescriptions()

addDescription

public void addDescription(DescriptionBase description)
Adds a new description to this specimen or observation

Parameters:
description -

removeDescription

public void removeDescription(DescriptionBase description)
Removes a specimen from a description (removes a description from this specimen)

Parameters:
description -

getDerivationEvents

public Set<DerivationEvent> getDerivationEvents()

addDerivationEvent

public void addDerivationEvent(DerivationEvent derivationEvent)

removeDerivationEvent

public void removeDerivationEvent(DerivationEvent derivationEvent)

getDeterminations

public Set<DeterminationEvent> getDeterminations()

addDetermination

public void addDetermination(DeterminationEvent determination)

removeDetermination

public void removeDetermination(DeterminationEvent determination)

getSex

public Sex getSex()

setSex

public void setSex(Sex sex)

getLifeStage

public Stage getLifeStage()

setLifeStage

public void setLifeStage(Stage lifeStage)

generateTitle

public String generateTitle()
Specified by:
generateTitle in interface IIdentifiableEntity
Overrides:
generateTitle in class IdentifiableEntity<S extends IIdentifiableEntityCacheStrategy>

getIndividualCount

public Integer getIndividualCount()

setIndividualCount

public void setIndividualCount(Integer individualCount)

getDefinition

public Map<Language,LanguageString> getDefinition()

addDefinition

@Deprecated
public void addDefinition(LanguageString description)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDefinition method instead

adds the description to the multilanguage text used to define this specimen or observation.

Parameters:
description - the languageString in with the title string and the given language
See Also:
getDefinition(), putDefinition(Language, String)

putDefinition

public void putDefinition(LanguageString description)
adds the description to the multilanguage text used to define this specimen or observation.

Parameters:
description - the languageString in with the title string and the given language
See Also:
getDefinition(), putDefinition(Language, String)

addDefinition

@Deprecated
public void addDefinition(String text,
                                     Language language)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDefinition method instead

Creates a language string based on the given text string and the given language and adds it to the multilanguage text used to define this specimen or observation.

Parameters:
language - the language in which the title string is formulated
text - the definition in a particular language
See Also:
getDefinition(), putDefinition(LanguageString)

putDefinition

public void putDefinition(Language language,
                          String text)
Creates a language string based on the given text string and the given language and adds it to the multilanguage text used to define this specimen or observation.

Parameters:
language - the language in which the title string is formulated
text - the definition in a particular language
See Also:
getDefinition(), putDefinition(LanguageString)

removeDefinition

public void removeDefinition(Language lang)

getOriginalUnit

public SpecimenOrObservationBase getOriginalUnit()
for derived units get the single next higher parental/original unit. If multiple original units exist throw error

Returns:

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 IdentifiableMediaEntity<S extends IIdentifiableEntityCacheStrategy>
Throws:
CloneNotSupportedException
See Also:
Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.