eu.etaxonomy.cdm.model.description
Class DescriptionBase<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.description.DescriptionBase<S>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IIdentifiableEntity, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable
Direct Known Subclasses:
SpecimenDescription, TaxonDescription, TaxonNameDescription

@Entity
@ClassBridges(value={@ClassBridge(impl=DescriptionBaseClassBridge.class),@ClassBridge(impl=GroupByTaxonClassBridge.class)})
public abstract class DescriptionBase<S extends IIdentifiableEntityCacheStrategy>
extends IdentifiableEntity<S>

The upmost (abstract) class for a description as a whole (with possibly several elementary information data) for a specimen, a taxon or even a taxon name.

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
DescriptionBase()
           
 
Method Summary
 void addDescribedSpecimenOrObservation(SpecimenOrObservationBase describedSpecimenOrObservation)
          Adds an existing specimen or observation to the set of specimens or observations described in this description or which this description is based on.
Due to bidirectionality if this description is a specimen description, this description will also be added to the set of specimen descriptions corresponding to the given additional specimen or observation.
 void addDescriptionSource(Reference descriptionSource)
          Deprecated. 
 void addElement(DescriptionElementBase element)
          Adds an existing elementary description to the set of elementary description data which constitute this description as a whole.
 void addFeature(Feature feature)
          Adds an existing feature to the set of descriptiveSystem used as features for this description.
 boolean addWorkingSet(WorkingSet workingSet)
           
 Object clone()
          Clones this descriptioin.
 Set<SpecimenOrObservationBase> getDescribedSpecimenOrObservations()
          Returns the set of specimens or observations involved in this description as a whole.
 Set<Reference> getDescriptionSources()
          Deprecated. 
 Set<Feature> getDescriptiveSystem()
          Returns the set of feature used as features/characters/descriptors for this description.
 Set<DescriptionElementBase> getElements()
          Returns the set of elementary description data which constitute this description as a whole.
 Set<WorkingSet> getWorkingSets()
           
 boolean hasStructuredData()
           
 boolean isImageGallery()
           
 void removeDescribedSpecimenOrObservation(SpecimenOrObservationBase describedSpecimenOrObservation)
          Removes one element from the set of specimens or observations involved in this description.
Due to bidirectionality if this description is a specimen description, this description will also be removed from the set of specimen descriptions corresponding to the given specimen or observation.
 void removeDescriptionSource(Reference descriptionSource)
          Deprecated. 
 void removeElement(DescriptionElementBase element)
          Removes one element from the set of elementary description data which constitute this description as a whole.
 void removeFeature(Feature feature)
          Removes one element from the set of features used as features for this description.
 boolean removeWorkingSet(WorkingSet workingSet)
           
 void setDescriptiveSystem(Set<Feature> descriptiveSystem)
           
 void setImageGallery(boolean imageGallery)
           
protected  void setWorkingSets(Set<WorkingSet> workingSets)
           
 int size()
          Returns the number of elementary description data which constitute this description as a whole.
 
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, 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
 

Constructor Detail

DescriptionBase

public DescriptionBase()
Method Detail

getDescribedSpecimenOrObservations

public Set<SpecimenOrObservationBase> getDescribedSpecimenOrObservations()
Returns the set of specimens or observations involved in this description as a whole. Taxon descriptions are also often based on concrete specimens or observations. For taxon name descriptions this set should be empty.

See Also:
#addDescribedSpecimenOrObservations(SpecimenOrObservationBase), #removeDescribedSpecimenOrObservations(SpecimenOrObservationBase)

addDescribedSpecimenOrObservation

public void addDescribedSpecimenOrObservation(SpecimenOrObservationBase describedSpecimenOrObservation)
Adds an existing specimen or observation to the set of specimens or observations described in this description or which this description is based on.
Due to bidirectionality if this description is a specimen description, this description will also be added to the set of specimen descriptions corresponding to the given additional specimen or observation.

Parameters:
describedSpecimenOrObservation - the specimen or observation to be added to this description
See Also:
getDescribedSpecimenOrObservations(), SpecimenOrObservationBase.addDescription(DescriptionBase)

removeDescribedSpecimenOrObservation

