Project

General

Profile

Download (6.79 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
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.
8
*/
9

    
10
package eu.etaxonomy.cdm.model.name;
11

    
12

    
13
import javax.persistence.Entity;
14
import javax.persistence.Transient;
15
import javax.xml.bind.annotation.XmlAccessType;
16
import javax.xml.bind.annotation.XmlAccessorType;
17
import javax.xml.bind.annotation.XmlElement;
18
import javax.xml.bind.annotation.XmlRootElement;
19
import javax.xml.bind.annotation.XmlType;
20

    
21
import org.apache.log4j.Logger;
22
import org.hibernate.envers.Audited;
23
import org.hibernate.search.annotations.Field;
24
import org.hibernate.search.annotations.Index;
25
import org.hibernate.search.annotations.Indexed;
26
import org.springframework.beans.factory.annotation.Configurable;
27

    
28
/**
29
 * The taxon name class for bacteria.
30
 * <P>
31
 * This class corresponds to: NameBacterial according to the ABCD schema.
32
 * 
33
 * @author m.doering
34
 * @version 1.0
35
 * @created 08-Nov-2007 13:06:11
36
 */
37
@XmlAccessorType(XmlAccessType.FIELD)
38
@XmlType(name = "", propOrder = {
39
    "subGenusAuthorship",
40
    "nameApprobation"
41
})
42
@XmlRootElement(name = "BacterialName")
43
@Entity
44
@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase")
45
@Audited
46
@Configurable
47
public class BacterialName extends NonViralName<BacterialName> {
48
	
49
	/**
50
	 * 
51
	 */
52
	private static final long serialVersionUID = -7641841279209976443L;
53

    
54
	static Logger logger = Logger.getLogger(BacterialName.class);
55

    
56
	//Author team and year of the subgenus name
57
	@XmlElement(name = "SubGenusAuthorship")
58
	@Field(index=Index.TOKENIZED)
59
	private String subGenusAuthorship;
60
	
61
	//Approbation of name according to approved list, validation list, or validly published, paper in IJSB after 1980
62
	@XmlElement(name = "NameApprobation")
63
	@Field(index=Index.TOKENIZED)
64
	private String nameApprobation;
65

    
66
	// ************* CONSTRUCTORS *************/
67
	
68
	protected BacterialName(){
69
		super();
70
	}
71
	
72
	/** 
73
	 * Class constructor: creates a new bacterial taxon name instance
74
	 * only containing its {@link Rank rank},
75
	 * its {@link HomotypicalGroup homotypical group} and
76
	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
77
	 * The new bacterial taxon name instance will be also added to the set of
78
	 * bacterial taxon names belonging to this homotypical group.
79
	 * 
80
	 * @param	rank  the rank to be assigned to <i>this</i> bacterial taxon name
81
	 * @param	homotypicalGroup  the homotypical group to which <i>this</i> bacterial taxon name belongs
82
	 * @see 	#NewInstance(Rank)
83
	 * @see 	#NewInstance(Rank, HomotypicalGroup)
84
	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
85
	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
86
	 * @see 	eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
87
	 */
88
	protected BacterialName(Rank rank, HomotypicalGroup homotypicalGroup) {
89
		super(rank, homotypicalGroup);
90
	}
91

    
92
	//********* METHODS **************************************/
93
	/** 
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}.
97
	 * 
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
104
	 */
105
	public static BacterialName NewInstance(Rank rank){
106
		return new BacterialName(rank, null);
107
	}
108

    
109
	/** 
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.
116
	 * 
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
124
	 */
125
	public static BacterialName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
126
		return new BacterialName(rank, homotypicalGroup);
127
	}
128
	
129
	/**
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'. 
136
	 * 
137
	 * @return  the string containing the complete subgenus' authorship
138
	 * 			included in <i>this</i> bacterial taxon name
139
	 */
140
	public String getSubGenusAuthorship(){
141
		return this.subGenusAuthorship;
142
	}
143

    
144
	/**
145
	 * @see  #getSubGenusAuthorship()
146
	 */
147
	public void setSubGenusAuthorship(String subGenusAuthorship){
148
		this.subGenusAuthorship = subGenusAuthorship;
149
	}
150

    
151
	/**
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
154
	 * according to:
155
	 * <ul>
156
	 * <li>the approved list, c.f.r. IJSB 1980 (AL)
157
	 * <li>the validation list, in IJSB after 1980 (VL)
158
	 * </ul>
159
	 * or
160
	 * <ul>
161
	 * <li>are validly published as paper in IJSB after 1980 (VP).
162
	 * </ul>
163
	 * IJSB is the acronym for International Journal of Systematic Bacteriology.
164
	 * 
165
	 * @return  the string with the source of the approbation for <i>this</i> bacterial taxon name
166
	 */
167
	public String getNameApprobation(){
168
		return this.nameApprobation;
169
	}
170

    
171
	/**
172
	 * @see  #getNameApprobation()
173
	 */
174
	public void setNameApprobation(String nameApprobation){
175
		this.nameApprobation = nameApprobation;
176
	}
177
	
178
	
179
	/**
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}.
184
	 *
185
	 * @return  the nomenclatural code for bacteria
186
	 * @see  	NonViralName#isCodeCompliant()
187
	 * @see  	TaxonNameBase#getHasProblem()
188
	 */
189
	@Override
190
	public NomenclaturalCode getNomenclaturalCode(){
191
		return NomenclaturalCode.ICNB;
192

    
193
	}
194

    
195
}
(1-1/25)