eu.etaxonomy.cdm.model.name
Class NonViralName<T extends NonViralName>

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,INonViralNameCacheStrategy>
                      extended by eu.etaxonomy.cdm.model.name.NonViralName<T>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IIdentifiableEntity, IParsable, IReferencedEntity, IRelated, ISourceable<IdentifiableSource>, IVersionableEntity, IMatchable, Serializable, Cloneable
Direct Known Subclasses:
BacterialName, BotanicalName, ZoologicalName

@Entity
@Indexed(index="eu.etaxonomy.cdm.model.name.TaxonNameBase")
@Configurable
@CorrectEpithetsForRank(groups=Level2.class)
@MustHaveAuthority(groups=Level2.class)
@NoDuplicateNames(groups=Level3.class)
public class NonViralName<T extends NonViralName>
extends TaxonNameBase<T,INonViralNameCacheStrategy>
implements Cloneable

The taxon name class for all non viral taxa. Parenthetical authorship is derived from basionym relationship. The scientific name including author strings and maybe year can be stored as a string in the inherited titleCache attribute. The year itself is an information obtained from the nomenclatural reference. The scientific name string without author strings and year can be stored in the nameCache attribute.

This class corresponds partially to:

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

Field Summary
protected  boolean protectedAuthorshipCache
           
protected  boolean protectedNameCache
           
 
Fields inherited from class eu.etaxonomy.cdm.model.name.TaxonNameBase
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
protected NonViralName()
          Class constructor: creates a new non viral taxon name instance only containing the default cache strategy.
protected NonViralName(Rank rank, HomotypicalGroup homotypicalGroup)
          Class constructor: creates a new non viral taxon name instance only containing its rank, its homotypical group and the default cache strategy.
protected NonViralName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup)
          Class constructor: creates a new non viral taxon name instance containing its rank, its homotypical group, its scientific name components, its author(team), its nomenclatural reference and the default cache strategy.
 
Method Summary
 HybridRelationship addHybridChild(NonViralName childName, HybridRelationshipType type, String ruleConsidered)
          Creates a new hybrid relationship to this botanical name.
 HybridRelationship addHybridParent(NonViralName parentName, HybridRelationshipType type, String ruleConsidered)
          Creates a new hybrid relationship to this botanical name.
protected  void addHybridRelationship(HybridRelationship rel)
          Adds the given hybrid relationship to the set of hybrid relationships of both non-viral names involved in this hybrid relationship.
 void addRelationship(RelationshipBase relation)
          Deprecated. to be used by RelationshipBase only
 Object clone()
          Clones this non-viral name.
 String computeBasionymAuthorNomenclaturalTitle()
          Shortcut.
 String computeCombinationAuthorNomenclaturalTitle()
          Shortcut.
 String computeExBasionymAuthorNomenclaturalTitle()
          Shortcut.
 String computeExCombinationAuthorNomenclaturalTitle()
          Shortcut.
 String generateAuthorship()
          Generates and returns a concatenated and formated authorteams string including basionym and combination authors of this non viral taxon name according to the strategy defined in INonViralNameCacheStrategy.
 String generateFullTitle()
          Generates and returns the string with the scientific name of this non viral taxon name including author strings and maybe year according to the strategy defined in INonViralNameCacheStrategy.
protected  String generateNameCache()
          Generates the composed name string of this non viral taxon name without author strings or year according to the strategy defined in INonViralNameCacheStrategy.
protected  Map<String,Field> getAllFields()
           
 String getAuthorshipCache()
          Returns the concatenated and formated authorteams string including basionym and combination authors of this non viral taxon name.
 INomenclaturalAuthor getBasionymAuthorTeam()
          Returns the author (team) that published the original combination on which this non viral taxon name is nomenclaturally based.
 Set<HybridRelationship> getChildRelationships()
          Deprecated. use getHybridChildRelations() instead. Will be removed in higher versions.
 INomenclaturalAuthor getCombinationAuthorTeam()
          Returns the author (team) that published this non viral taxon name.
 INomenclaturalAuthor getExBasionymAuthorTeam()
          Returns the author (team) that contributed to the publication of the original combination this non viral taxon name is based on.
 INomenclaturalAuthor getExCombinationAuthorTeam()
          Returns the author (team) that contributed to the publication of this non viral taxon name as generally stated by the combination author (team) itself.
