Revision 16833e53
Added by Katja Luther over 5 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/TaxonDescriptionDTO.java | ||
---|---|---|
26 | 26 |
public class TaxonDescriptionDTO implements Serializable{ |
27 | 27 |
|
28 | 28 |
private static final long serialVersionUID = -4440059497898077690L; |
29 |
Taxon taxon;
|
|
29 |
UUID taxonUUID;
|
|
30 | 30 |
Set<TaxonDescription> descriptions = new HashSet(); |
31 | 31 |
|
32 | 32 |
public TaxonDescriptionDTO(Taxon taxon){ |
33 |
this.taxon = taxon; |
|
33 |
// this.taxon = taxon;
|
|
34 | 34 |
for (TaxonDescription desc: taxon.getDescriptions()){ |
35 | 35 |
for (DescriptionElementBase element: desc.getElements()){ |
36 | 36 |
if (element instanceof Distribution){ |
... | ... | |
41 | 41 |
} |
42 | 42 |
} |
43 | 43 |
|
44 |
/** |
|
45 |
* @return the taxonUuid |
|
46 |
*/ |
|
47 |
public UUID getTaxonUuid() { |
|
48 |
return taxon.getUuid(); |
|
49 |
} |
|
44 |
|
|
50 | 45 |
|
51 | 46 |
|
52 | 47 |
/** |
53 |
* @return the taxon
|
|
48 |
* @return the descriptions
|
|
54 | 49 |
*/ |
55 |
public Taxon getTaxon() {
|
|
56 |
return taxon;
|
|
50 |
public Set<TaxonDescription> getDescriptions() {
|
|
51 |
return descriptions;
|
|
57 | 52 |
} |
58 | 53 |
|
59 |
|
|
60 | 54 |
/** |
61 |
* @param taxonUuid the taxonUuid to set
|
|
55 |
* @param descriptions the descriptions to set
|
|
62 | 56 |
*/ |
63 |
public void setTaxon(Taxon taxon) {
|
|
64 |
this.taxon = taxon;
|
|
57 |
public void setDescriptions(Set<TaxonDescription> descriptions) {
|
|
58 |
this.descriptions = descriptions;
|
|
65 | 59 |
} |
66 | 60 |
|
67 | 61 |
/** |
68 |
* @return the descriptions
|
|
62 |
* @return the taxonUUID
|
|
69 | 63 |
*/ |
70 |
public Set<TaxonDescription> getDescriptions() {
|
|
71 |
return descriptions;
|
|
64 |
public UUID getTaxonUUID() {
|
|
65 |
return taxonUUID;
|
|
72 | 66 |
} |
73 | 67 |
|
74 | 68 |
/** |
75 |
* @param descriptions the descriptions to set
|
|
69 |
* @param taxonUUID the taxonUUID to set
|
|
76 | 70 |
*/ |
77 |
public void setDescriptions(Set<TaxonDescription> descriptions) {
|
|
78 |
this.descriptions = descriptions;
|
|
71 |
public void setTaxonUUID(UUID taxonUUID) {
|
|
72 |
this.taxonUUID = taxonUUID;
|
|
79 | 73 |
} |
80 | 74 |
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
81 | 80 |
} |
Also available in: Unified diff
ref #7854: adapt DTOs