eu.etaxonomy.cdm.model.name
Class TaxonNameBase<T extends TaxonNameBase<?,?>,S extends INameCacheStrategy>

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.name.TaxonNameBase<T,S>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IIdentifiableEntity, IParsable, IReferencedEntity, IRelated, ISourceable<IdentifiableSource>, IVersionableEntity, IMatchable, Serializable, Cloneable
Direct Known Subclasses:
NonViralName, ViralName

@Entity
public abstract class TaxonNameBase<T extends TaxonNameBase<?,?>,S extends INameCacheStrategy>
extends IdentifiableEntity<S>
implements IReferencedEntity, IParsable, IRelated, IMatchable, Cloneable

The upmost (abstract) class for scientific taxon names regardless of any particular nomenclature code. The scientific taxon name does not depend on the use made of it in a publication or a treatment (taxon concept respectively potential taxon) as an "accepted" respectively "correct" (taxon) name or as a synonym.

This class corresponds partially to:

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

Field Summary
protected  String fullTitleCache
           
 
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
TaxonNameBase()
          Class constructor: creates a new empty taxon name.
TaxonNameBase(HomotypicalGroup homotypicalGroup)
          Class constructor: creates a new taxon name only containing its homotypical group.
TaxonNameBase(Rank rank)
          Class constructor: creates a new taxon name only containing its rank.
TaxonNameBase(Rank rank, HomotypicalGroup homotypicalGroup)
          Class constructor: creates a new taxon name only containing its rank and its homotypical group.
 
Method Summary
 void addBasionym(T basionym)
          Assigns a taxon name as basionym of this taxon name.
 NameRelationship addBasionym(T basionym, Reference citation, String microcitation, String ruleConsidered)
          Assigns a taxon name as basionym of this taxon name and keeps the nomenclatural rule considered for it.
 void addDescription(TaxonNameDescription description)
          Adds a new taxon name description to the set of taxon name descriptions assigned to this taxon name.
protected  void addNameRelationship(NameRelationship rel)
          Adds an existing name relationship either to the set of relations to this taxon name or to the set of relations from this taxon name.
 NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies, Reference citation, String citationMicroReference, String originalNameString, NameTypeDesignationStatus status, boolean addToAllHomotypicNames)
          Creates and adds a new name type designation to this taxon name's set of type designations.
 NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies, Reference citation, String citationMicroReference, String originalNameString, NameTypeDesignationStatus status, boolean isRejectedType, boolean isConservedType, boolean isNotDesignated, boolean addToAllHomotypicNames)
          Creates and adds a new name type designation to this taxon name's set of type designations.
 void addParsingProblem(ParserProblem problem)
          Adds a parsing problem to the list of parsing problems
 void addParsingProblems(int problems)
           
 void addRelationship(RelationshipBase relation)
          Does exactly the same as the addNameRelationship method provided that the given relationship is a name relationship.
 void addRelationshipFromName(TaxonNameBase fromName, NameRelationshipType type, Reference citation, String microCitation, String ruleConsidered)
          Creates a new name relationship from another taxon name to this taxon name and adds it both to the set of relations to this taxon name and to the set of relations from the other taxon name.
 void addRelationshipFromName(TaxonNameBase fromName, NameRelationshipType type, String ruleConsidered)
          Creates a new name relationship from another taxon name to this taxon name and adds it both to the set of relations to this taxon name and to the set of relations from the other taxon name.
 NameRelationship addRelationshipToName(TaxonNameBase toName, NameRelationshipType type, Reference citation, String microCitation, String ruleConsidered)
          Creates a new name relationship from this taxon name to another taxon name and adds it both to the set of relations from this taxon name and to the set of relations to the other taxon name.
 void addRelationshipToName(TaxonNameBase toName, NameRelationshipType type, String ruleConsidered)
          Creates a new name relationship from this taxon name to another taxon name and adds it both to the set of relations from this taxon name and to the set of relations to the other taxon name.
 void addReplacedSynonym(T replacedSynonym, Reference citation, String microcitation, String ruleConsidered)
          Assigns a taxon name as replaced synonym of this taxon name and keeps the nomenclatural rule considered for it.
 SpecimenTypeDesignation addSpecimenTypeDesignation(Specimen typeSpecimen, SpecimenTypeDesignationStatus status, Reference citation, String citationMicroReference, String originalNameString, boolean isNotDesignated, boolean addToAllHomotypicNames)
          Creates and adds a new specimen type designation to this taxon name's set of type designations.
 void addStatus(NomenclaturalStatus nomStatus)
          Adds a new nomenclatural status to this taxon name's set of nomenclatural status.
 void addTaxonBase(TaxonBase taxonBase)
          Adds a new taxon base to the set of taxon bases using this taxon name.
 boolean addTypeDesignation(TypeDesignationBase typeDesignation, boolean addToAllNames)
          Adds a type designation to this taxon name's set of type designations
 Object clone()
          Clones this taxon name.
abstract  String generateFullTitle()
           