An ex-author(-team) is an author(-team) to whom a taxon name was ascribed although it is not the author(-team) of a valid publication (for instance without the validating description or diagnosis in case of a name for a new taxon).
 String getFullTitleCache()
           
 String getGenusOrUninomial()
          Returns either the scientific name string (without authorship) for this non viral taxon name if its rank is genus or higher (monomial) or the string for the genus part of it if its rank is lower than genus (bi- or trinomial).
 Set<HybridRelationship> getHybridChildRelations()
          Returns the set of all hybrid relationships in which this taxon name is involved as a child.
 Set<HybridRelationship> getHybridParentRelations()
          Returns the set of all hybrid relationships in which this taxon name is involved as a parent.
 String getInfraGenericEpithet()
          Returns the genus subdivision epithet string (infrageneric part) for this non viral taxon name if its rank is infrageneric (lower than genus and higher than species aggregate: binomial).
 String getInfraSpecificEpithet()
          Returns the species subdivision epithet string (infraspecific part) for this non viral taxon name if its rank is infraspecific (lower than species: trinomial).
 String getNameCache()
          Returns or generates the nameCache (scientific name without author strings and year) string for this non viral taxon name.
 NomenclaturalCode getNomenclaturalCode()
          Returns null as nomenclatural code that governs the construction of this non viral taxon name since there is no specific nomenclatural code defined.
 List<HybridRelationship> getOrderedChildRelationships()
          Returns the hybrid child relationships ordered by relationship type, or if equal by title cache of the related names.
 Set<HybridRelationship> getParentRelationships()
          Deprecated. use getHybridParentRelations() instead. Will be removed in higher versions.
 String getSpecificEpithet()
          Returns the species epithet string for this non viral taxon name if its rank is species aggregate or lower (bi- or trinomial).
 String getTitleCache()
           
 boolean hasAuthors()
          Tests if the given name has any authors.
protected  void initListener()
           
 boolean isAutonym()
          Needs to be implemented by those classes that handle autonyms (e.g.
 boolean isBinomHybrid()
          Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an interspecific hybrid (true) or not (false).
 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 isHybridFormula()
          Returns the boolean value of the flag indicating whether the name of this botanical taxon name is a hybrid formula (true) or not (false).
 boolean isMonomHybrid()
          Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an intergeneric hybrid (true) or not (false).
 boolean isProtectedAuthorshipCache()
          Returns the boolean value of the flag intended to protect (true) or not (false) the authorshipCache (complete authorship string) of this non viral taxon name.
 boolean isProtectedNameCache()
          Returns the boolean value of the flag intended to protect (true) or not (false) the nameCache (scientific name without author strings and year) string of this non viral taxon name.
 boolean isTrinomHybrid()
          Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an infraspecific hybrid (true) or not (false).
static NonViralName NewInstance(Rank rank)
          Creates a new non viral taxon name instance only containing its rank and the default cache strategy.
static NonViralName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup)
          Creates a new non viral taxon name instance only containing its rank, its homotypical group and the default cache strategy.
 void removeHybridChild(NonViralName child)
           
 void removeHybridParent(NonViralName parent)
           
 void removeHybridRelationship(HybridRelationship hybridRelation)
          Removes one hybrid relationship from the set of hybrid relationships in which this botanical taxon name is involved.
 void setAuthorshipCache(String authorshipCache)
          Assigns an authorshipCache string to this non viral taxon name.
 void setAuthorshipCache(String authorshipCache, boolean protectedAuthorshipCache)
          Assigns an authorshipCache string to this non viral taxon name.
 void setBasionymAuthorTeam(INomenclaturalAuthor basionymAuthorTeam)
           
 void setBinomHybrid(boolean binomHybrid)
           
 void setCombinationAuthorTeam(INomenclaturalAuthor combinationAuthorTeam)
           
 void setExBasionymAuthorTeam(INomenclaturalAuthor exBasionymAuthorTeam)
           
 void setExCombinationAuthorTeam(INomenclaturalAuthor exCombinationAuthorTeam)
           
 void setGenusOrUninomial(String genusOrUninomial)
           
 void setHybridFormula(boolean hybridFormula)
           
 void setInfraGenericEpithet(String infraGenericEpithet)
           
 void setInfraSpecificEpithet(String infraSpecificEpithet)
           
 void setMonomHybrid(boolean monomHybrid)
           
 void setNameCache(String nameCache)
          Assigns a nameCache string to this non viral taxon name and protects it from being overwritten.
 void setNameCache(String nameCache, boolean protectedNameCache)
          Assigns a nameCache string to this non viral taxon name and protects it from being overwritten.
 void setProtectedAuthorshipCache(boolean protectedAuthorshipCache)
           
 void setProtectedNameCache(boolean protectedNameCache)
           
 void setSpecificEpithet(String specificEpithet)
           
 void setTitleCache(String titleCache, boolean protectCache)
           
 void setTrinomHybrid(boolean trinomHybrid)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.name.TaxonNameBase
