Project

General

Profile

« Previous | Next » 

Revision e6d7b501

Added by Andreas Müller almost 7 years ago

ref #6368 remove TaxonNameBase subclasses

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/BacterialName.java
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
    private static final NomenclaturalCode code = NomenclaturalCode.ICNB;
50

  
51

  
52
	// ************* CONSTRUCTORS *************/
53

  
54
	protected BacterialName(){
55
		super(code);
56
		this.cacheStrategy = BacterialNameDefaultCacheStrategy.NewInstance();
57
	}
58

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

  
80
	//********* METHODS **************************************/
81

  
82

  
83

  
84

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

  
99
	}
100

  
101
//*********************** CLONE ********************************************************/
102

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

  
118
}
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.hibernate.envers.Audited;
20
//import org.hibernate.search.annotations.Indexed;
21
//import org.springframework.beans.factory.annotation.Configurable;
22
//
23
///**
24
// * The taxon name class for bacteria.
25
// * <P>
26
// * This class corresponds to: NameBacterial according to the ABCD schema.
27
// *
28
// * @author m.doering
29
// * @created 08-Nov-2007 13:06:11
30
// */
31
//@XmlAccessorType(XmlAccessType.FIELD)
32
//@XmlType(name = "", propOrder = {
33
//})
34
//@XmlRootElement(name = "BacterialName")
35
//@Entity
36
//@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase")
37
//@Audited
38
//@Configurable
39
//public class BacterialName4{
40
////        extends NonViralName<IBacterialName>{
41
//
42
////    private static final long serialVersionUID = 5161176481172718843L;
43
////    @SuppressWarnings("unused")
44
////	private static final Logger logger = Logger.getLogger(IBacterialName.class);
45
////
46
////    private static final NomenclaturalCode code = NomenclaturalCode.ICNB;
47
//
48
//
49
//	// ************* CONSTRUCTORS *************/
50
//
51
////	protected BacterialName(){
52
////		super(code);
53
////		this.cacheStrategy = BacterialNameDefaultCacheStrategy.NewInstance();
54
////	}
55
//
56
//	/**
57
//	 * Class constructor: creates a new bacterial taxon name instance
58
//	 * only containing its {@link Rank rank},
59
//	 * its {@link HomotypicalGroup homotypical group} and
60
//	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy default cache strategy}.
61
//	 * The new bacterial taxon name instance will be also added to the set of
62
//	 * bacterial taxon names belonging to this homotypical group.
63
//	 *
64
//	 * @param	rank  the rank to be assigned to <i>this</i> bacterial taxon name
65
//	 * @param	homotypicalGroup  the homotypical group to which <i>this</i> bacterial taxon name belongs
66
//	 * @see 	#NewInstance(Rank)
67
//	 * @see 	#NewInstance(Rank, HomotypicalGroup)
68
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
69
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy
70
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
71
//	 */
72
////	protected BacterialName(Rank rank, HomotypicalGroup homotypicalGroup) {
73
////		super(code, rank, homotypicalGroup);
74
////		this.cacheStrategy = BacterialNameDefaultCacheStrategy.NewInstance();
75
////	}
76
//
77
//	//********* METHODS **************************************/
78
//
79
//
80
//
81
//
82
//	/**
83
//	 * Returns the {@link NomenclaturalCode nomenclatural code} that governs
84
//	 * the construction of <i>this</i> bacterial taxon name, that is the
85
//	 * International Code of Nomenclature of Bacteria. This method overrides
86
//	 * the getNomenclaturalCode method from {@link INonViralName NonViralName}.
87
//	 *
88
//	 * @return  the nomenclatural code for bacteria
89
//	 * @see  	NonViralName#isCodeCompliant()
90
//	 * @see  	TaxonNameBase#getHasProblem()
91
//	 */
92
////	public NomenclaturalCode getNomenclaturalCode(){
93
////		return code;
94
////
95
////	}
96
//
97
////*********************** CLONE ********************************************************/
98
//
99
//	/**
100
//	 * Clones <i>this</i> bacterial name. This is a shortcut that enables to create
101
//	 * a new instance that differs only slightly from <i>this</i> bacterial name by
102
//	 * modifying only some of the attributes.
103
//	 *
104
//	 * @see eu.etaxonomy.cdm.model.name.NonViralName#clone()
105
//	 * @see java.lang.Object#clone()
106
//	 */
107
//	@Override
108
//    public Object clone() {
109
//		IBacterialName result = (IBacterialName)super.clone();
110
//		//no changes to:
111
//		return result;
112
//	}
113
//
114
//}

Also available in: Unified diff