(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / occurrence / DeterminationEvent.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.occurrence;
11
12
13 import eu.etaxonomy.cdm.model.agent.Agent;
14 import eu.etaxonomy.cdm.model.agent.Team;
15 import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
16 import eu.etaxonomy.cdm.model.taxon.Taxon;
17
18 import org.apache.log4j.Logger;
19 import org.hibernate.annotations.Cascade;
20 import org.hibernate.annotations.CascadeType;
21
22 import eu.etaxonomy.cdm.model.common.EventBase;
23
24 import java.util.*;
25 import javax.persistence.*;
26
27 /**
28 * @author m.doering
29 * @version 1.0
30 * @created 08-Nov-2007 13:06:21
31 */
32 @Entity
33 public class DeterminationEvent extends EventBase {
34 static Logger logger = Logger.getLogger(DeterminationEvent.class);
35
36 private SpecimenOrObservationBase identifiedUnit;
37 private Taxon taxon;
38 private DeterminationModifier modifier;
39
40 @ManyToOne
41 public DeterminationModifier getModifier() {
42 return modifier;
43 }
44
45 public void setModifier(DeterminationModifier modifier) {
46 this.modifier = modifier;
47 }
48
49 @ManyToOne
50 public Taxon getTaxon(){
51 return this.taxon;
52 }
53
54 /**
55 *
56 * @param taxon taxon
57 */
58 public void setTaxon(Taxon taxon){
59 this.taxon = taxon;
60 }
61
62
63 @Transient
64 public Calendar getIdentificationDate(){
65 return this.getTimeperiod().getStart();
66 }
67
68 /**
69 *
70 * @param identificationDate identificationDate
71 */
72 public void setIdentificationDate(Calendar identificationDate){
73 this.getTimeperiod().setStart(identificationDate);
74 }
75
76 @Transient
77 public Agent getDeterminer() {
78 return this.getActor();
79 }
80 public void setDeterminer(Agent determiner) {
81 this.setActor(determiner);
82 }
83
84 @ManyToOne
85 public SpecimenOrObservationBase getIdentifiedUnit() {
86 return identifiedUnit;
87 }
88
89 public void setIdentifiedUnit(SpecimenOrObservationBase identifiedUnit) {
90 this.identifiedUnit = identifiedUnit;
91 }
92
93 }