addBasionym, addBasionym, addDescription, addNameRelationship, addNameTypeDesignation, addNameTypeDesignation, addParsingProblem, addParsingProblems, addRelationshipFromName, addRelationshipFromName, addRelationshipToName, addRelationshipToName, addReplacedSynonym, addSpecimenTypeDesignation, addStatus, addTaxonBase, addTypeDesignation, getAppendedPhrase, getBasionym, getBasionyms, getCitation, getCitationString, getDescriptions, getHomotypicalGroup, getNameRelations, getNameTypeDesignations, getNomenclaturalMicroReference, getNomenclaturalReference, getParsingProblem, getParsingProblems, getProblemEnds, getProblemStarts, getRank, getReferenceYear, getRelationsFromThisName, getRelationsToThisName, getSpecimenTypeDesignations, getSpecimenTypeDesignationsOfHomotypicalGroup, getStatus, getSynonyms, getTaggedName, getTaxa, getTaxonBases, getTypeDesignations, hasProblem, hasProblem, isBasionymFor, isGenus, isGroupsBasionym, isHomotypic, isInfraGeneric, isInfraSpecific, isOriginalCombination, isProtectedFullTitleCache, isSpecies, isSupraGeneric, isSupraSpecific, makeGroupsBasionym, mergeHomotypicGroups, removeAsGroupsBasionym, removeBasionyms, removeDescription, removeNameRelationship, removeParsingProblem, removeRelationToTaxonName, removeStatus, removeTaxonBase, removeTypeDesignation, setAppendedPhrase, setAsGroupsBasionym, setFullTitleCache, setFullTitleCache, setHomotypicalGroup, setNomenclaturalMicroReference, setNomenclaturalReference, setParsingProblem, setProblemEnds, setProblemStarts, setProtectedFullTitleCache, setRank
 
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, getTruncatedCache, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, 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

protectedNameCache

protected boolean protectedNameCache

protectedAuthorshipCache

protected boolean protectedAuthorshipCache
Constructor Detail

NonViralName

protected NonViralName()
Class constructor: creates a new non viral taxon name instance only containing the default cache strategy.

See Also:
NonViralName(Rank, HomotypicalGroup), #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, Reference, String, HomotypicalGroup), INonViralNameCacheStrategy, INameCacheStrategy, IIdentifiableEntityCacheStrategy

NonViralName

protected NonViralName(Rank rank,
                       HomotypicalGroup homotypicalGroup)
Class constructor: creates a new non viral taxon name instance only containing its rank, its homotypical group and the default cache strategy. The new non viral taxon name instance will be also added to the set of non viral taxon names belonging to this homotypical group.

Parameters:
rank - the rank to be assigned to this non viral taxon name
homotypicalGroup - the homotypical group to which this non viral taxon name belongs
See Also:
NonViralName(), #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, Reference, String, HomotypicalGroup), NewInstance(Rank, HomotypicalGroup), INonViralNameCacheStrategy, INameCacheStrategy, IIdentifiableEntityCacheStrategy

NonViralName

protected NonViralName(Rank rank,
                       String genusOrUninomial,
                       String infraGenericEpithet,
                       String specificEpithet,
                       String infraSpecificEpithet,
                       TeamOrPersonBase combinationAuthorTeam,
                       INomenclaturalReference nomenclaturalReference,
                       String nomenclMicroRef,
                       HomotypicalGroup homotypicalGroup)
Class constructor: creates a new non viral taxon name instance containing its rank, its homotypical group, its scientific name components, its author(team), its nomenclatural reference and the default cache strategy. The new non viral taxon name instance will be also added to the set of non viral taxon names belonging to this homotypical group.