protected abstract  Map<String,Field> getAllFields()
           
 String getAppendedPhrase()
          Returns the appended phrase string assigned to this taxon name.
 TaxonNameBase getBasionym()
          Returns the taxon name which is the basionym of this taxon name.
 Set<TaxonNameBase> getBasionyms()
          Returns the set of taxon names which are the basionyms of this taxon name.
 Reference getCitation()
           
 String getCitationString()
          Returns the complete string containing the nomenclatural reference citation and the details assigned to this taxon name.
 Set<TaxonNameDescription> getDescriptions()
          Returns the set of taxon name descriptions assigned to this taxon name.
 String getFullTitleCache()
           
 HomotypicalGroup getHomotypicalGroup()
          Returns the homotypical group to which this taxon name belongs.
 Set<NameRelationship> getNameRelations()
          Returns the set of all name relationships in which this taxon name is involved.
 Set<NameTypeDesignation> getNameTypeDesignations()
          Returns the set of name type designations assigned to this taxon name the rank of which must be above "species".
abstract  NomenclaturalCode getNomenclaturalCode()
          Returns null as the nomenclatural code that governs the construction of this taxon name since there is no specific nomenclatural code defined.
 String getNomenclaturalMicroReference()
          Returns the details string of the nomenclatural reference assigned to this taxon name.
 INomenclaturalReference getNomenclaturalReference()
          Returns the nomenclatural reference of this taxon name.
 int getParsingProblem()
          Returns an integer value indicating whether the used parser method was able to parse a string successfully into this object (0) or not (!=0).
 List<ParserProblem> getParsingProblems()
          Returns the parsing problems
 int getProblemEnds()
          Returns the integer value of the position where a parsing problem ends.
 int getProblemStarts()
          Returns the integer value of the position where a parsing problem starts.
 Rank getRank()
          Returns the taxonomic rank of this taxon name.
 String getReferenceYear()
          Returns the string containing the publication date (generally only year) of the nomenclatural reference for this taxon name, null if there is no nomenclatural reference.
 Set<NameRelationship> getRelationsFromThisName()
          Returns the set of all name relationships in which this taxon name is involved as a source ("from"-side).
 Set<NameRelationship> getRelationsToThisName()
          Returns the set of all name relationships in which this taxon name is involved as a target ("to"-side).
 Set<SpecimenTypeDesignation> getSpecimenTypeDesignations()
          Returns the set of specimen type designations that typify this taxon name.
 Set<SpecimenTypeDesignation> getSpecimenTypeDesignationsOfHomotypicalGroup()
          Returns the set of specimen type designations assigned to this taxon name.
 Set<NomenclaturalStatus> getStatus()
          Returns the set of nomenclatural status assigned to this taxon name according to its corresponding nomenclature code.
 Set<Synonym> getSynonyms()
          Returns the set of (junior) synonyms (according to any reference) that are based on this taxon name.
 List<TaggedText> getTaggedName()
           
 Set<Taxon> getTaxa()
          Returns the set of taxa ("accepted/correct" names according to any reference) that are based on this taxon name.
 Set<TaxonBase> getTaxonBases()
          Returns the set of taxon bases that refer to this taxon name.
 Set<TypeDesignationBase> getTypeDesignations()
          Returns the set of type designations assigned to this taxon name.
 boolean hasProblem()
          Returns true if any parsing problem (warning or error) exists.
 boolean hasProblem(ParserProblem problem)
          Returns true, if the specified problem exists.
 boolean isBasionymFor(TaxonNameBase newCombinationName)
          Checks whether a basionym relationship exists between fromName and toName.
