Revision e6d7b501
Added by Andreas Müller almost 7 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/CultivarPlantName.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 |
import javax.persistence.Entity; |
|
13 |
import javax.xml.bind.annotation.XmlAccessType; |
|
14 |
import javax.xml.bind.annotation.XmlAccessorType; |
|
15 |
import javax.xml.bind.annotation.XmlRootElement; |
|
16 |
import javax.xml.bind.annotation.XmlType; |
|
17 |
|
|
18 |
import org.apache.log4j.Logger; |
|
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 cultivars (cultivated plants). The only possible |
|
25 |
* {@link Rank ranks} for cultivars are CULTIVAR, GREX, CONVAR, CULTIVAR_GROUP, |
|
26 |
* GRAFT_CHIMAERA or DENOMINATION_CLASS. |
|
27 |
* <P> |
|
28 |
* This class corresponds partially to: NameBotanical according to the |
|
29 |
* ABCD schema. |
|
30 |
* |
|
31 |
* @author m.doering |
|
32 |
* @created 08-Nov-2007 13:06:18 |
|
33 |
*/ |
|
34 |
@XmlAccessorType(XmlAccessType.FIELD) |
|
35 |
@XmlType(name = "", propOrder = {}) |
|
36 |
@XmlRootElement(name = "CultivarPlantName") |
|
37 |
@Entity |
|
38 |
@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase") |
|
39 |
@Audited |
|
40 |
@Configurable |
|
41 |
public class CultivarPlantName |
|
42 |
extends BotanicalName { |
|
43 |
private static final long serialVersionUID = -7948375817971980004L; |
|
44 |
|
|
45 |
@SuppressWarnings("unused") |
|
46 |
private static final Logger logger = Logger.getLogger(CultivarPlantName.class); |
|
47 |
|
|
48 |
private static final NomenclaturalCode code = NomenclaturalCode.ICNCP; |
|
49 |
|
|
50 |
|
|
51 |
// ************* CONSTRUCTORS *************/ |
|
52 |
/** |
|
53 |
* Class constructor: creates a new cultivar taxon name instance |
|
54 |
* only containing the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}. |
|
55 |
* |
|
56 |
* @see #CultivarPlantName(Rank, HomotypicalGroup) |
|
57 |
* @see eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy |
|
58 |
*/ |
|
59 |
public CultivarPlantName(){ |
|
60 |
super(code); |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* Class constructor: creates a new cultivar taxon name instance |
|
65 |
* only containing its {@link Rank rank}, |
|
66 |
* its {@link HomotypicalGroup homotypical group} and |
|
67 |
* the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}. |
|
68 |
* The new cultivar taxon name instance will be also added to the set of |
|
69 |
* cultivar taxon names belonging to this homotypical group. |
|
70 |
* |
|
71 |
* @param rank the rank to be assigned to <i>this</i> cultivar taxon name |
|
72 |
* @param homotypicalGroup the homotypical group to which <i>this</i> cultivar taxon name belongs |
|
73 |
* @see #CultivarPlantName() |
|
74 |
* @see eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy |
|
75 |
*/ |
|
76 |
protected CultivarPlantName(Rank rank, HomotypicalGroup homotypicalGroup) { |
|
77 |
super(code, rank, homotypicalGroup); |
|
78 |
} |
|
79 |
|
|
80 |
|
|
81 |
//************************* |
|
82 |
|
|
83 |
|
|
84 |
/** |
|
85 |
* Returns the {@link NomenclaturalCode nomenclatural code} that governs |
|
86 |
* the construction of <i>this</i> cultivar taxon name, that is the |
|
87 |
* International Code of Nomenclature for Cultivated Plants. This method |
|
88 |
* overrides the getNomenclaturalCode method from {@link NonViralName#getNomenclaturalCode() NonViralName}. |
|
89 |
* |
|
90 |
* @return the nomenclatural code for cultivated plants |
|
91 |
* @see NonViralName#isCodeCompliant() |
|
92 |
* @see TaxonNameBase#getHasProblem() |
|
93 |
*/ |
|
94 |
@Override |
|
95 |
public NomenclaturalCode getNomenclaturalCode(){ |
|
96 |
return code; |
|
97 |
} |
|
98 |
|
|
99 |
|
|
100 |
//*********************** CLONE ********************************************************/ |
|
101 |
|
|
102 |
/** |
|
103 |
* Clones <i>this</i> cultivar plant name. This is a shortcut that enables to create |
|
104 |
* a new instance that differs only slightly from <i>this</i> cultivar plant name by |
|
105 |
* modifying only some of the attributes. |
|
106 |
* |
|
107 |
* @see eu.etaxonomy.cdm.model.name.BotanicalName#clone() |
|
108 |
* @see java.lang.Object#clone() |
|
109 |
*/ |
|
110 |
@Override |
|
111 |
public Object clone() { |
|
112 |
CultivarPlantName result = (CultivarPlantName)super.clone(); |
|
113 |
//no changes to: |
|
114 |
return result; |
|
115 |
} |
|
116 |
|
|
117 |
} |
|
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 |
//import javax.persistence.Entity; |
|
13 |
//import javax.xml.bind.annotation.XmlAccessType; |
|
14 |
//import javax.xml.bind.annotation.XmlAccessorType; |
|
15 |
//import javax.xml.bind.annotation.XmlRootElement; |
|
16 |
//import javax.xml.bind.annotation.XmlType; |
|
17 |
// |
|
18 |
//import org.hibernate.envers.Audited; |
|
19 |
//import org.hibernate.search.annotations.Indexed; |
|
20 |
//import org.springframework.beans.factory.annotation.Configurable; |
|
21 |
// |
|
22 |
///** |
|
23 |
// * The taxon name class for cultivars (cultivated plants). The only possible |
|
24 |
// * {@link Rank ranks} for cultivars are CULTIVAR, GREX, CONVAR, CULTIVAR_GROUP, |
|
25 |
// * GRAFT_CHIMAERA or DENOMINATION_CLASS. |
|
26 |
// * <P> |
|
27 |
// * This class corresponds partially to: NameBotanical according to the |
|
28 |
// * ABCD schema. |
|
29 |
// * |
|
30 |
// * @author m.doering |
|
31 |
// * @created 08-Nov-2007 13:06:18 |
|
32 |
// */ |
|
33 |
//@XmlAccessorType(XmlAccessType.FIELD) |
|
34 |
//@XmlType(name = "", propOrder = {}) |
|
35 |
//@XmlRootElement(name = "CultivarPlantName") |
|
36 |
//@Entity |
|
37 |
//@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase") |
|
38 |
//@Audited |
|
39 |
//@Configurable |
|
40 |
//public class CultivarPlantName3{ |
|
41 |
//// extends BotanicalName { |
|
42 |
//// private static final long serialVersionUID = -7948375817971980004L; |
|
43 |
//// |
|
44 |
//// @SuppressWarnings("unused") |
|
45 |
//// private static final Logger logger = Logger.getLogger(ICultivarPlantName.class); |
|
46 |
//// |
|
47 |
//// private static final NomenclaturalCode code = NomenclaturalCode.ICNCP; |
|
48 |
// |
|
49 |
// |
|
50 |
// // ************* CONSTRUCTORS *************/ |
|
51 |
// /** |
|
52 |
// * Class constructor: creates a new cultivar taxon name instance |
|
53 |
// * only containing the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}. |
|
54 |
// * |
|
55 |
// * @see #CultivarPlantName(Rank, HomotypicalGroup) |
|
56 |
// * @see eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy |
|
57 |
// */ |
|
58 |
//// public CultivarPlantName(){ |
|
59 |
//// super(code); |
|
60 |
//// } |
|
61 |
// |
|
62 |
// /** |
|
63 |
// * Class constructor: creates a new cultivar taxon name instance |
|
64 |
// * only containing its {@link Rank rank}, |
|
65 |
// * its {@link HomotypicalGroup homotypical group} and |
|
66 |
// * the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}. |
|
67 |
// * The new cultivar taxon name instance will be also added to the set of |
|
68 |
// * cultivar taxon names belonging to this homotypical group. |
|
69 |
// * |
|
70 |
// * @param rank the rank to be assigned to <i>this</i> cultivar taxon name |
|
71 |
// * @param homotypicalGroup the homotypical group to which <i>this</i> cultivar taxon name belongs |
|
72 |
// * @see #CultivarPlantName() |
|
73 |
// * @see eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy |
|
74 |
// */ |
|
75 |
//// protected CultivarPlantName(Rank rank, HomotypicalGroup homotypicalGroup) { |
|
76 |
//// super(code, rank, homotypicalGroup); |
|
77 |
//// } |
|
78 |
// |
|
79 |
// |
|
80 |
////************************* |
|
81 |
// |
|
82 |
// |
|
83 |
// /** |
|
84 |
// * Returns the {@link NomenclaturalCode nomenclatural code} that governs |
|
85 |
// * the construction of <i>this</i> cultivar taxon name, that is the |
|
86 |
// * International Code of Nomenclature for Cultivated Plants. This method |
|
87 |
// * overrides the getNomenclaturalCode method from {@link NonViralName#getNomenclaturalCode() NonViralName}. |
|
88 |
// * |
|
89 |
// * @return the nomenclatural code for cultivated plants |
|
90 |
// * @see NonViralName#isCodeCompliant() |
|
91 |
// * @see TaxonNameBase#getHasProblem() |
|
92 |
// */ |
|
93 |
//// public NomenclaturalCode getNomenclaturalCode(){ |
|
94 |
//// return code; |
|
95 |
//// } |
|
96 |
// |
|
97 |
// |
|
98 |
////*********************** CLONE ********************************************************/ |
|
99 |
// |
|
100 |
// /** |
|
101 |
// * Clones <i>this</i> cultivar plant name. This is a shortcut that enables to create |
|
102 |
// * a new instance that differs only slightly from <i>this</i> cultivar plant name by |
|
103 |
// * modifying only some of the attributes. |
|
104 |
// * |
|
105 |
// * @see eu.etaxonomy.cdm.model.name.BotanicalName#clone() |
|
106 |
// * @see java.lang.Object#clone() |
|
107 |
// */ |
|
108 |
// @Override |
|
109 |
// public Object clone() { |
|
110 |
// ICultivarPlantName result = (ICultivarPlantName)super.clone(); |
|
111 |
// //no changes to: |
|
112 |
// return result; |
|
113 |
// } |
|
114 |
// |
|
115 |
//} |
Also available in: Unified diff
ref #6368 remove TaxonNameBase subclasses