Parameters:
rank - the rank to be assigned to this non viral taxon name
genusOrUninomial - the string for this non viral taxon name if its rank is genus or higher or for the genus part if its rank is lower than genus
infraGenericEpithet - the string for the first epithet of this non viral taxon name if its rank is lower than genus and higher than species aggregate
specificEpithet - the string for the first epithet of this non viral taxon name if its rank is species aggregate or lower
infraSpecificEpithet - the string for the second epithet of this non viral taxon name if its rank is lower than species
combinationAuthorTeam - the author or the team who published this non viral taxon name
nomenclaturalReference - the nomenclatural reference where this non viral taxon name was published
nomenclMicroRef - the string with the details for precise location within the nomenclatural reference
homotypicalGroup - the homotypical group to which this non viral taxon name belongs
See Also:
NonViralName(), NonViralName(Rank, HomotypicalGroup), NewInstance(Rank, HomotypicalGroup), INonViralNameCacheStrategy, INameCacheStrategy, IIdentifiableEntityCacheStrategy
Method Detail

NewInstance

public static NonViralName NewInstance(Rank rank)
Creates a new non viral taxon name instance only containing its rank and the default cache strategy.

Parameters:
rank - the rank to be assigned to this non viral taxon name
See Also:
NewInstance(Rank, HomotypicalGroup), NonViralName(Rank, HomotypicalGroup), NonViralName(), #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, Reference, String, HomotypicalGroup), INonViralNameCacheStrategy, INameCacheStrategy, IIdentifiableEntityCacheStrategy

NewInstance

public static NonViralName NewInstance(Rank rank,
                                       HomotypicalGroup homotypicalGroup)
Creates a new non viral taxon name instance only containing its rank, its homotypical group and the default cache strategy. The new non viral taxon name instance will be also added to the set of non viral taxon names belonging to this homotypical group.

Parameters:
rank - the rank to be assigned to this non viral taxon name
homotypicalGroup - the homotypical group to which this non viral taxon name belongs
See Also:
NewInstance(Rank), NonViralName(Rank, HomotypicalGroup), NonViralName(), #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, Reference, String, HomotypicalGroup), INonViralNameCacheStrategy, INameCacheStrategy, IIdentifiableEntityCacheStrategy

initListener

protected void initListener()
Overrides:
initListener in class IdentifiableEntity<INonViralNameCacheStrategy>

getAllFields

protected Map<String,Field> getAllFields()
Specified by:
getAllFields in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>

getCombinationAuthorTeam

public INomenclaturalAuthor getCombinationAuthorTeam()
Returns the author (team) that published this non viral taxon name.

Returns:
the nomenclatural author (team) of this non viral taxon name
See Also:
INomenclaturalAuthor, TeamOrPersonBase.getNomenclaturalTitle()

setCombinationAuthorTeam

public void setCombinationAuthorTeam(INomenclaturalAuthor combinationAuthorTeam)
See Also:
getCombinationAuthorTeam()

getExCombinationAuthorTeam

public INomenclaturalAuthor getExCombinationAuthorTeam()
Returns the author (team) that contributed to the publication of this non viral taxon name as generally stated by the combination author (team) itself.
An ex-author(-team) is an author(-team) to whom a taxon name was ascribed although it is not the author(-team) of a valid publication (for instance without the validating description or diagnosis in case of a name for a new taxon). The name of this ascribed authorship, followed by "ex", may be inserted before the name(s) of the publishing author(s) of the validly published name:
Lilium tianschanicum was described by Grubov (1977) as a new species and its name was ascribed to Ivanova; since there is no indication that Ivanova provided the validating description, the name may be cited as Lilium tianschanicum N. A. Ivanova ex Grubov or Lilium tianschanicum Grubov.

The presence of an author (team) of this non viral taxon name is a condition for the existence of an ex author (team) for this same name.

Returns:
the nomenclatural ex author (team) of this non viral taxon name
See Also:
getCombinationAuthorTeam(), INomenclaturalAuthor, TeamOrPersonBase.getNomenclaturalTitle()

setExCombinationAuthorTeam

public void setExCombinationAuthorTeam(INomenclaturalAuthor exCombinationAuthorTeam)
See Also:
getExCombinationAuthorTeam()

getBasionymAuthorTeam