abstract  boolean isCodeCompliant()
          Returns the boolean value "false" since the components of this taxon name cannot follow the rules of a corresponding nomenclatural code which is not defined for this class.
 boolean isGenus()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is the genus rank (true) or not (false).
 boolean isGroupsBasionym()
          Checks whether name is a basionym for ALL names in its homotypical group.
 boolean isHomotypic(TaxonNameBase homoTypicName)
          Returns the boolean value indicating whether a given taxon name belongs to the same homotypical group as this taxon name (true) or not (false).
 boolean isInfraGeneric()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the species rank and lower than the genus rank (true) or not (false).
 boolean isInfraSpecific()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is lower than the species rank (true) or not (false).
 boolean isOriginalCombination()
          Indicates whether this taxon name is a basionym or a replaced synonym of any other taxon name.
 boolean isProtectedFullTitleCache()
           
 boolean isSpecies()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is the species rank (true) or not (false).
 boolean isSupraGeneric()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the genus rank (true) or not (false).
 boolean isSupraSpecific()
          Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the species rank (true) or not (false).
 void makeGroupsBasionym()
          Creates a basionym relationship to all other names in this names homotypical group.
 void mergeHomotypicGroups(TaxonNameBase name)
           
 void removeAsGroupsBasionym()
          Removes basionym relationship between this name and each name in its homotypic group.
 void removeBasionyms()
          Removes the basionym relationship from the set of name relationships to this taxon name.
 void removeDescription(TaxonNameDescription description)
          Removes one element from the set of taxon name descriptions assigned to this taxon name.
 void removeNameRelationship(NameRelationship nameRelation)
          Removes one name relationship from one of both sets of name relationships in which this taxon name is involved.
 void removeParsingProblem(ParserProblem problem)
          Removes a parsing problem from the list of parsing problems.
 void removeRelationToTaxonName(TaxonNameBase toTaxonName)
           
 void removeStatus(NomenclaturalStatus nomStatus)
          Removes one element from the set of nomenclatural status of this taxon name.
 void removeTaxonBase(TaxonBase taxonBase)
          Removes one element from the set of taxon bases that refer to this taxon name.
 void removeTypeDesignation(TypeDesignationBase typeDesignation)
          Removes one element from the set of type designations assigned to this taxon name.
 void setAppendedPhrase(String appendedPhrase)
           
 void setAsGroupsBasionym()
          Creates a basionym relationship between this name and each name in its homotypic group.
 void setFullTitleCache(String fullTitleCache)
           
 void setFullTitleCache(String fullTitleCache, boolean protectCache)
           
 void setHomotypicalGroup(HomotypicalGroup homotypicalGroup)
           
 void setNomenclaturalMicroReference(String nomenclaturalMicroReference)
           
 void setNomenclaturalReference(INomenclaturalReference nomenclaturalReference)
          Assigns a nomenclatural reference to this taxon name.
 void setParsingProblem(int parsingProblem)
           
 void setProblemEnds(int end)
           
 void setProblemStarts(int start)
           
 void setProtectedFullTitleCache(boolean protectedFullTitleCache)
           
 void setRank(Rank rank)
           
 
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.IRelated
getUuid
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 
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
 

Field Detail

fullTitleCache

@NotEmpty(groups=Level2.class)
@Size(max=330)
protected String fullTitleCache
Constructor Detail

TaxonNameBase

public TaxonNameBase()
Class constructor: creates a new empty taxon name.

See Also:
TaxonNameBase(Rank), TaxonNameBase(HomotypicalGroup), TaxonNameBase(Rank, HomotypicalGroup)

TaxonNameBase

public TaxonNameBase(Rank rank)
Class constructor: creates a new taxon name only containing its rank.

Parameters:
rank - the rank to be assigned to this taxon name
See Also:
TaxonNameBase(), TaxonNameBase(HomotypicalGroup), TaxonNameBase(Rank, HomotypicalGroup)

TaxonNameBase

public TaxonNameBase(HomotypicalGroup homotypicalGroup)
Class constructor: creates a new taxon name only containing its homotypical group. The new taxon name will be also added to the set of taxon names belonging to this homotypical group.

Parameters:
homotypicalGroup - the homotypical group to which this taxon name belongs
See Also:
TaxonNameBase(), TaxonNameBase(Rank), TaxonNameBase(Rank, HomotypicalGroup)

TaxonNameBase

public TaxonNameBase(Rank rank,
                     HomotypicalGroup homotypicalGroup)
Class constructor: creates a new taxon name only containing its rank and its homotypical group. The new taxon name will be also added to the set of taxon names belonging to this homotypical group.

Parameters:
rank - the rank to be assigned to this taxon name
homotypicalGroup - the homotypical group to which this taxon name belongs
See Also:
TaxonNameBase(), TaxonNameBase(Rank), TaxonNameBase(HomotypicalGroup)
Method Detail

getAllFields

protected abstract Map<String,Field> getAllFields()

isCodeCompliant

public abstract boolean isCodeCompliant()
Returns the boolean value "false" since the components of this taxon name cannot follow the rules of a corresponding nomenclatural code which is not defined for this class. The nomenclature code depends on the concrete name subclass (BacterialName, BotanicalName, CultivarPlantName, ZoologicalName or ViralName) to which a taxon name belongs.

Returns:
false

generateFullTitle

public abstract String generateFullTitle()

getTaggedName

public List<TaggedText> getTaggedName()

getFullTitleCache

public String getFullTitleCache()

setFullTitleCache

public void setFullTitleCache(String fullTitleCache)

setFullTitleCache

public void setFullTitleCache(String fullTitleCache,
                              boolean protectCache)

isProtectedFullTitleCache

public boolean isProtectedFullTitleCache()

setProtectedFullTitleCache

public void setProtectedFullTitleCache(boolean protectedFullTitleCache)

getNameRelations

public Set<NameRelationship> getNameRelations()
Returns the set of all name relationships in which this taxon name is involved. A taxon name can be both source in some name relationships or target in some others.

See Also:
getRelationsToThisName(), getRelationsFromThisName(), addNameRelationship(NameRelationship), addRelationshipToName(TaxonNameBase, NameRelationshipType, String), addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)

addRelationshipToName

public void addRelationshipToName(TaxonNameBase toName,
                                  NameRelationshipType type,
                                  String ruleConsidered)
