Revision e6d7b501
Added by Andreas Müller almost 7 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/NonViralName.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.hibernate.envers.Audited; |
|
20 |
import org.hibernate.search.annotations.Indexed; |
|
21 |
import org.springframework.beans.factory.annotation.Configurable; |
|
22 |
|
|
23 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
|
24 |
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference; |
|
25 |
import eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy; |
|
26 |
import eu.etaxonomy.cdm.validation.Level2; |
|
27 |
import eu.etaxonomy.cdm.validation.Level3; |
|
28 |
import eu.etaxonomy.cdm.validation.annotation.CorrectEpithetsForRank; |
|
29 |
import eu.etaxonomy.cdm.validation.annotation.NameMustHaveAuthority; |
|
30 |
import eu.etaxonomy.cdm.validation.annotation.NoDuplicateNames; |
|
31 |
|
|
32 |
/** |
|
33 |
* The taxon name class for all non viral taxa. Parenthetical authorship is derived |
|
34 |
* from basionym relationship. The scientific name including author strings and |
|
35 |
* maybe year can be stored as a string in the inherited {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity#getTitleCache() titleCache} attribute. |
|
36 |
* The year itself is an information obtained from the {@link eu.etaxonomy.cdm.model.reference.Reference#getYear() nomenclatural reference}. |
|
37 |
* The scientific name string without author strings and year can be stored in the {@link #getNameCache() nameCache} attribute. |
|
38 |
* <P> |
|
39 |
* This class corresponds partially to: <ul> |
|
40 |
* <li> TaxonName according to the TDWG ontology |
|
41 |
* <li> ScientificName and CanonicalName according to the TCS |
|
42 |
* <li> ScientificName according to the ABCD schema |
|
43 |
* </ul> |
|
44 |
* |
|
45 |
* @author m.doering |
|
46 |
* @created 08-Nov-2007 13:06:39 |
|
47 |
*/ |
|
48 |
@XmlAccessorType(XmlAccessType.FIELD) |
|
49 |
@XmlType(name = "NonViralName", propOrder = {}) |
|
50 |
@XmlRootElement(name = "NonViralName") |
|
51 |
@Entity |
|
52 |
@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase") |
|
53 |
@Audited |
|
54 |
@Configurable |
|
55 |
|
|
56 |
@CorrectEpithetsForRank(groups = Level2.class) |
|
57 |
@NameMustHaveAuthority(groups = Level2.class) |
|
58 |
@NoDuplicateNames(groups = Level3.class) |
|
59 |
public class NonViralName<T extends NonViralName<?>> |
|
60 |
extends TaxonNameBase<T, INameCacheStrategy>{ |
|
61 |
|
|
62 |
private static final long serialVersionUID = -9083811681449792683L; |
|
63 |
|
|
64 |
private static final NomenclaturalCode code = NomenclaturalCode.ICZN; |
|
65 |
|
|
66 |
// ************************** CONSTRUCTORS *************/ |
|
67 |
|
|
68 |
//needed by hibernate |
|
69 |
protected NonViralName(){ |
|
70 |
super(code); |
|
71 |
} |
|
72 |
|
|
73 |
protected NonViralName(NomenclaturalCode code){ |
|
74 |
super(code); |
|
75 |
} |
|
76 |
|
|
77 |
protected NonViralName(Rank rank, HomotypicalGroup homotypicalGroup) { |
|
78 |
super(code, rank, homotypicalGroup); |
|
79 |
} |
|
80 |
|
|
81 |
protected NonViralName(NomenclaturalCode code, Rank rank, HomotypicalGroup homotypicalGroup) { |
|
82 |
super(code, rank, homotypicalGroup); |
|
83 |
} |
|
84 |
|
|
85 |
protected NonViralName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) { |
|
86 |
super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup); |
|
87 |
} |
|
88 |
protected NonViralName(NomenclaturalCode code, Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) { |
|
89 |
super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup); |
|
90 |
} |
|
91 |
|
|
92 |
//*********************** CLONE ********************************************************/ |
|
93 |
|
|
94 |
@Override |
|
95 |
public Object clone() { |
|
96 |
INonViralName result = (INonViralName)super.clone(); |
|
97 |
|
|
98 |
//no changes to: |
|
99 |
return result; |
|
100 |
} |
|
101 |
} |
|
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 |
//import eu.etaxonomy.cdm.validation.Level2; |
|
24 |
//import eu.etaxonomy.cdm.validation.Level3; |
|
25 |
//import eu.etaxonomy.cdm.validation.annotation.CorrectEpithetsForRank; |
|
26 |
//import eu.etaxonomy.cdm.validation.annotation.NameMustHaveAuthority; |
|
27 |
//import eu.etaxonomy.cdm.validation.annotation.NoDuplicateNames; |
|
28 |
// |
|
29 |
///** |
|
30 |
// * The taxon name class for all non viral taxa. Parenthetical authorship is derived |
|
31 |
// * from basionym relationship. The scientific name including author strings and |
|
32 |
// * maybe year can be stored as a string in the inherited {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity#getTitleCache() titleCache} attribute. |
|
33 |
// * The year itself is an information obtained from the {@link eu.etaxonomy.cdm.model.reference.Reference#getYear() nomenclatural reference}. |
|
34 |
// * The scientific name string without author strings and year can be stored in the {@link #getNameCache() nameCache} attribute. |
|
35 |
// * <P> |
|
36 |
// * This class corresponds partially to: <ul> |
|
37 |
// * <li> TaxonName according to the TDWG ontology |
|
38 |
// * <li> ScientificName and CanonicalName according to the TCS |
|
39 |
// * <li> ScientificName according to the ABCD schema |
|
40 |
// * </ul> |
|
41 |
// * |
|
42 |
// * @author m.doering |
|
43 |
// * @created 08-Nov-2007 13:06:39 |
|
44 |
// */ |
|
45 |
//@XmlAccessorType(XmlAccessType.FIELD) |
|
46 |
//@XmlType(name = "NonViralName", propOrder = {}) |
|
47 |
//@XmlRootElement(name = "NonViralName") |
|
48 |
//@Entity |
|
49 |
//@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonNameBase") |
|
50 |
//@Audited |
|
51 |
//@Configurable |
|
52 |
// |
|
53 |
//@CorrectEpithetsForRank(groups = Level2.class) |
|
54 |
//@NameMustHaveAuthority(groups = Level2.class) |
|
55 |
//@NoDuplicateNames(groups = Level3.class) |
|
56 |
//public class NonViralName3 |
|
57 |
//// <T extends NonViralName<?>> |
|
58 |
//// extends TaxonNameBase<T, INameCacheStrategy> |
|
59 |
//{ |
|
60 |
// |
|
61 |
//// private static final long serialVersionUID = -9083811681449792683L; |
|
62 |
//// |
|
63 |
//// private static final NomenclaturalCode code = NomenclaturalCode.ICZN; |
|
64 |
// |
|
65 |
//// ************************** CONSTRUCTORS *************/ |
|
66 |
// |
|
67 |
// //needed by hibernate |
|
68 |
//// protected NonViralName(){ |
|
69 |
//// super(code); |
|
70 |
//// } |
|
71 |
//// |
|
72 |
//// protected NonViralName(NomenclaturalCode code){ |
|
73 |
//// super(code); |
|
74 |
//// } |
|
75 |
//// |
|
76 |
//// protected NonViralName(Rank rank, HomotypicalGroup homotypicalGroup) { |
|
77 |
//// super(code, rank, homotypicalGroup); |
|
78 |
//// } |
|
79 |
//// |
|
80 |
//// protected NonViralName(NomenclaturalCode code, Rank rank, HomotypicalGroup homotypicalGroup) { |
|
81 |
//// super(code, rank, homotypicalGroup); |
|
82 |
//// } |
|
83 |
//// |
|
84 |
//// protected NonViralName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) { |
|
85 |
//// super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup); |
|
86 |
//// } |
|
87 |
//// protected NonViralName(NomenclaturalCode code, Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) { |
|
88 |
//// super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup); |
|
89 |
//// } |
|
90 |
// |
|
91 |
////*********************** CLONE ********************************************************/ |
|
92 |
// |
|
93 |
// @Override |
|
94 |
// public Object clone() { |
|
95 |
// INonViralName result = (INonViralName)super.clone(); |
|
96 |
// |
|
97 |
// //no changes to: |
|
98 |
// return result; |
|
99 |
// } |
|
100 |
//} |
Also available in: Unified diff
ref #6368 remove TaxonNameBase subclasses