public INomenclaturalAuthor getBasionymAuthorTeam()
Returns the author (team) that published the original combination on which this non viral taxon name is nomenclaturally based. Such an author (team) can only exist if this non viral taxon name is a new combination due to a taxonomical revision.

Returns:
the nomenclatural basionym author (team) of this non viral taxon name
See Also:
getCombinationAuthorTeam(), INomenclaturalAuthor, TeamOrPersonBase.getNomenclaturalTitle()

setBasionymAuthorTeam

public void setBasionymAuthorTeam(INomenclaturalAuthor basionymAuthorTeam)
See Also:
getBasionymAuthorTeam()

getExBasionymAuthorTeam

public INomenclaturalAuthor getExBasionymAuthorTeam()
Returns the author (team) that contributed to the publication of the original combination this non viral taxon name is based on. This should have been generally stated by the basionym author (team) itself. The presence of a basionym author (team) of this non viral taxon name is a condition for the existence of an ex basionym author (team) for this same name.

Returns:
the nomenclatural ex basionym author (team) of this non viral taxon name
See Also:
getBasionymAuthorTeam(), getExCombinationAuthorTeam(), getCombinationAuthorTeam(), INomenclaturalAuthor, TeamOrPersonBase.getNomenclaturalTitle()

setExBasionymAuthorTeam

public void setExBasionymAuthorTeam(INomenclaturalAuthor exBasionymAuthorTeam)
See Also:
getExBasionymAuthorTeam()

getGenusOrUninomial

public String getGenusOrUninomial()
Returns either the scientific name string (without authorship) for this non viral taxon name if its rank is genus or higher (monomial) or the string for the genus part of it if its rank is lower than genus (bi- or trinomial). Genus or uninomial strings begin with an upper case letter.

Returns:
the string containing the suprageneric name, the genus name or the genus part of this non viral taxon name
See Also:
getNameCache()

setGenusOrUninomial

public void setGenusOrUninomial(String genusOrUninomial)
See Also:
getGenusOrUninomial()

getInfraGenericEpithet

public String getInfraGenericEpithet()
Returns the genus subdivision epithet string (infrageneric part) for this non viral taxon name if its rank is infrageneric (lower than genus and higher than species aggregate: binomial). Genus subdivision epithet strings begin with an upper case letter.

Returns:
the string containing the infrageneric part of this non viral taxon name
See Also:
getNameCache()

setInfraGenericEpithet

public void setInfraGenericEpithet(String infraGenericEpithet)
See Also:
getInfraGenericEpithet()

getSpecificEpithet

public String getSpecificEpithet()
Returns the species epithet string for this non viral taxon name if its rank is species aggregate or lower (bi- or trinomial). Species epithet strings begin with a lower case letter.

Returns:
the string containing the species epithet of this non viral taxon name
See Also:
getNameCache()

setSpecificEpithet

public void setSpecificEpithet(String specificEpithet)
See Also:
getSpecificEpithet()

getInfraSpecificEpithet

public String getInfraSpecificEpithet()
Returns the species subdivision epithet string (infraspecific part) for this non viral taxon name if its rank is infraspecific (lower than species: trinomial). Species subdivision epithet strings begin with a lower case letter.

Returns:
the string containing the infraspecific part of this non viral taxon name
See Also:
getNameCache()

setInfraSpecificEpithet

public void setInfraSpecificEpithet(String infraSpecificEpithet)
See Also:
getInfraSpecificEpithet()

generateFullTitle

public String generateFullTitle()
Generates and returns the string with the scientific name of this non viral taxon name including author strings and maybe year according to the strategy defined in INonViralNameCacheStrategy. This string may be stored in the inherited titleCache attribute. This method overrides the generic and inherited TaxonNameBase#generateTitle() method.

Specified by:
generateFullTitle in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>
Returns:
the string with the composed name of this non viral taxon name with authorship (and maybe year)
See Also:
IdentifiableEntity.generateTitle(), IdentifiableEntity.getTitleCache(), IdentifiableEntity.generateTitle()

generateNameCache

protected String generateNameCache()
Generates the composed name string of this non viral taxon name without author strings or year according to the strategy defined in INonViralNameCacheStrategy. The result might be stored in nameCache if the flag protectedNameCache is not set.

Returns:
the string with the composed name of this non viral taxon name without authors or year
See Also:
getNameCache()

getNameCache

