1 package eu
.etaxonomy
.cdm
.api
.service
.dto
;
3 import java
.util
.ArrayList
;
7 import eu
.etaxonomy
.cdm
.model
.occurrence
.FieldUnit
;
11 public class FieldUnitDTO
extends DerivateDTO
{
13 private static final long serialVersionUID
= 3981843956067273220L;
16 private String country
;
17 private String collectingString
;
19 private String collectionString
;
21 private boolean hasType
;
22 private List
<UUID
> taxonRelatedDerivedUnits
= new ArrayList
<>();
24 private GatheringEventDTO gatheringEvent
;
30 public FieldUnitDTO(FieldUnit fieldUnit
) {
35 public static FieldUnitDTO
newInstance(FieldUnit fieldUnit
){
36 FieldUnitDTO fieldUnitDto
= new FieldUnitDTO(fieldUnit
);
37 if (fieldUnit
.getGatheringEvent() != null){
38 fieldUnitDto
.gatheringEvent
= GatheringEventDTO
.newInstance(fieldUnit
.getGatheringEvent());
40 fieldUnitDto
.setRecordBase(fieldUnit
.getRecordBasis().getMessage());
41 fieldUnitDto
.setListLabel(fieldUnit
.getTitleCache());
50 public String
getCountry() {
54 * @param country the country to set
56 public void setCountry(String country
) {
57 this.country
= country
;
60 * @return the collectionString
63 public String
getCollection() {
64 return collectionString
;
67 * @param collectionString the collectionString to set
70 public void setCollection(String collection
) {
71 this.collectionString
= collection
;
75 * @return the collectionString
78 public String
getCollectingString() {
79 return collectingString
;
82 * @param collectionString the collectionString to set
84 public void setCollectingString(String collectingString
) {
85 this.collectingString
= collectingString
;
91 public String
getDate() {
95 * @param date the date to set
97 public void setDate(String date
) {
103 * @return the hasType
105 public boolean isHasType() {
109 * @param hasType the hasType to set
111 public void setHasType(boolean hasType
) {
112 this.hasType
= hasType
;
115 public GatheringEventDTO
getGatheringEvent() {
116 return gatheringEvent
;
118 public void setGatheringEvent(GatheringEventDTO gatheringEvent
) {
119 this.gatheringEvent
= gatheringEvent
;
124 * @return the taxonRelatedDerivedUnits
126 public List
<UUID
> getTaxonRelatedDerivedUnits() {
127 return taxonRelatedDerivedUnits
;
132 * @param taxonRelatedDerivedUnits the taxonRelatedDerivedUnits to set
134 public void setTaxonRelatedDerivedUnits(List
<UUID
> taxonRelatedDerivedUnits
) {
135 this.taxonRelatedDerivedUnits
= taxonRelatedDerivedUnits
;
140 * @param derivedUnitDTO
142 public void addTaxonRelatedDerivedUnits(DerivateDTO derivedUnitDTO
) {
143 if (this.taxonRelatedDerivedUnits
== null){
144 this.taxonRelatedDerivedUnits
= new ArrayList
<>();
146 this.taxonRelatedDerivedUnits
.add(derivedUnitDTO
.getUuid());