Creates a new name relationship from this taxon name to another taxon name and adds it both to the set of relations from this taxon name and to the set of relations to the other taxon name.

Parameters:
toName - the taxon name of the target for this new name relationship
type - the type of this new name relationship
ruleConsidered - the string which specifies the rule on which this name relationship is based
See Also:
getRelationsToThisName(), getNameRelations(), addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), addNameRelationship(NameRelationship)

addRelationshipToName

public NameRelationship addRelationshipToName(TaxonNameBase toName,
                                              NameRelationshipType type,
                                              Reference citation,
                                              String microCitation,
                                              String ruleConsidered)
Creates a new name relationship from this taxon name to another taxon name and adds it both to the set of relations from this taxon name and to the set of relations to the other taxon name.

Parameters:
toName - the taxon name of the target for this new name relationship
type - the type of this new name relationship
ruleConsidered - the string which specifies the rule on which this name relationship is based
Returns:
See Also:
getRelationsToThisName(), getNameRelations(), addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), addNameRelationship(NameRelationship)

addRelationshipFromName

public void addRelationshipFromName(TaxonNameBase fromName,
                                    NameRelationshipType type,
                                    String ruleConsidered)
Creates a new name relationship from another taxon name to this taxon name and adds it both to the set of relations to this taxon name and to the set of relations from the other taxon name.

Parameters:
fromName - the taxon name of the source for this new name relationship
type - the type of this new name relationship
ruleConsidered - the string which specifies the rule on which this name relationship is based
citation - the reference in which this relation was described
microCitation - the reference detail for this relation (e.g. page)
See Also:
getRelationsFromThisName(), getNameRelations(), addRelationshipToName(TaxonNameBase, NameRelationshipType, String), addNameRelationship(NameRelationship)

addRelationshipFromName

public void addRelationshipFromName(TaxonNameBase fromName,
                                    NameRelationshipType type,
                                    Reference citation,
                                    String microCitation,
                                    String ruleConsidered)
Creates a new name relationship from another taxon name to this taxon name and adds it both to the set of relations to this taxon name and to the set of relations from the other taxon name.

Parameters:
fromName - the taxon name of the source for this new name relationship
type - the type of this new name relationship
ruleConsidered - the string which specifies the rule on which this name relationship is based
citation - the reference in which this relation was described
microCitation - the reference detail for this relation (e.g. page)
See Also:
getRelationsFromThisName(), getNameRelations(), addRelationshipToName(TaxonNameBase, NameRelationshipType, String), addNameRelationship(NameRelationship)

addNameRelationship

protected void addNameRelationship(NameRelationship rel)
Adds an existing name relationship either to the set of relations to this taxon name or to the set of relations from this taxon name. If neither the source nor the target of the name relationship match with this taxon name no addition will be carried out.

Parameters:
rel - the name relationship to be added to one of this taxon name's name relationships sets
See Also:
getNameRelations(), addRelationshipToName(TaxonNameBase, NameRelationshipType, String), addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)

removeNameRelationship

public void removeNameRelationship(NameRelationship nameRelation)
Removes one name relationship from one of both sets of name relationships in which this taxon name is involved. The name relationship will also be removed from one of both sets belonging to the second taxon name involved. Furthermore the fromName and toName attributes of the name relationship object will be nullified.

Parameters:
nameRelation - the name relationship which should be deleted from one of both sets
See Also:
getNameRelations()

removeRelationToTaxonName

public void removeRelationToTaxonName(TaxonNameBase toTaxonName)

addRelationship

public void addRelationship(RelationshipBase relation)
Does exactly the same as the addNameRelationship method provided that the given relationship is a name relationship.

Specified by:
addRelationship in interface IRelated
Parameters:
relation - the relationship to be added to one of this taxon name's name relationships sets
See Also:
addNameRelationship(NameRelationship), getNameRelations(), NameRelationship, RelationshipBase

getRelationsFromThisName

public Set<NameRelationship> getRelationsFromThisName()
Returns the set of all name relationships in which this taxon name is involved as a source ("from"-side).

See Also:
getNameRelations(), getRelationsToThisName(), addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)

getRelationsToThisName

public Set<NameRelationship> getRelationsToThisName()
Returns the set of all name relationships in which this taxon name is involved as a target ("to"-side).

See Also:
getNameRelations(), getRelationsFromThisName(), addRelationshipToName(TaxonNameBase, NameRelationshipType, String)

getStatus

public Set<NomenclaturalStatus> getStatus()
Returns the set of nomenclatural status assigned to this taxon name according to its corresponding nomenclature code. This includes the type of the nomenclatural status and the nomenclatural code rule considered.

See Also:
NomenclaturalStatus, NomenclaturalStatusType

addStatus

public void addStatus(NomenclaturalStatus nomStatus)
Adds a new nomenclatural status to this taxon name's set of nomenclatural status.

Parameters:
nomStatus - the nomenclatural status to be added
See Also:
getStatus()

removeStatus

public void removeStatus(NomenclaturalStatus nomStatus)
Removes one element from the set of nomenclatural status of this taxon name. Type and ruleConsidered attributes of the nomenclatural status object will be nullified.

