(no commit message)
[cdmlib.git] / 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
13 import org.apache.log4j.Logger;
14
15 import javax.persistence.*;
16
17 /**
18 * Taxon name class for cultivars. {only possible for CULTIVAR, GREX, CONVAR,
19 * CULTIVAR_GROUP, GRAFT_CHIMAERA and DENOMINATION_CLASS ranks}
20 * @author m.doering
21 * @version 1.0
22 * @created 08-Nov-2007 13:06:18
23 */
24 @Entity
25 public class CultivarPlantName extends BotanicalName {
26 static Logger logger = Logger.getLogger(CultivarPlantName.class);
27
28 //the caracteristical name of the cultivar
29 private String cultivarName;
30
31
32 public static CultivarPlantName NewInstance(Rank rank){
33 return new CultivarPlantName(rank, null);
34 }
35
36 public static CultivarPlantName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
37 return new CultivarPlantName(rank, homotypicalGroup);
38 }
39
40 protected CultivarPlantName(Rank rank, HomotypicalGroup homotypicalGroup) {
41 super(rank, homotypicalGroup);
42 }
43
44 public String getCultivarName(){
45 return this.cultivarName;
46 }
47
48 /**
49 *
50 * @param cultivarName cultivarName
51 */
52 public void setCultivarName(String cultivarName){
53 this.cultivarName = cultivarName;
54 }
55
56
57 @Transient
58 @Override
59 public NomenclaturalCode getNomeclaturalCode(){
60 return NomenclaturalCode.ICNCP();
61 }
62
63 }