public String getNameCache()
Returns or generates the nameCache (scientific name without author strings and year) string for this non viral taxon name. If the protectedNameCache flag is not set (False) the string will be generated according to a defined strategy, otherwise the value of the actual nameCache string will be returned.

Returns:
the string which identifies this non viral taxon name (without authors or year)
See Also:
generateNameCache()

setNameCache

public void setNameCache(String nameCache)
Assigns a nameCache string to this non viral taxon name and protects it from being overwritten. Sets the protectedNameCache flag to true.

Parameters:
nameCache - the string which identifies this non viral taxon name (without authors or year)
See Also:
getNameCache()

setNameCache

public void setNameCache(String nameCache,
                         boolean protectedNameCache)
Assigns a nameCache string to this non viral taxon name and protects it from being overwritten. Sets the protectedNameCache flag to true.

Parameters:
nameCache - the string which identifies this non viral taxon name (without authors or year)
protectedNameCache - if true teh protectedNameCache is set to true or otherwise set to false
See Also:
getNameCache()

isProtectedNameCache

public boolean isProtectedNameCache()
Returns the boolean value of the flag intended to protect (true) or not (false) the nameCache (scientific name without author strings and year) string of this non viral taxon name.

Returns:
the boolean value of the protectedNameCache flag
See Also:
getNameCache()

setProtectedNameCache

public void setProtectedNameCache(boolean protectedNameCache)
See Also:
isProtectedNameCache()

generateAuthorship

public String generateAuthorship()
Generates and returns a concatenated and formated authorteams string including basionym and combination authors of this non viral taxon name according to the strategy defined in INonViralNameCacheStrategy.

Returns:
the string with the concatenated and formated authorteams for this non viral taxon name
See Also:
INonViralNameCacheStrategy.getAuthorshipCache(NonViralName)

getAuthorshipCache

public String getAuthorshipCache()
Returns the concatenated and formated authorteams string including basionym and combination authors of this non viral taxon name. If the protectedAuthorshipCache flag is set this method returns the string stored in the the authorshipCache attribute, otherwise it generates the complete authorship string, returns it and stores it in the authorshipCache attribute.

Returns:
the string with the concatenated and formated authorteams for this non viral taxon name
See Also:
generateAuthorship()

setAuthorshipCache

public void setAuthorshipCache(String authorshipCache)
Assigns an authorshipCache string to this non viral taxon name. Sets the isProtectedAuthorshipCache flag to true.

Parameters:
authorshipCache - the string which identifies the complete authorship of this non viral taxon name
See Also:
getAuthorshipCache()

getFullTitleCache

public String getFullTitleCache()
Overrides:
getFullTitleCache in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>

getTitleCache

public String getTitleCache()
Specified by:
getTitleCache in interface IIdentifiableEntity
Overrides:
getTitleCache in class IdentifiableEntity<INonViralNameCacheStrategy>

setAuthorshipCache

public void setAuthorshipCache(String authorshipCache,
                               boolean protectedAuthorshipCache)
Assigns an authorshipCache string to this non viral taxon name.

Parameters:
authorshipCache - the string which identifies the complete authorship of this non viral taxon name
protectedAuthorshipCache - if true the isProtectedAuthorshipCache flag is set to true, otherwise the flag is set to false.
See Also:
getAuthorshipCache()

setTitleCache

public void setTitleCache(String titleCache,
                          boolean protectCache)
Specified by:
setTitleCache in interface IIdentifiableEntity
Overrides:
setTitleCache in class IdentifiableEntity<INonViralNameCacheStrategy>

isCodeCompliant

public 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 or ZoologicalName to which this non viral taxon name belongs. This method overrides the isCodeCompliant method from the abstract TaxonNameBase class.

Specified by:
isCodeCompliant in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>
Returns:
false
See Also:
TaxonNameBase.isCodeCompliant()

getNomenclaturalCode

public NomenclaturalCode getNomenclaturalCode()
Returns null as nomenclatural code that governs the construction of this non viral taxon name since there is no specific nomenclatural code defined. The real implementention takes place in the subclasses BacterialName, BotanicalName, CultivarPlantName and ZoologicalName. This method overrides the getNomeclaturalCode method from TaxonNameBase.

Specified by:
getNomenclaturalCode in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>
Returns:
null
See Also:
isCodeCompliant(), TaxonNameBase#getHasProblem()