Parameters:
nomStatus - the nomenclatural status of this taxon name which should be deleted
See Also:
getStatus()

isOriginalCombination

public boolean isOriginalCombination()
Indicates whether this taxon name is a basionym or a replaced synonym of any other taxon name. Returns "true", if a basionym or a replaced synonym relationship from this taxon name to another taxon name exists, false otherwise (also in case this taxon name is the only one in the homotypical group).


getBasionym

public TaxonNameBase getBasionym()
Returns the taxon name which is the basionym of this taxon name. The basionym of a taxon name is its epithet-bringing synonym. For instance Pinus abies L. was published by Linnaeus and the botanist Karsten transferred later this taxon to the genus Picea. Therefore, Pinus abies L. is the basionym of the new combination Picea abies (L.) H. Karst. If more than one basionym exists one is choosen at radom. If no basionym exists null is returned.


getBasionyms

public Set<TaxonNameBase> getBasionyms()
Returns the set of taxon names which are the basionyms of this taxon name. The basionym of a taxon name is its epithet-bringing synonym. For instance Pinus abies L. was published by Linnaeus and the botanist Karsten transferred later this taxon to the genus Picea. Therefore, Pinus abies L. is the basionym of the new combination Picea abies (L.) H. Karst.


addBasionym

public void addBasionym(T basionym)
Assigns a taxon name as basionym of this taxon name. The basionym relationship will be added to this taxon name and to the basionym. The basionym cannot have itself a basionym. The homotypical groups of this taxon name and of the basionym will be merged.

Parameters:
basionym - the taxon name to be set as the basionym of this taxon name
See Also:
getBasionym(), #addBasionym(TaxonNameBase, String)

addBasionym

public NameRelationship addBasionym(T basionym,
                                    Reference citation,
                                    String microcitation,
                                    String ruleConsidered)
Assigns a taxon name as basionym of this taxon name and keeps the nomenclatural rule considered for it. The basionym relationship will be added to this taxon name and to the basionym. The basionym cannot have itself a basionym. The homotypical groups of this taxon name and of the basionym will be merged.

Parameters:
basionym - the taxon name to be set as the basionym of this taxon name
ruleConsidered - the string identifying the nomenclatural rule
Returns:
See Also:
getBasionym(), addBasionym(TaxonNameBase)

addReplacedSynonym

public void addReplacedSynonym(T replacedSynonym,
                               Reference citation,
                               String microcitation,
                               String ruleConsidered)
Assigns a taxon name as replaced synonym of this taxon name and keeps the nomenclatural rule considered for it. The replaced synonym relationship will be added to this taxon name and to the replaced synonym. The homotypical groups of this taxon name and of the replaced synonym will be merged.

Parameters:
basionym - the taxon name to be set as the basionym of this taxon name
ruleConsidered - the string identifying the nomenclatural rule
See Also:
getBasionym(), addBasionym(TaxonNameBase)

removeBasionyms

public void removeBasionyms()
Removes the basionym relationship from the set of name relationships to this taxon name. The same relationhip will be removed from the set of name relationships from the taxon name previously used as basionym.

See Also:
getBasionym(), addBasionym(TaxonNameBase)

getRank

public Rank getRank()
Returns the taxonomic rank of this taxon name.

See Also:
Rank

setRank

public void setRank(Rank rank)
See Also:
getRank()

getNomenclaturalReference

public INomenclaturalReference getNomenclaturalReference()
Returns the nomenclatural reference of this taxon name. The nomenclatural reference is here meant to be the one publication this taxon name was originally published in while fulfilling the formal requirements as specified by the corresponding nomenclatural code.

See Also:
INomenclaturalReference, Reference

setNomenclaturalReference

public void setNomenclaturalReference(INomenclaturalReference nomenclaturalReference)
Assigns a nomenclatural reference to this taxon name. The corresponding nomenclaturally relevant flag will be set to true as it is obviously used for nomenclatural purposes.

Throws:
IllegalArgumentException - if parameter nomenclaturalReference is not assignable from INomenclaturalReference
See Also:
getNomenclaturalReference()

getAppendedPhrase

public String getAppendedPhrase()
Returns the appended phrase string assigned to this taxon name. The appended phrase is a non-atomised addition to a name. It is not ruled by a nomenclatural code.


setAppendedPhrase

public void setAppendedPhrase(String appendedPhrase)
See Also:
getAppendedPhrase()

getNomenclaturalMicroReference

public String getNomenclaturalMicroReference()
Returns the details string of the nomenclatural reference assigned to this taxon name. The details describe the exact localisation within the publication used as nomenclature reference. These are mostly (implicitly) pages but can also be figures or tables or any other element of a publication. A nomenclatural micro reference (details) requires the existence of a nomenclatural reference.


setNomenclaturalMicroReference

public void setNomenclaturalMicroReference(String nomenclaturalMicroReference)
See Also:
getNomenclaturalMicroReference()

