2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.model
.name
;
13 import javax
.persistence
.Entity
;
14 import javax
.xml
.bind
.annotation
.XmlAccessType
;
15 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
16 import javax
.xml
.bind
.annotation
.XmlElement
;
17 import javax
.xml
.bind
.annotation
.XmlRootElement
;
18 import javax
.xml
.bind
.annotation
.XmlType
;
20 import org
.apache
.log4j
.Logger
;
21 import org
.hibernate
.envers
.Audited
;
22 import org
.hibernate
.search
.annotations
.Field
;
23 import org
.hibernate
.search
.annotations
.Index
;
24 import org
.hibernate
.search
.annotations
.Indexed
;
25 import org
.springframework
.beans
.factory
.annotation
.Configurable
;
27 import eu
.etaxonomy
.cdm
.strategy
.cache
.name
.BacterialNameDefaultCacheStrategy
;
28 import eu
.etaxonomy
.cdm
.strategy
.cache
.name
.BotanicNameDefaultCacheStrategy
;
31 * The taxon name class for bacteria.
33 * This class corresponds to: NameBacterial according to the ABCD schema.
37 * @created 08-Nov-2007 13:06:11
39 @XmlAccessorType(XmlAccessType
.FIELD
)
40 @XmlType(name
= "", propOrder
= {
44 @XmlRootElement(name
= "BacterialName")
46 @Indexed(index
= "eu.etaxonomy.cdm.model.name.TaxonNameBase")
49 public class BacterialName
extends NonViralName
<BacterialName
> {
50 private static final long serialVersionUID
= -7641841279209976443L;
51 @SuppressWarnings("unused")
52 private static final Logger logger
= Logger
.getLogger(BacterialName
.class);
54 //Author team and year of the subgenus name
55 @XmlElement(name
= "SubGenusAuthorship")
56 @Field(index
=Index
.TOKENIZED
)
57 private String subGenusAuthorship
;
59 //Approbation of name according to approved list, validation list, or validly published, paper in IJSB after 1980
60 @XmlElement(name
= "NameApprobation")
61 @Field(index
=Index
.TOKENIZED
)
62 private String nameApprobation
;
64 // ************* CONSTRUCTORS *************/
66 protected BacterialName(){
68 this.cacheStrategy
= BacterialNameDefaultCacheStrategy
.NewInstance();
72 * Class constructor: creates a new bacterial taxon name instance
73 * only containing its {@link Rank rank},
74 * its {@link HomotypicalGroup homotypical group} and
75 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
76 * The new bacterial taxon name instance will be also added to the set of
77 * bacterial taxon names belonging to this homotypical group.
79 * @param rank the rank to be assigned to <i>this</i> bacterial taxon name
80 * @param homotypicalGroup the homotypical group to which <i>this</i> bacterial taxon name belongs
81 * @see #NewInstance(Rank)
82 * @see #NewInstance(Rank, HomotypicalGroup)
83 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
84 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
85 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
87 protected BacterialName(Rank rank
, HomotypicalGroup homotypicalGroup
) {
88 super(rank
, homotypicalGroup
);
89 this.cacheStrategy
= BacterialNameDefaultCacheStrategy
.NewInstance();
92 //********* METHODS **************************************/
94 * Creates a new bacterial taxon name instance
95 * only containing its {@link Rank rank} and
96 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
98 * @param rank the rank to be assigned to <i>this</i> bacterial taxon name
99 * @see #NewInstance(Rank, HomotypicalGroup)
100 * @see #BacterialName(Rank, HomotypicalGroup)
101 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
102 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
103 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
105 public static BacterialName
NewInstance(Rank rank
){
106 return new BacterialName(rank
, null);
110 * Creates a new bacterial taxon name instance
111 * only containing its {@link Rank rank},
112 * its {@link HomotypicalGroup homotypical group} and
113 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
114 * The new bacterial taxon name instance will be also added to the set of
115 * bacterial taxon names belonging to this homotypical group.
117 * @param rank the rank to be assigned to <i>this</i> bacterial taxon name
118 * @param homotypicalGroup the homotypical group to which <i>this</i> bacterial taxon name belongs
119 * @see #NewInstance(Rank)
120 * @see #BacterialName(Rank, HomotypicalGroup)
121 * @see eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
122 * @see eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
123 * @see eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
125 public static BacterialName
NewInstance(Rank rank
, HomotypicalGroup homotypicalGroup
){
126 return new BacterialName(rank
, homotypicalGroup
);
130 * Returns the string containing the authorship with the year and details
131 * of the reference in which the subgenus included in the scientific name
132 * of <i>this</i> bacterial taxon name was published.
133 * For instance if the bacterial taxon name is
134 * 'Bacillus (subgen. Aerobacillus Donker 1926, 128) polymyxa' the subgenus
135 * authorship string is 'Donker 1926, 128'.
137 * @return the string containing the complete subgenus' authorship
138 * included in <i>this</i> bacterial taxon name
140 public String
getSubGenusAuthorship(){
141 return this.subGenusAuthorship
;
145 * @see #getSubGenusAuthorship()
147 public void setSubGenusAuthorship(String subGenusAuthorship
){
148 this.subGenusAuthorship
= subGenusAuthorship
;
152 * Returns the string representing the reason for the approbation of <i>this</i>
153 * bacterial taxon name. Bacterial taxon names are valid or approved
156 * <li>the approved list, c.f.r. IJSB 1980 (AL)
157 * <li>the validation list, in IJSB after 1980 (VL)
161 * <li>are validly published as paper in IJSB after 1980 (VP).
163 * IJSB is the acronym for International Journal of Systematic Bacteriology.
165 * @return the string with the source of the approbation for <i>this</i> bacterial taxon name
167 public String
getNameApprobation(){
168 return this.nameApprobation
;
172 * @see #getNameApprobation()
174 public void setNameApprobation(String nameApprobation
){
175 this.nameApprobation
= nameApprobation
;
180 * Returns the {@link NomenclaturalCode nomenclatural code} that governs
181 * the construction of <i>this</i> bacterial taxon name, that is the
182 * International Code of Nomenclature of Bacteria. This method overrides
183 * the getNomeclaturalCode method from {@link NonViralName NonViralName}.
185 * @return the nomenclatural code for bacteria
186 * @see NonViralName#isCodeCompliant()
187 * @see TaxonNameBase#getHasProblem()
190 public NomenclaturalCode
getNomenclaturalCode(){
191 return NomenclaturalCode
.ICNB
;