2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.occurrence
;
12 import java
.util
.Calendar
;
14 import javax
.persistence
.Entity
;
15 import javax
.persistence
.ManyToOne
;
16 import javax
.persistence
.Transient
;
18 import org
.apache
.log4j
.Logger
;
19 import eu
.etaxonomy
.cdm
.model
.agent
.Agent
;
20 import eu
.etaxonomy
.cdm
.model
.common
.EventBase
;
21 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
22 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
25 * The event when gathering a specimen or recording a field observation only
30 public class GatheringEvent
extends EventBase
{
31 static Logger logger
= Logger
.getLogger(GatheringEvent
.class);
33 //Locality name (as free text) where this occurrence happened
34 private String locality
;
35 private Point exactLocation
;
36 private NamedArea collectingArea
;
37 private String collectingMethod
;
38 // meter above/below sea level of the surface
39 private Integer absoluteElevation
;
40 private Integer absoluteElevationError
;
41 // distance in meter from the ground surface when collecting. E.g. 10m below the ground or 10m above the ground/bottom of a lake or 20m up in the canope
42 private Integer distanceToGround
;
43 // distance in meters to lake or sea surface. Simmilar to distanceToGround use negative integers for distance *below* the surface, ie under water
44 private Integer distanceToWaterSurface
;
51 public static GatheringEvent
NewInstance(){
52 return new GatheringEvent();
58 protected GatheringEvent() {
62 public Point
getExactLocation(){
63 return this.exactLocation
;
65 public void setExactLocation(Point exactLocation
){
66 this.exactLocation
= exactLocation
;
70 public NamedArea
getCollectingArea(){
71 return this.collectingArea
;
73 public void setCollectingArea(NamedArea area
){
74 this.collectingArea
= area
;
77 public String
getLocality(){
80 public void setLocality(String locality
){
81 this.locality
= locality
;
85 * EventBase managed attributes
89 public Calendar
getGatheringDate(){
90 return this.getTimeperiod().getStart();
92 public void setGatheringDate(Calendar gatheringDate
){
93 this.getTimeperiod().setStart(gatheringDate
);
97 public Agent
getCollector(){
98 return this.getActor();
100 public void setCollector(Agent collector
){
101 this.setActor(collector
);
105 public String
getCollectingMethod() {
106 return collectingMethod
;
108 public void setCollectingMethod(String collectingMethod
) {
109 this.collectingMethod
= collectingMethod
;
113 public Integer
getAbsoluteElevation() {
114 return absoluteElevation
;
117 public void setAbsoluteElevation(Integer absoluteElevation
) {
118 this.absoluteElevation
= absoluteElevation
;
122 public Integer
getAbsoluteElevationError() {
123 return absoluteElevationError
;
125 public void setAbsoluteElevationError(Integer absoluteElevationError
) {
126 this.absoluteElevationError
= absoluteElevationError
;
128 public Integer
getDistanceToGround() {
129 return distanceToGround
;
131 public void setDistanceToGround(Integer distanceToGround
) {
132 this.distanceToGround
= distanceToGround
;
134 public Integer
getDistanceToWaterSurface() {
135 return distanceToWaterSurface
;
137 public void setDistanceToWaterSurface(Integer distanceToWaterSurface
) {
138 this.distanceToWaterSurface
= distanceToWaterSurface
;