eu.etaxonomy.cdm.model.description
Class IndividualsAssociation

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.description.DescriptionElementBase
                  extended by eu.etaxonomy.cdm.model.description.IndividualsAssociation
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IMultiLanguageTextHolder, ISourceable<DescriptionElementSource>, IVersionableEntity, IModifiable, Serializable, Cloneable

@Entity
@Indexed(index="eu.etaxonomy.cdm.model.description.DescriptionElementBase")
public class IndividualsAssociation
extends DescriptionElementBase
implements IMultiLanguageTextHolder, Cloneable

This class represents associations between the described specimen or observation and a second one (for instance a host). Only specimen descriptions may contain individuals association. The association itself is described by a multilanguage text.

This class corresponds (partially) to NaturalLanguageDescriptionType according to the SDD schema.

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

Field Summary
 
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 IndividualsAssociation()
          Class constructor: creates a new empty individuals association instance.
 
Method Summary
 void addDescription(LanguageString description)
          Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDescription method instead
 void addDescription(String text, Language language)
          Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDescription method instead
 Object clone()
          Clones this individuals association.
 SpecimenOrObservationBase getAssociatedSpecimenOrObservation()
          Returns the second specimen or observation involved in this individuals association.
 Map<Language,LanguageString> getDescription()
          Returns the multilanguage text used to describe this individuals association.
static IndividualsAssociation NewInstance()
          Creates a new empty individuals association instance.
static IndividualsAssociation NewInstance(SpecimenOrObservationBase specimen)
          Creates a new empty individuals association instance.
 void putDescription(LanguageString description)
          Adds a translated text in a particular language to the multilanguage text used to describe this individuals association.
 void putDescription(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 describe this individuals association.
 void removeDescription(Language language)
          Removes from the multilanguage text used to describe this individuals association the one language string with the given language.
 void setAssociatedSpecimenOrObservation(SpecimenOrObservationBase associatedSpecimenOrObservation)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.description.DescriptionElementBase
addMedia, addModifier, addModifyingText, addModifyingText, addSource, addSource, addSource, clone, getFeature, getInDescription, getMedia, getModifiers, getModifiers, getModifyingText, getSources, makeModifierMap, putModifyingText, putModifyingText, removeMedia, removeModifier, removeModifyingText, removeSource, setFeature, setInDescription
 
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, toString
 
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

IndividualsAssociation

protected IndividualsAssociation()
Class constructor: creates a new empty individuals association instance.

Method Detail

NewInstance

public static IndividualsAssociation NewInstance()
Creates a new empty individuals association instance.


NewInstance

public static IndividualsAssociation NewInstance(SpecimenOrObservationBase specimen)
Creates a new empty individuals association instance.


getAssociatedSpecimenOrObservation

public SpecimenOrObservationBase getAssociatedSpecimenOrObservation()
Returns the second specimen or observation involved in this individuals association. The first specimen or observation is the specimen or observation described in the corresponding specimen description.


setAssociatedSpecimenOrObservation

public void setAssociatedSpecimenOrObservation(SpecimenOrObservationBase associatedSpecimenOrObservation)
See Also:
getAssociatedSpecimenOrObservation()

getDescription

public Map<Language,LanguageString> getDescription()
Returns the multilanguage text used to describe this individuals association. The different language strings contained in the multilanguage text should all have the same meaning.


addDescription

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

Adds a translated text in a particular language to the multilanguage text used to describe this individuals association.

Parameters:
description - the language string describing the individuals association in a particular language
See Also:
getDescription(), putDescription(Language, String)

putDescription

public void putDescription(LanguageString description)
Adds a translated text in a particular language to the multilanguage text used to describe this individuals association.

Parameters:
description - the language string describing the individuals association in a particular language
See Also:
getDescription(), putDescription(Language, String)

putDescription

public void putDescription(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 describe this individuals association.

Parameters:
text - the string describing the individuals association in a particular language
language - the language in which the text string is formulated
See Also:
getDescription(), putDescription(LanguageString)

addDescription

public void addDescription(String text,
                           Language language)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putDescription 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 describe this individuals association.

Parameters:
text - the string describing the individuals association in a particular language
language - the language in which the text string is formulated
See Also:
getDescription(), putDescription(LanguageString)

removeDescription

public void removeDescription(Language language)
Removes from the multilanguage text used to describe this individuals association the one language string with the given language.

Parameters:
language - the language in which the language string to be removed has been formulated
See Also:
getDescription()

clone

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

Overrides:
clone in class DescriptionElementBase
See Also:
DescriptionElementBase.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.