isProtectedAuthorshipCache

public boolean isProtectedAuthorshipCache()
Returns the boolean value of the flag intended to protect (true) or not (false) the authorshipCache (complete authorship string) of this non viral taxon name.

Returns:
the boolean value of the protectedAuthorshipCache flag
See Also:
getAuthorshipCache()

setProtectedAuthorshipCache

public void setProtectedAuthorshipCache(boolean protectedAuthorshipCache)
See Also:
isProtectedAuthorshipCache(), getAuthorshipCache()

isHybridFormula

public boolean isHybridFormula()
Returns the boolean value of the flag indicating whether the name of this botanical taxon name is a hybrid formula (true) or not (false). A hybrid named by a hybrid formula (composed with its parent names by placing the multiplication sign between them) does not have an own published name and therefore has neither an autorship nor other name components. If this flag is set no other hybrid flags may be set.

Returns:
the boolean value of the isHybridFormula flag
See Also:
isMonomHybrid(), isBinomHybrid(), isTrinomHybrid()

setHybridFormula

public void setHybridFormula(boolean hybridFormula)
See Also:
isHybridFormula()

isMonomHybrid

public boolean isMonomHybrid()
Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an intergeneric hybrid (true) or not (false). In this case the multiplication sign is placed before the scientific name. If this flag is set no other hybrid flags may be set.

Returns:
the boolean value of the isMonomHybrid flag
See Also:
isHybridFormula(), isBinomHybrid(), isTrinomHybrid()

setMonomHybrid

public void setMonomHybrid(boolean monomHybrid)
See Also:
isMonomHybrid(), isBinomHybrid(), isTrinomHybrid()

isBinomHybrid

public boolean isBinomHybrid()
Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an interspecific hybrid (true) or not (false). In this case the multiplication sign is placed before the species epithet. If this flag is set no other hybrid flags may be set.

Returns:
the boolean value of the isBinomHybrid flag
See Also:
isHybridFormula(), isMonomHybrid(), isTrinomHybrid()

setBinomHybrid

public void setBinomHybrid(boolean binomHybrid)
See Also:
isBinomHybrid(), isMonomHybrid(), isTrinomHybrid()

isTrinomHybrid

public boolean isTrinomHybrid()
Returns the boolean value of the flag indicating whether this botanical taxon name is the name of an infraspecific hybrid (true) or not (false). In this case the term "notho-" (optionally abbreviated "n-") is used as a prefix to the term denoting the infraspecific rank of this botanical taxon name. If this flag is set no other hybrid flags may be set.

Returns:
the boolean value of the isTrinomHybrid flag
See Also:
isHybridFormula(), isMonomHybrid(), isBinomHybrid()

setTrinomHybrid

public void setTrinomHybrid(boolean trinomHybrid)
See Also:
isTrinomHybrid(), isBinomHybrid(), isMonomHybrid()

getHybridParentRelations

public Set<HybridRelationship> getHybridParentRelations()
Returns the set of all hybrid relationships in which this taxon name is involved as a parent.

See Also:
#getHybridRelationships(), getChildRelationships(), HybridRelationshipType

getHybridChildRelations

public Set<HybridRelationship> getHybridChildRelations()
Returns the set of all hybrid relationships in which this taxon name is involved as a child.

See Also:
#getHybridRelationships(), getParentRelationships(), HybridRelationshipType

getParentRelationships

@Deprecated
public Set<HybridRelationship> getParentRelationships()
Deprecated. use getHybridParentRelations() instead. Will be removed in higher versions.

Returns the set of all hybrid relationships in which this taxon name is involved as a parent.

See Also:
getHybridParentRelations(), #getHybridRelationships(), getChildRelationships(), HybridRelationshipType

getOrderedChildRelationships

public List<HybridRelationship> getOrderedChildRelationships()
Returns the hybrid child relationships ordered by relationship type, or if equal by title cache of the related names.

See Also:
getHybridParentRelations()

getChildRelationships

@Deprecated
public Set<HybridRelationship> getChildRelationships()
Deprecated. use getHybridChildRelations() instead. Will be removed in higher versions.

See Also:
getHybridChildRelations()

addHybridRelationship

