Project

General

Profile

Download (3.73 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.xml.bind.annotation.XmlAccessType;
15
import javax.xml.bind.annotation.XmlAccessorType;
16
import javax.xml.bind.annotation.XmlRootElement;
17
import javax.xml.bind.annotation.XmlType;
18

    
19
import org.apache.log4j.Logger;
20
import org.hibernate.envers.Audited;
21
import org.hibernate.search.annotations.Indexed;
22
import org.springframework.beans.factory.annotation.Configurable;
23

    
24
import eu.etaxonomy.cdm.strategy.cache.name.BacterialNameDefaultCacheStrategy;
25

    
26
/**
27
 * The taxon name class for bacteria.
28
 * <P>
29
 * This class corresponds to: NameBacterial according to the ABCD schema.
30
 *
31
 * @author m.doering
32
 * @created 08-Nov-2007 13:06:11
33
 */
34
@XmlAccessorType(XmlAccessType.FIELD)
35
@XmlType(name = "", propOrder = {
36
})
37
@XmlRootElement(name = "BacterialName")
38
@Entity
39
@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase")
40
@Audited
41
@Configurable
42
public class BacterialName
43
        extends NonViralName<BacterialName>{
44

    
45
    private static final long serialVersionUID = 5161176481172718843L;
46
    @SuppressWarnings("unused")
47
	private static final Logger logger = Logger.getLogger(BacterialName.class);
48

    
49

    
50
	// ************* CONSTRUCTORS *************/
51

    
52
	protected BacterialName(){
53
		super();
54
		this.cacheStrategy = BacterialNameDefaultCacheStrategy.NewInstance();
55
	}
56

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

    
78
	//********* METHODS **************************************/
79

    
80

    
81

    
82

    
83
	/**
84
	 * Returns the {@link NomenclaturalCode nomenclatural code} that governs
85
	 * the construction of <i>this</i> bacterial taxon name, that is the
86
	 * International Code of Nomenclature of Bacteria. This method overrides
87
	 * the getNomenclaturalCode method from {@link INonViralName NonViralName}.
88
	 *
89
	 * @return  the nomenclatural code for bacteria
90
	 * @see  	NonViralName#isCodeCompliant()
91
	 * @see  	TaxonNameBase#getHasProblem()
92
	 */
93
	@Override
94
	public NomenclaturalCode getNomenclaturalCode(){
95
		return NomenclaturalCode.ICNB;
96

    
97
	}
98

    
99
//*********************** CLONE ********************************************************/
100

    
101
	/**
102
	 * Clones <i>this</i> bacterial name. This is a shortcut that enables to create
103
	 * a new instance that differs only slightly from <i>this</i> bacterial name by
104
	 * modifying only some of the attributes.
105
	 *
106
	 * @see eu.etaxonomy.cdm.model.name.NonViralName#clone()
107
	 * @see java.lang.Object#clone()
108
	 */
109
	@Override
110
	public Object clone() {
111
		BacterialName result = (BacterialName)super.clone();
112
		//no changes to:
113
		return result;
114
	}
115

    
116
}
(1-1/37)