getParsingProblem

public int getParsingProblem()
Description copied from interface: IParsable
Returns an integer value indicating whether the used parser method was able to parse a string successfully into this object (0) or not (!=0). The the parsing was not successful the value returned defines in more detail what the problem was. The definition of these values depends on the parser that has been used for parsing.

Specified by:
getParsingProblem in interface IParsable
Returns:
the int value parsingProblem

setParsingProblem

public void setParsingProblem(int parsingProblem)
Specified by:
setParsingProblem in interface IParsable
See Also:
IParsable.getParsingProblem()

addParsingProblem

public void addParsingProblem(ParserProblem problem)
Description copied from interface: IParsable
Adds a parsing problem to the list of parsing problems

Specified by:
addParsingProblem in interface IParsable

removeParsingProblem

public void removeParsingProblem(ParserProblem problem)
Description copied from interface: IParsable
Removes a parsing problem from the list of parsing problems. If the problem is not in the list or is null, nothing happens.

Specified by:
removeParsingProblem in interface IParsable

addParsingProblems

public void addParsingProblems(int problems)
Parameters:
warnings -

hasProblem

public boolean hasProblem()
Description copied from interface: IParsable
Returns true if any parsing problem (warning or error) exists.

Specified by:
hasProblem in interface IParsable
See Also:
#getHasProblem()

hasProblem

public boolean hasProblem(ParserProblem problem)
Description copied from interface: IParsable
Returns true, if the specified problem exists. False otherwise.

Specified by:
hasProblem in interface IParsable
Returns:

getProblemStarts

public int getProblemStarts()
Description copied from interface: IParsable
Returns the integer value of the position where a parsing problem starts. If no problem exists -1 is returned. Default: -1

Specified by:
getProblemStarts in interface IParsable
See Also:
#getHasProblem()

setProblemStarts

public void setProblemStarts(int start)
Specified by:
setProblemStarts in interface IParsable
See Also:
IParsable.getProblemStarts()

getProblemEnds

public int getProblemEnds()
Description copied from interface: IParsable
Returns the integer value of the position where a parsing problem ends. If no problem exists -1 is returned. Default: -1

Specified by:
getProblemEnds in interface IParsable
See Also:
#getHasProblem()

setProblemEnds

public void setProblemEnds(int end)
Specified by:
setProblemEnds in interface IParsable
See Also:
IParsable.getProblemEnds()

getTypeDesignations

public Set<TypeDesignationBase> getTypeDesignations()
Returns the set of type designations assigned to this taxon name.

See Also:
NameTypeDesignation, SpecimenTypeDesignation

removeTypeDesignation

public void removeTypeDesignation(TypeDesignationBase typeDesignation)
Removes one element from the set of type designations assigned to this taxon name. The type designation itself will be nullified.

Parameters:
typeDesignation - the type designation which should be deleted

getSpecimenTypeDesignationsOfHomotypicalGroup

public Set<SpecimenTypeDesignation> getSpecimenTypeDesignationsOfHomotypicalGroup()
Returns the set of specimen type designations assigned to this taxon name. The rank of this taxon name is generally "species" or below. The specimen type designations include all the specimens on which the typification of this name is based (which are exclusively used to typify taxon names belonging to the same homotypical group to which this taxon name belongs) and eventually the status of these designations.

See Also:
SpecimenTypeDesignation, NameTypeDesignation, HomotypicalGroup

getNameTypeDesignations

public Set<NameTypeDesignation> getNameTypeDesignations()
Returns the set of name type designations assigned to this taxon name the rank of which must be above "species". The name type designations include all the taxon names used to typify this taxon name and eventually the rejected or conserved status of these designations.

See Also:
NameTypeDesignation, SpecimenTypeDesignation

addNameTypeDesignation

public NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies,
                                                  Reference citation,
                                                  String citationMicroReference,
                                                  String originalNameString,
                                                  NameTypeDesignationStatus status,
                                                  boolean isRejectedType,
                                                  boolean isConservedType,
                                                  boolean isNotDesignated,
                                                  boolean addToAllHomotypicNames)
Creates and adds a new name type designation to this taxon name's set of type designations.

Parameters:
typeSpecies - the taxon name to be used as type of this taxon name
citation - the reference for this new designation
citationMicroReference - the string with the details (generally pages) within the reference
originalNameString - the taxon name string used in the reference to assert this designation
isRejectedType - the boolean status for a rejected name type designation
isConservedType - the boolean status for a conserved name type designation
isLectoType - the boolean status for a lectotype name type designation
isNotDesignated - the boolean status for a name type designation without name type
addToAllHomotypicNames - the boolean indicating whether the name type designation should be added to all taxon names of the homotypical group this taxon name belongs to
Returns:
See Also:
getNameTypeDesignations(), NameTypeDesignation, TypeDesignationBase.isNotDesignated()

addNameTypeDesignation

public NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies,
                                                  Reference citation,
                                                  String citationMicroReference,
                                                  String originalNameString,
                                                  NameTypeDesignationStatus status,
                                                  boolean addToAllHomotypicNames)
