merge-update from trunk
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / dto / DerivateHierarchyDTO.java
1 package eu.etaxonomy.cdm.api.service.dto;
2
3 import java.util.ArrayList;
4 import java.util.HashMap;
5 import java.util.List;
6 import java.util.Map;
7
8 import org.hibernate.envers.tools.Pair;
9
10 public class DerivateHierarchyDTO {
11
12 //Filter Flags
13 private boolean hasDna;
14 private boolean hasDetailImage;
15
16 //Row Attributes
17 private String country;
18 private String collection;
19 private String date;
20 private String herbarium;
21 private boolean hasType;
22 private boolean hasSpecimenScan;
23
24 //Detail pop-down
25 private String taxonName;
26 private String protologue;
27 private String citation;
28 private Map<String, List<String>> types;
29 private List<Pair<String, String>> specimenScans;
30 private List<Pair<String, String>> molecularData;
31 private List<Pair<String, String>> detailImages;
32 /**
33 * @return the hasDna
34 */
35 public boolean isHasDna() {
36 return hasDna;
37 }
38 /**
39 * @param hasDna the hasDna to set
40 */
41 public void setHasDna(boolean hasDna) {
42 this.hasDna = hasDna;
43 }
44 /**
45 * @return the hasDetailImage
46 */
47 public boolean isHasDetailImage() {
48 return hasDetailImage;
49 }
50 /**
51 * @param hasDetailImage the hasDetailImage to set
52 */
53 public void setHasDetailImage(boolean hasDetailImage) {
54 this.hasDetailImage = hasDetailImage;
55 }
56 /**
57 * @return the country
58 */
59 public String getCountry() {
60 return country;
61 }
62 /**
63 * @param country the country to set
64 */
65 public void setCountry(String country) {
66 this.country = country;
67 }
68 /**
69 * @return the collection
70 */
71 public String getCollection() {
72 return collection;
73 }
74 /**
75 * @param collection the collection to set
76 */
77 public void setCollection(String collection) {
78 this.collection = collection;
79 }
80 /**
81 * @return the date
82 */
83 public String getDate() {
84 return date;
85 }
86 /**
87 * @param date the date to set
88 */
89 public void setDate(String date) {
90 this.date = date;
91 }
92 /**
93 * @return the herbarium
94 */
95 public String getHerbarium() {
96 return herbarium;
97 }
98 /**
99 * @param herbarium the herbarium to set
100 */
101 public void setHerbarium(String herbarium) {
102 this.herbarium = herbarium;
103 }
104 /**
105 * @return the hasType
106 */
107 public boolean isHasType() {
108 return hasType;
109 }
110 /**
111 * @param hasType the hasType to set
112 */
113 public void setHasType(boolean hasType) {
114 this.hasType = hasType;
115 }
116 /**
117 * @return the hasSpecimenScan
118 */
119 public boolean isHasSpecimenScan() {
120 return hasSpecimenScan;
121 }
122 /**
123 * @param hasSpecimenScan the hasSpecimenScan to set
124 */
125 public void setHasSpecimenScan(boolean hasSpecimenScan) {
126 this.hasSpecimenScan = hasSpecimenScan;
127 }
128 /**
129 * @return the taxonName
130 */
131 public String getTaxonName() {
132 return taxonName;
133 }
134 /**
135 * @param taxonName the taxonName to set
136 */
137 public void setTaxonName(String taxonName) {
138 this.taxonName = taxonName;
139 }
140 /**
141 * @return the protologue
142 */
143 public String getProtologue() {
144 return protologue;
145 }
146 /**
147 * @param protologue the protologue to set
148 */
149 public void setProtologue(String protologue) {
150 this.protologue = protologue;
151 }
152 /**
153 * @return the citation
154 */
155 public String getCitation() {
156 return citation;
157 }
158 /**
159 * @param citation the citation to set
160 */
161 public void setCitation(String citation) {
162 this.citation = citation;
163 }
164
165 /**
166 * @param types the types to set
167 */
168 public void setTypes(Map<String, List<String>> types) {
169 this.types = types;
170 }
171 /**
172 * @return the types
173 */
174 public Map<String, List<String>> getTypes() {
175 return types;
176 }
177 public void addTypes(String typeStatus, String accessionNumber){
178 if(types==null){
179 types = new HashMap<String, List<String>>();
180 }
181 List<String> list = types.get(typeStatus);
182 if(list==null){
183 list = new ArrayList<String>();
184 }
185 list.add(accessionNumber);
186 types.put(typeStatus, list);
187 }
188
189 /**
190 * @param specimenScans the specimenScans to set
191 */
192 public void setSpecimenScans(List<Pair<String, String>> specimenScans) {
193 this.specimenScans = specimenScans;
194 }
195 /**
196 * @return the specimenScans
197 */
198 public List<Pair<String, String>> getSpecimenScans() {
199 return specimenScans;
200 }
201
202 public void addSpecimenScan(String uri, String herbarium){
203 if(specimenScans==null){
204 specimenScans = new ArrayList<Pair<String,String>>();
205 }
206 specimenScans.add(new Pair<String, String>(uri, herbarium));
207 }
208
209 /**
210 * @return the molecularData
211 */
212 public List<Pair<String, String>> getMolecularData() {
213 return molecularData;
214 }
215
216 /**
217 * @param molecularData the molecularData to set
218 */
219 public void setMolecularData(List<Pair<String, String>> molecularData) {
220 this.molecularData = molecularData;
221 }
222
223 public void addMolecularData(String uri, String marker){
224 if(molecularData==null){
225 molecularData = new ArrayList<Pair<String,String>>();
226 }
227 molecularData.add(new Pair<String, String>(uri, marker));
228 }
229
230 /**
231 * @return the detailImages
232 */
233 public List<Pair<String, String>> getDetailImages() {
234 return detailImages;
235 }
236 /**
237 * @param detailImages the detailImages to set
238 */
239 public void setDetailImages(List<Pair<String, String>> detailImages) {
240 this.detailImages = detailImages;
241 }
242
243 public void addDetailImage(String uri, String motif){
244 if(detailImages==null){
245 detailImages = new ArrayList<Pair<String,String>>();
246 }
247 detailImages.add(new Pair<String, String>(uri, motif));
248 }
249
250
251 }