public void removeDescribedSpecimenOrObservation(SpecimenOrObservationBase describedSpecimenOrObservation)
Removes one element from the set of specimens or observations involved in this description.
Due to bidirectionality if this description is a specimen description, this description will also be removed from the set of specimen descriptions corresponding to the given specimen or observation.

Parameters:
describedSpecimenOrObservation - the specimen or observation which should be removed
See Also:
getDescribedSpecimenOrObservations(), #addDescribedSpecimenOrObservations(SpecimenOrObservationBase), SpecimenOrObservationBase.removeDescription(DescriptionBase)

getDescriptionSources

@Deprecated
public Set<Reference> getDescriptionSources()
Deprecated. 

Returns the set of references used as sources for this description as a whole. More than one source can be used for a general description without assigning for each data element of the description one of those sources.

See Also:
addDescriptionSource(Reference), removeDescriptionSource(Reference)

addDescriptionSource

@Deprecated
public void addDescriptionSource(Reference descriptionSource)
Deprecated. 

Adds an existing reference to the set of references used as sources for this description.

Parameters:
descriptionSource - the reference source to be added to this description
See Also:
getDescriptionSources()

removeDescriptionSource

@Deprecated
public void removeDescriptionSource(Reference descriptionSource)
Deprecated. 

Removes one element from the set of references used as sources for this description.

Parameters:
descriptionSource - the reference source which should be deleted
See Also:
getDescriptionSources(), addDescriptionSource(Reference)

getDescriptiveSystem

public Set<Feature> getDescriptiveSystem()
Returns the set of feature used as features/characters/descriptors for this description.

See Also:
addFeature(Feature), removeFeature(Feature)

setDescriptiveSystem

public void setDescriptiveSystem(Set<Feature> descriptiveSystem)
See Also:
getDescriptiveSystem(), #addDescriptiveSystem(Feature)

addFeature

public void addFeature(Feature feature)
Adds an existing feature to the set of descriptiveSystem used as features for this description.

Parameters:
feature - the feature to be added to the descriptive system
See Also:
getDescriptiveSystem()

removeFeature

public void removeFeature(Feature feature)
Removes one element from the set of features used as features for this description.

Parameters:
feature - the feature which should be deleted
See Also:
getDescriptiveSystem(), addFeature(Feature)

getElements

public Set<DescriptionElementBase> getElements()
Returns the set of elementary description data which constitute this description as a whole.

See Also:
addElement(DescriptionElementBase), removeElement(DescriptionElementBase)

addElement

public void addElement(DescriptionElementBase element)
Adds an existing elementary description to the set of elementary description data which constitute this description as a whole. If the elementary descriptions already belongs to a description it is first removed from the old description.

Parameters:
element - the elementary description to be added to this description
See Also:
getDescriptionSources()

removeElement

public void removeElement(DescriptionElementBase element)
Removes one element from the set of elementary description data which constitute this description as a whole.

Parameters:
element - the reference source which should be deleted
See Also:
getElements(), addElement(DescriptionElementBase)

size

public int size()
Returns the number of elementary description data which constitute this description as a whole. This is the cardinality of the set of elementary description data.

Returns:
the number of elements of the elementary description data set
See Also:
getElements()

isImageGallery

public boolean isImageGallery()
Returns:
the imageGallery

setImageGallery

public void setImageGallery(boolean imageGallery)
Parameters:
imageGallery - the imageGallery to set

getWorkingSets

public Set<WorkingSet> getWorkingSets()

addWorkingSet

public boolean addWorkingSet(WorkingSet workingSet)

removeWorkingSet

public boolean removeWorkingSet(WorkingSet workingSet)

setWorkingSets

protected void setWorkingSets(Set<WorkingSet> workingSets)

hasStructuredData

public boolean hasStructuredData()

clone

public Object clone()
Clones this descriptioin. This is a shortcut that enables to create a new instance that differs only slightly from this description by modifying only some of the attributes.
Usages of this name in a taxon concept are NOT cloned.
The name is added to the same homotypical group as the original name (CAUTION: this behaviour needs to be discussed and may change in future).
Name descriptions are cloned as XXX.
Type designations are cloned as XXX.
Name relation are cloned as XXX.

Overrides:
clone in class IdentifiableEntity<S extends IIdentifiableEntityCacheStrategy>
See Also:
eu.etaxonomy.cdm.model.media.IdentifiableEntity#clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.