Creates and adds a new name type designation to this taxon name's set of type designations.

Parameters:
typeSpecies - the taxon name to be used as type of this taxon name
citation - the reference for this new designation
citationMicroReference - the string with the details (generally pages) within the reference
originalNameString - the taxon name string used in the reference to assert this designation
status - the name type designation status
addToAllHomotypicNames - the boolean indicating whether the name type designation should be added to all taxon names of the homotypical group this taxon name belongs to
Returns:
See Also:
getNameTypeDesignations(), NameTypeDesignation, TypeDesignationBase.isNotDesignated()

getSpecimenTypeDesignations

public Set<SpecimenTypeDesignation> getSpecimenTypeDesignations()
Returns the set of specimen type designations that typify this taxon name.


addSpecimenTypeDesignation

public SpecimenTypeDesignation addSpecimenTypeDesignation(Specimen typeSpecimen,
                                                          SpecimenTypeDesignationStatus status,
                                                          Reference citation,
                                                          String citationMicroReference,
                                                          String originalNameString,
                                                          boolean isNotDesignated,
                                                          boolean addToAllHomotypicNames)
Creates and adds a new specimen type designation to this taxon name's set of type designations.

Parameters:
typeSpecimen - the specimen to be used as a type for this taxon name
status - the specimen type designation status
citation - the reference for this new specimen type designation
citationMicroReference - the string with the details (generally pages) within the reference
originalNameString - the taxon name used in the reference to assert this designation
isNotDesignated - the boolean status for a specimen type designation without specimen type
addToAllHomotypicNames - the boolean indicating whether the specimen type designation should be added to all taxon names of the homotypical group the typified taxon name belongs to
Returns:
See Also:
getSpecimenTypeDesignations(), SpecimenTypeDesignationStatus, SpecimenTypeDesignation, TypeDesignationBase.isNotDesignated()

addTypeDesignation

public boolean addTypeDesignation(TypeDesignationBase typeDesignation,
                                  boolean addToAllNames)
Adds a type designation to this taxon name's set of type designations

Parameters:
typeDesignation - the typeDesignation to be added to this taxon name
addToAllNames - the boolean indicating whether the type designation should be added to all taxon names of the homotypical group the typified taxon name belongs to
Returns:
true if the operation was succesful
Throws:
IllegalArgumentException - if the type designation already has typified names, an exception is thrown. We do this to prevent a type designation to be used for multiple taxon names.

getHomotypicalGroup

public HomotypicalGroup getHomotypicalGroup()
Returns the homotypical group to which this taxon name belongs. A homotypical group represents all taxon names that share the same types.

See Also:
HomotypicalGroup

setHomotypicalGroup

public void setHomotypicalGroup(HomotypicalGroup homotypicalGroup)

getCitation

public Reference getCitation()
Specified by:
getCitation in interface IReferencedEntity
See Also:
getNomenclaturalReference()

getCitationString

public String getCitationString()
Returns the complete string containing the nomenclatural reference citation and the details assigned to this taxon name.

Returns:
the string containing the nomenclatural reference of this taxon name
See Also:
eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation(), getNomenclaturalReference(), getNomenclaturalMicroReference()

getParsingProblems

public List<ParserProblem> getParsingProblems()
Returns the parsing problems

Specified by:
getParsingProblems in interface IParsable
Returns:

getReferenceYear

public String getReferenceYear()
Returns the string containing the publication date (generally only year) of the nomenclatural reference for this taxon name, null if there is no nomenclatural reference.

Returns:
the string containing the publication date of this taxon name
See Also:
INomenclaturalReference.getYear()

getTaxonBases

public Set<TaxonBase> getTaxonBases()
Returns the set of taxon bases that refer to this taxon name. In this context a taxon base means the use of a taxon name by a reference either as a taxon ("accepted/correct" name) or as a (junior) synonym. A taxon name can be used by several distinct references but only once within a taxonomic treatment (identified by one reference).

See Also:
getTaxa(), getSynonyms()

addTaxonBase

public void addTaxonBase(TaxonBase taxonBase)
Adds a new taxon base to the set of taxon bases using this taxon name.

Parameters:
taxonBase - the taxon base to be added
See Also:
getTaxonBases(), removeTaxonBase(TaxonBase)

removeTaxonBase

public void removeTaxonBase(TaxonBase taxonBase)
Removes one element from the set of taxon bases that refer to this taxon name.

Parameters:
taxonBase - the taxon base which should be removed from the corresponding set
See Also:
getTaxonBases(), addTaxonBase(TaxonBase)

getTaxa

public Set<Taxon> getTaxa()
Returns the set of taxa ("accepted/correct" names according to any reference) that are based on this taxon name. This set is a subset of the set returned by getTaxonBases().

See Also:
Taxon, getTaxonBases(), getSynonyms()

getSynonyms