protected void addHybridRelationship(HybridRelationship rel)
Adds the given hybrid relationship to the set of hybrid relationships of both non-viral names involved in this hybrid relationship. One of both non-viral names must be this non-viral name otherwise no addition will be carried out. The child non viral taxon name must be a hybrid, which means that one of its four hybrid flags must be set.

Parameters:
relationship - the hybrid relationship to be added
Throws:
IllegalArgumentException
See Also:
isHybridFormula(), isMonomHybrid(), isBinomHybrid(), isTrinomHybrid(), #getHybridRelationships(), getParentRelationships(), getChildRelationships(), addRelationship(RelationshipBase)

addRelationship

@Deprecated
public void addRelationship(RelationshipBase relation)
Deprecated. to be used by RelationshipBase only

Does the same as the addHybridRelationship method if the given relation is also a hybrid relationship. Otherwise this method does the same as the overwritten addRelationship method from TaxonNameBase.

Specified by:
addRelationship in interface IRelated
Overrides:
addRelationship in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>
Parameters:
relation - the relationship to be added to some of this taxon name's relationships sets
See Also:
addHybridRelationship(HybridRelationship), TaxonNameBase.addRelationship(RelationshipBase), TaxonNameBase.addNameRelationship(NameRelationship)

addHybridParent

public HybridRelationship addHybridParent(NonViralName parentName,
                                          HybridRelationshipType type,
                                          String ruleConsidered)
Creates a new hybrid relationship to this botanical name. A HybridRelationship may be of type "is first/second parent" or "is male/female parent". By invoking this method this botanical name becomes a hybrid child of the parent botanical name.

Parameters:
parentName - the botanical name of the parent for this new hybrid 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:
#addHybridChild(BotanicalName, HybridRelationshipType,String ), TaxonNameBase.getRelationsToThisName(), TaxonNameBase.getNameRelations(), TaxonNameBase.addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), TaxonNameBase.addNameRelationship(NameRelationship)

addHybridChild

public HybridRelationship addHybridChild(NonViralName childName,
                                         HybridRelationshipType type,
                                         String ruleConsidered)
Creates a new hybrid relationship to this botanical name. A HybridRelationship may be of type "is first/second parent" or "is male/female parent". By invoking this method this botanical name becomes a parent of the hybrid child botanical name.

Parameters:
childName - the botanical name of the child for this new hybrid 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:
#addHybridParent(BotanicalName, HybridRelationshipType,String ), TaxonNameBase.getRelationsToThisName(), TaxonNameBase.getNameRelations(), TaxonNameBase.addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), TaxonNameBase.addNameRelationship(NameRelationship)

removeHybridRelationship

public void removeHybridRelationship(HybridRelationship hybridRelation)
Removes one hybrid relationship from the set of hybrid relationships in which this botanical taxon name is involved. The hybrid relationship will also be removed from the set belonging to the second botanical taxon name involved.

Parameters:
relationship - the hybrid relationship which should be deleted from the corresponding sets
See Also:
#getHybridRelationships()

removeHybridChild

public void removeHybridChild(NonViralName child)

removeHybridParent

public void removeHybridParent(NonViralName parent)

isAutonym

public boolean isAutonym()
Needs to be implemented by those classes that handle autonyms (e.g. botanical names).


hasAuthors

public boolean hasAuthors()
Tests if the given name has any authors.

Returns:
false if no author ((ex)combination or (ex)basionym) exists, true otherwise

computeCombinationAuthorNomenclaturalTitle

public String computeCombinationAuthorNomenclaturalTitle()
Shortcut. Returns the combination authors title cache. Returns null if no combination author exists.

Returns:

computeBasionymAuthorNomenclaturalTitle

public String computeBasionymAuthorNomenclaturalTitle()
Shortcut. Returns the basionym authors title cache. Returns null if no basionym author exists.

Returns:

computeExCombinationAuthorNomenclaturalTitle

public String computeExCombinationAuthorNomenclaturalTitle()
Shortcut. Returns the ex-combination authors title cache. Returns null if no ex-combination author exists.

Returns:

computeExBasionymAuthorNomenclaturalTitle

public String computeExBasionymAuthorNomenclaturalTitle()
Shortcut. Returns the ex-basionym authors title cache. Returns null if no exbasionym author exists.

Returns:

clone

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

Overrides:
clone in class TaxonNameBase<T extends NonViralName,INonViralNameCacheStrategy>
See Also:
TaxonNameBase.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.