eu.etaxonomy.cdm.model.description
Class TaxonDescription

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.description.DescriptionBase<IIdentifiableEntityCacheStrategy<TaxonDescription>>
                      extended by eu.etaxonomy.cdm.model.description.TaxonDescription
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IIdentifiableEntity, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable

@Indexed(index="eu.etaxonomy.cdm.model.description.DescriptionBase")
@Configurable
public class TaxonDescription
extends DescriptionBase<IIdentifiableEntityCacheStrategy<TaxonDescription>>
implements Cloneable

This class represents descriptions that delimit or circumscribe a real taxon.

This class corresponds to:

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

Field Summary
 
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
TaxonDescription()
          Class constructor: creates a new empty taxon description instance.
 
Method Summary
 void addGeoScope(NamedArea geoScope)
          Adds a named area to the set of named areas delimiting the geospatial area where this taxon description is valid.
 void addScope(Scope scope)
          Adds a scope (mostly a life stage or a sex) to the set of scopes restricting the validity of this taxon description.
 Object clone()
          Clones this taxon description.
 Set<NamedArea> getGeoScopes()
          Returns the set of named areas indicating the geospatial data where this taxon description is valid.
 TextData getOrCreateImageTextData()
          Returns the first TextData element of feature type image.
 Set<Scope> getScopes()
          Returns the set of scopes (this covers mostly life stage or sex or both) restricting the validity of this taxon description.
 Taxon getTaxon()
           
static TaxonDescription NewInstance()
          Creates a new empty taxon description instance.
static TaxonDescription NewInstance(Taxon taxon)
          Creates a new taxon description instance for the given taxon.
static TaxonDescription NewInstance(Taxon taxon, boolean isImageGallery)
          Creates a new taxon description instance for the given taxon.
 void removeGeoScope(NamedArea geoScope)
          Removes one element from the set of named areas delimiting the geospatial area where this taxon description is valid.
 void removeScope(Scope scope)
          Removes one element from the set of scopes restricting the validity of this taxon description.
 void setTaxon(Taxon taxon)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.description.DescriptionBase
addDescribedSpecimenOrObservation, addDescriptionSource, addElement, addFeature, addWorkingSet, getDescribedSpecimenOrObservations, getDescriptionSources, getDescriptiveSystem, getElements, getWorkingSets, hasStructuredData, isImageGallery, removeDescribedSpecimenOrObservation, removeDescriptionSource, removeElement, removeFeature, removeWorkingSet, setDescriptiveSystem, setImageGallery, setWorkingSets, size
 
Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTitleCache, getTruncatedCache, initListener, isProtectedTitleCache, 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, 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
 

Constructor Detail

TaxonDescription

public TaxonDescription()
Class constructor: creates a new empty taxon description instance.

Method Detail

setTaxon

public void setTaxon(Taxon taxon)

NewInstance

public static TaxonDescription NewInstance()
Creates a new empty taxon description instance.

See Also:
NewInstance(Taxon)

NewInstance

public static TaxonDescription NewInstance(Taxon taxon)
Creates a new taxon description instance for the given taxon. The new taxon description will be also added to the set of descriptions assigned to the given taxon.

See Also:
NewInstance()

NewInstance

public static TaxonDescription NewInstance(Taxon taxon,
                                           boolean isImageGallery)
Creates a new taxon description instance for the given taxon. The new taxon description will be also added to the set of descriptions assigned to the given taxon.

See Also:
NewInstance()

getTaxon

public Taxon getTaxon()

getGeoScopes

public Set<NamedArea> getGeoScopes()
Returns the set of named areas indicating the geospatial data where this taxon description is valid.


addGeoScope

public void addGeoScope(NamedArea geoScope)
Adds a named area to the set of named areas delimiting the geospatial area where this taxon description is valid.

Parameters:
geoScope - the named area to be additionally assigned to this taxon description
See Also:
getGeoScopes()

removeGeoScope

public void removeGeoScope(NamedArea geoScope)
Removes one element from the set of named areas delimiting the geospatial area where this taxon description is valid.

Parameters:
geoScope - the named area which should be removed
See Also:
getGeoScopes(), addGeoScope(NamedArea)

getScopes

public Set<Scope> getScopes()
Returns the set of scopes (this covers mostly life stage or sex or both) restricting the validity of this taxon description. This set of scopes should contain no more than one "sex" and one "life stage".


addScope

public void addScope(Scope scope)
Adds a scope (mostly a life stage or a sex) to the set of scopes restricting the validity of this taxon description.

Parameters:
scope - the scope to be added to this taxon description
See Also:
getScopes()

removeScope

public void removeScope(Scope scope)
Removes one element from the set of scopes restricting the validity of this taxon description.

Parameters:
scope - the scope which should be removed
See Also:
getScopes(), addScope(Scope)

getOrCreateImageTextData

public TextData getOrCreateImageTextData()
Returns the first TextData element of feature type image. If no such element exists, a new one is created.

Returns:

clone

public Object clone()
Clones this taxon description. This is a shortcut that enables to create a new instance that differs only slightly from this taxon description by modifying only some of the attributes.

Overrides:
clone in class DescriptionBase<IIdentifiableEntityCacheStrategy<TaxonDescription>>
See Also:
DescriptionBase.clone(), Object.clone()


Copyright © 2007-2012 EDIT. All Rights Reserved.