(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / name / ZoologicalName.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 eu.etaxonomy.cdm.model.agent.Agent;
16 import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
17 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
18 import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
19 import eu.etaxonomy.cdm.strategy.cache.BotanicNameDefaultCacheStrategy;
20 import eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy;
21
22 import java.util.*;
23 import javax.persistence.*;
24
25 /**
26 * Taxon name class for animals
27 * @author m.doering
28 * @version 1.0
29 * @created 08-Nov-2007 13:07:03
30 */
31 @Entity
32 public class ZoologicalName extends NonViralName {
33 static Logger logger = Logger.getLogger(ZoologicalName.class);
34
35 //Name of the breed of an animal
36 private String breed;
37 private Integer publicationYear;
38 private Integer originalPublicationYear;
39
40
41 public static ZoologicalName NewInstance(Rank rank){
42 return new ZoologicalName(rank, null);
43 }
44
45 public static ZoologicalName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
46 return new ZoologicalName(rank, homotypicalGroup);
47 }
48 public static ZoologicalName NewInstance(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
49 return new ZoologicalName(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
50 }
51
52 protected ZoologicalName() {
53 this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
54 }
55
56 protected ZoologicalName(Rank rank, HomotypicalGroup homotypicalGroup) {
57 super(rank, homotypicalGroup);
58 this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
59 }
60
61 protected ZoologicalName (Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
62 super(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
63 this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
64 }
65
66 public String getBreed(){
67 return this.breed;
68 }
69 public void setBreed(String breed){
70 this.breed = breed;
71 }
72
73 public Integer getPublicationYear() {
74 return publicationYear;
75 }
76 public void setPublicationYear(Integer publicationYear) {
77 this.publicationYear = publicationYear;
78 }
79
80 public Integer getOriginalPublicationYear() {
81 return originalPublicationYear;
82 }
83 public void setOriginalPublicationYear(Integer originalPublicationYear) {
84 this.originalPublicationYear = originalPublicationYear;
85 }
86
87 }