Project

General

Profile

Download (6.82 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
	private static final long serialVersionUID = -7641841279209976443L;
49
	@SuppressWarnings("unused")
50
	private static final Logger logger = Logger.getLogger(BacterialName.class);
51

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

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

    
88
	//********* METHODS **************************************/
89
	/** 
90
	 * Creates a new bacterial taxon name instance
91
	 * only containing its {@link Rank rank} and 
92
 	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
93
	 * 
94
	 * @param  rank  the rank to be assigned to <i>this</i> bacterial taxon name
95
	 * @see    #NewInstance(Rank, HomotypicalGroup)
96
	 * @see    #BacterialName(Rank, HomotypicalGroup)
97
	 * @see    eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
98
	 * @see    eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
99
	 * @see    eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
100
	 */
101
	public static BacterialName NewInstance(Rank rank){
102
		return new BacterialName(rank, null);
103
	}
104

    
105
	/** 
106
	 * Creates a new bacterial taxon name instance
107
	 * only containing its {@link Rank rank},
108
	 * its {@link HomotypicalGroup homotypical group} and 
109
 	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
110
	 * The new bacterial taxon name instance will be also added to the set of
111
	 * bacterial taxon names belonging to this homotypical group.
112
	 * 
113
	 * @param  rank  the rank to be assigned to <i>this</i> bacterial taxon name
114
	 * @param  homotypicalGroup  the homotypical group to which <i>this</i> bacterial taxon name belongs
115
	 * @see    #NewInstance(Rank)
116
	 * @see    #BacterialName(Rank, HomotypicalGroup)
117
	 * @see    eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
118
	 * @see    eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
119
	 * @see    eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
120
	 */
121
	public static BacterialName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
122
		return new BacterialName(rank, homotypicalGroup);
123
	}
124
	
125
	/**
126
	 * Returns the string containing the authorship with the year and details
127
	 * of the reference in which the subgenus included in the scientific name
128
	 * of <i>this</i> bacterial taxon name was published.
129
	 * For instance if the bacterial taxon name is
130
	 * 'Bacillus (subgen. Aerobacillus Donker 1926, 128) polymyxa' the subgenus
131
	 * authorship string is 'Donker 1926, 128'. 
132
	 * 
133
	 * @return  the string containing the complete subgenus' authorship
134
	 * 			included in <i>this</i> bacterial taxon name
135
	 */
136
	public String getSubGenusAuthorship(){
137
		return this.subGenusAuthorship;
138
	}
139

    
140
	/**
141
	 * @see  #getSubGenusAuthorship()
142
	 */
143
	public void setSubGenusAuthorship(String subGenusAuthorship){
144
		this.subGenusAuthorship = subGenusAuthorship;
145
	}
146

    
147
	/**
148
	 * Returns the string representing the reason for the approbation of <i>this</i>
149
	 * bacterial taxon name. Bacterial taxon names are valid or approved
150
	 * according to:
151
	 * <ul>
152
	 * <li>the approved list, c.f.r. IJSB 1980 (AL)
153
	 * <li>the validation list, in IJSB after 1980 (VL)
154
	 * </ul>
155
	 * or
156
	 * <ul>
157
	 * <li>are validly published as paper in IJSB after 1980 (VP).
158
	 * </ul>
159
	 * IJSB is the acronym for International Journal of Systematic Bacteriology.
160
	 * 
161
	 * @return  the string with the source of the approbation for <i>this</i> bacterial taxon name
162
	 */
163
	public String getNameApprobation(){
164
		return this.nameApprobation;
165
	}
166

    
167
	/**
168
	 * @see  #getNameApprobation()
169
	 */
170
	public void setNameApprobation(String nameApprobation){
171
		this.nameApprobation = nameApprobation;
172
	}
173
	
174
	
175
	/**
176
	 * Returns the {@link NomenclaturalCode nomenclatural code} that governs
177
	 * the construction of <i>this</i> bacterial taxon name, that is the
178
	 * International Code of Nomenclature of Bacteria. This method overrides
179
	 * the getNomeclaturalCode method from {@link NonViralName NonViralName}.
180
	 *
181
	 * @return  the nomenclatural code for bacteria
182
	 * @see  	NonViralName#isCodeCompliant()
183
	 * @see  	TaxonNameBase#getHasProblem()
184
	 */
185
	@Override
186
	public NomenclaturalCode getNomenclaturalCode(){
187
		return NomenclaturalCode.ICNB;
188

    
189
	}
190

    
191
}
(1-1/25)