Project

General

Profile

Download (10 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.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 plants and fungi.
25
// * <P>
26
// * This class corresponds to: NameBotanical according to the ABCD schema.
27
// *
28
// * @author m.doering
29
// * @created 08-Nov-2007 13:06:15
30
// */
31
//@XmlAccessorType(XmlAccessType.FIELD)
32
//@XmlType(name = "BotanicalName", propOrder = {
33
//        "anamorphic"
34
//})
35
//@XmlRootElement(name = "BotanicalName")
36
//@Entity
37
//@Indexed(index = "eu.etaxonomy.cdm.model.name.TaxonName")
38
//@Audited
39
//@Configurable
40
//public class BotanicalName4
41
////            extends NonViralName<IBotanicalName>
42
//            /*, IMergable*/ {
43
////    private static final long serialVersionUID = -3484146190510367749L;
44
////    @SuppressWarnings("unused")
45
////	private static final Logger logger = Logger.getLogger(IBotanicalName.class);
46
////
47
////    private static final NomenclaturalCode code = NomenclaturalCode.ICNAFP;
48
//
49
////    IBotanicalName,
50
//
51
//    //ICNAFP
52
//
53
//
54
//
55
//    // ************* ICNAFP Names
56
//
57
////    /**
58
////     * Returns the boolean value of the flag indicating whether the specimen
59
////     * type of <i>this</i> botanical taxon name for a fungus is asexual (true) or not
60
////     * (false). This applies only in case of fungi. The Article 59 of the ICBN
61
////     * permits mycologists to give asexually reproducing fungi (anamorphs)
62
////     * separate names from their sexual states (teleomorphs).
63
////     *
64
////     * @return  the boolean value of the isAnamorphic flag
65
////     */
66
////    public boolean isAnamorphic(){
67
////        return this.anamorphic;
68
////    }
69
////
70
////    /**
71
////     * @see  #isAnamorphic()
72
////     */
73
////    public void setAnamorphic(boolean anamorphic){
74
////        this.anamorphic = anamorphic;
75
////    }
76
//
77
//	// ************* CONSTRUCTORS *************/
78
//	//needed by hibernate
79
//	/**
80
//	 * Class constructor: creates a new botanical taxon name instance
81
//	 * only containing the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}.
82
//	 *
83
//	 * @see #BotanicalName(Rank, HomotypicalGroup)
84
//	 * @see #BotanicalName(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
85
//	 * @see eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy
86
//	 */
87
////	protected BotanicalName(){
88
////		super(code);
89
////		this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
90
////	}
91
////	protected BotanicalName(NomenclaturalCode code){
92
////        super(code);
93
////        this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
94
////    }
95
//
96
//	/**
97
//	 * Class constructor: creates a new botanical taxon name instance
98
//	 * only containing its {@link Rank rank},
99
//	 * its {@link HomotypicalGroup homotypical group} and
100
//	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}.
101
//	 * The new botanical taxon name instance will be also added to the set of
102
//	 * botanical taxon names belonging to this homotypical group.
103
//	 *
104
//	 * @param	rank  the rank to be assigned to <i>this</i> botanical taxon name
105
//	 * @param	homotypicalGroup  the homotypical group to which <i>this</i> botanical taxon name belongs
106
//	 * @see 	#BotanicalName()
107
//	 * @see 	#BotanicalName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
108
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy
109
//	 */
110
////	protected BotanicalName(Rank rank, HomotypicalGroup homotypicalGroup) {
111
////		super(code, rank, homotypicalGroup);
112
////		this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
113
////	}
114
////    protected BotanicalName(NomenclaturalCode code, Rank rank, HomotypicalGroup homotypicalGroup) {
115
////        super(code, rank, homotypicalGroup);
116
////        this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
117
////    }
118
//
119
//	/**
120
//	 * Class constructor: creates a new botanical taxon name instance
121
//	 * containing its {@link Rank rank},
122
//	 * its {@link HomotypicalGroup homotypical group},
123
//	 * its scientific name components, its {@link eu.etaxonomy.cdm.model.agent.TeamOrPersonBase author(team)},
124
//	 * its {@link eu.etaxonomy.cdm.model.reference.INomenclaturalReference nomenclatural reference} and
125
//	 * the {@link eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy default cache strategy}.
126
//	 * The new botanical taxon name instance will be also added to the set of
127
//	 * botanical taxon names belonging to this homotypical group.
128
//	 *
129
//	 * @param	rank  the rank to be assigned to <i>this</i> botanical taxon name
130
//	 * @param	genusOrUninomial the string for <i>this</i> botanical taxon name
131
//	 * 			if its rank is genus or higher or for the genus part
132
//	 * 			if its rank is lower than genus
133
//	 * @param	infraGenericEpithet  the string for the first epithet of
134
//	 * 			<i>this</i> botanical taxon name if its rank is lower than genus
135
//	 * 			and higher than species aggregate
136
//	 * @param	specificEpithet  the string for the first epithet of
137
//	 * 			<i>this</i> botanical taxon name if its rank is species aggregate or lower
138
//	 * @param	infraSpecificEpithet  the string for the second epithet of
139
//	 * 			<i>this</i> botanical taxon name if its rank is lower than species
140
//	 * @param	combinationAuthorship  the author or the team who published <i>this</i> botanical taxon name
141
//	 * @param	nomenclaturalReference  the nomenclatural reference where <i>this</i> botanical taxon name was published
142
//	 * @param	nomenclMicroRef  the string with the details for precise location within the nomenclatural reference
143
//	 * @param	homotypicalGroup  the homotypical group to which <i>this</i> botanical taxon name belongs
144
//	 * @see 	#BotanicalName()
145
//	 * @see 	#BotanicalName(Rank, HomotypicalGroup)
146
//	 * @see		#NewBotanicalInstance(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
147
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.BotanicNameDefaultCacheStrategy
148
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy
149
//	 * @see 	eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy
150
//	 */
151
////	protected BotanicalName(NomenclaturalCode code, Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
152
////		super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
153
////		this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
154
////	}
155
////    protected BotanicalName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorship, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
156
////        super(code, rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorship, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
157
////        this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
158
////    }
159
//
160
//
161
////*************************
162
//
163
//
164
//
165
//	/**
166
//	 * Returns the {@link NomenclaturalCode nomenclatural code} that governs
167
//	 * the construction of <i>this</i> botanical taxon name, that is the
168
//	 * International Code of Botanical Nomenclature. This method overrides
169
//	 * the getNomenclaturalCode method from {@link INonViralName NonViralName}.
170
//	 *
171
//	 * @return  the nomenclatural code for plants
172
//	 * @see  	NonViralName#isCodeCompliant()
173
//	 * @see  	TaxonName#getHasProblem()
174
//	 */
175
////
176
////	public NomenclaturalCode getNomenclaturalCode(){
177
////		return code;
178
////	}
179
//
180
//
181
//	/**
182
//	 * Checks if this name is an autonym.<BR>
183
//	 * An autonym is a taxon name that has equal specific and infra specific epithets.<BR>
184
//	 * {@link http://ibot.sav.sk/icbn/frameset/0010Ch2Sec1a006.htm#6.8. Vienna Code §6.8}
185
//	 * or a taxon name that has equal generic and infrageneric epithets (A22.2)
186
//	 * @return true, if name has Rank, Rank is below species and species epithet equals infraSpeciesEpithtet, else false
187
//	 */
188
////	@Override
189
////	public boolean isAutonym(){
190
////		if (this.getRank() != null && this.getSpecificEpithet() != null && this.getInfraSpecificEpithet() != null &&
191
////				this.isInfraSpecific() && this.getSpecificEpithet().trim().equals(this.getInfraSpecificEpithet().trim())){
192
////			return true;
193
////		}else if (this.getRank() != null && this.getGenusOrUninomial() != null && this.getInfraGenericEpithet() != null &&
194
////				this.isInfraGeneric() && this.getGenusOrUninomial().trim().equals(this.getInfraGenericEpithet().trim())){
195
////			return true;
196
////		}else{
197
////			return false;
198
////		}
199
////	}
200
//
201
////*********************** CLONE ********************************************************/
202
//
203
//	/**
204
//	 * Clones <i>this</i> botanical name. This is a shortcut that enables to create
205
//	 * a new instance that differs only slightly from <i>this</i> botanical name by
206
//	 * modifying only some of the attributes.
207
//	 *
208
//	 * @see eu.etaxonomy.cdm.model.name.NonViralName#clone()
209
//	 * @see java.lang.Object#clone()
210
//	 */
211
//	@Override
212
//    public Object clone() {
213
//		IBotanicalName result = (IBotanicalName)super.clone();
214
//		//no changes to:
215
//		return result;
216
//	}
217
//
218
//
219
//}
(2-2/42)