public Set<Synonym> getSynonyms()
Returns the set of (junior) synonyms (according to any reference) that are based on this taxon name. This set is a subset of the set returned by getTaxonBases().

See Also:
Synonym, getTaxonBases(), getTaxa()

getDescriptions

public Set<TaxonNameDescription> getDescriptions()
Returns the set of taxon name descriptions assigned to this taxon name. A taxon name description is a piece of information concerning the taxon name like for instance the content of its first publication (protolog) or a picture of this publication.

See Also:
addDescription(TaxonNameDescription), removeDescription(TaxonNameDescription), TaxonNameDescription

addDescription

public void addDescription(TaxonNameDescription description)
Adds a new taxon name description to the set of taxon name descriptions assigned to this taxon name. The content of the taxonName attribute of the taxon name description itself will be replaced with this taxon name.

Parameters:
description - the taxon name description to be added
See Also:
getDescriptions(), removeDescription(TaxonNameDescription)

removeDescription

public void removeDescription(TaxonNameDescription description)
Removes one element from the set of taxon name descriptions assigned to this taxon name. The content of the taxonName attribute of the description itself will be set to "null".

Parameters:
description - the taxon name description which should be removed
See Also:
getDescriptions(), addDescription(TaxonNameDescription), TaxonNameDescription.getTaxonName()

mergeHomotypicGroups

public void mergeHomotypicGroups(TaxonNameBase name)

isHomotypic

public boolean isHomotypic(TaxonNameBase homoTypicName)
Returns the boolean value indicating whether a given taxon name belongs to the same homotypical group as this taxon name (true) or not (false). Returns "true" only if the homotypical groups of both taxon names exist and if they are identical.

Parameters:
homoTypicName - the taxon name the homotypical group of which is to be checked
Returns:
the boolean value of the check
See Also:
HomotypicalGroup

isGroupsBasionym

public boolean isGroupsBasionym()
Checks whether name is a basionym for ALL names in its homotypical group. Returns false if there are no other names in the group

Parameters:
name -
Returns:

isBasionymFor

public boolean isBasionymFor(TaxonNameBase newCombinationName)
Checks whether a basionym relationship exists between fromName and toName.

Parameters:
fromName -
toName -
Returns:

makeGroupsBasionym

public void makeGroupsBasionym()
Creates a basionym relationship to all other names in this names homotypical group.

See Also:
HomotypicalGroup.setGroupBasionym(TaxonNameBase basionymName)

isSupraGeneric

public boolean isSupraGeneric()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the genus rank (true) or not (false). Suprageneric non viral names are monomials. Returns false if rank is null.

See Also:
isGenus(), isInfraGeneric(), isSpecies(), isInfraSpecific()

isGenus

public boolean isGenus()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is the genus rank (true) or not (false). Non viral names with genus rank are monomials. Returns false if rank is null.

See Also:
isSupraGeneric(), isInfraGeneric(), isSpecies(), isInfraSpecific()

isInfraGeneric

public boolean isInfraGeneric()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the species rank and lower than the genus rank (true) or not (false). Infrageneric non viral names are binomials. Returns false if rank is null.

See Also:
isSupraGeneric(), isGenus(), isSpecies(), isInfraSpecific()

isSupraSpecific

public boolean isSupraSpecific()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is higher than the species rank (true) or not (false). Returns false if rank is null.

See Also:
isGenus(), isInfraGeneric(), isSpecies(), isInfraSpecific()

isSpecies

public boolean isSpecies()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is the species rank (true) or not (false). Non viral names with species rank are binomials. Returns false if rank is null.

See Also:
isSupraGeneric(), isGenus(), isInfraGeneric(), isInfraSpecific()

isInfraSpecific

public boolean isInfraSpecific()
Returns the boolean value indicating whether the taxonomic rank of this taxon name is lower than the species rank (true) or not (false). Infraspecific non viral names are trinomials. Returns false if rank is null.

See Also:
isSupraGeneric(), isGenus(), isInfraGeneric(), isSpecies()

getNomenclaturalCode

public abstract NomenclaturalCode getNomenclaturalCode()
Returns null as the nomenclatural code that governs the construction of this taxon name since there is no specific nomenclatural code defined. The real implementention takes place in the subclasses ViralName, BacterialName, BotanicalName, CultivarPlantName and ZoologicalName. Each taxon name is governed by one and only one nomenclatural code.

Returns:
null
See Also:
isCodeCompliant(), #getHasProblem()

setAsGroupsBasionym

public void setAsGroupsBasionym()
Creates a basionym relationship between this name and each name in its homotypic group.

Parameters:
basionymName -

removeAsGroupsBasionym

public void removeAsGroupsBasionym()
Removes basionym relationship between this name and each name in its homotypic group.

Parameters:
basionymName -

clone

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

Usages of this name in a taxon concept are not cloned.
The name gets a newly created homotypical group
(CAUTION: this behaviour needs to be discussed and may change in future).

Name descriptions are cloned and not reused.
Type designations are cloned and not reused.

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


Copyright © 2007-2013 EDIT. All Rights Reserved.