View Javadoc
1   package fr.ifremer.tutti.service.genericformat.csv;
2   
3   /*
4    * #%L
5    * Tutti :: Service
6    * %%
7    * Copyright (C) 2012 - 2014 Ifremer
8    * %%
9    * This program is free software: you can redistribute it and/or modify
10   * it under the terms of the GNU General Public License as
11   * published by the Free Software Foundation, either version 3 of the 
12   * License, or (at your option) any later version.
13   * 
14   * This program is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU General Public License for more details.
18   * 
19   * You should have received a copy of the GNU General Public 
20   * License along with this program.  If not, see
21   * <http://www.gnu.org/licenses/gpl-3.0.html>.
22   * #L%
23   */
24  
25  import fr.ifremer.tutti.persistence.entities.data.CatchBatch;
26  import fr.ifremer.tutti.persistence.entities.data.CatchBatchs;
27  import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
28  import fr.ifremer.tutti.persistence.entities.referential.Gear;
29  import fr.ifremer.tutti.persistence.entities.referential.Person;
30  import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation;
31  import fr.ifremer.tutti.persistence.entities.referential.Vessel;
32  import fr.ifremer.tutti.util.DateTimes;
33  import fr.ifremer.tutti.util.Numbers;
34  
35  import java.util.Date;
36  import java.util.List;
37  
38  /**
39   * A row in a operation export.
40   *
41   * @author Tony Chemit - chemit@codelutin.com
42   * @since 1.3
43   */
44  public class OperationRow extends RowWithOperationContextSupport {
45  
46      public static final String PROPERTY_GEAR_RANK_ORDER = "gearRankOrder";
47  
48      public static final String PROPERTY_DURATION = "duration";
49  
50      public static final String PROPERTY_CATCH_TOTAL_WEIGHT = "catchTotalWeight";
51  
52      public static final String PROPERTY_CATCH_TOTAL_WEIGHT_COMPUTED = "catchTotalWeightComputed";
53  
54      public static final String PROPERTY_CATCH_TOTAL_SORTED_TREMIS_WEIGHT = "catchTotalSortedTremisWeight";
55  
56      public static final String PROPERTY_CATCH_TOTAL_SORTED_TREMIS_WEIGHT_COMPUTED = "catchTotalSortedTremisWeightComputed";
57  
58      public static final String PROPERTY_CATCH_TOTAL_SORTED_CAROUSSEL_WEIGHT = "catchTotalSortedCarousselWeight";
59  
60      public static final String PROPERTY_CATCH_TOTAL_SORTED_CAROUSSEL_WEIGHT_COMPUTED = "catchTotalSortedCarousselWeightComputed";
61  
62      public static final String PROPERTY_CATCH_TOTAL_SORTED_WEIGHT = "catchTotalSortedWeight";
63  
64      public static final String PROPERTY_CATCH_TOTAL_SORTED_WEIGHT_COMPUTED = "catchTotalSortedWeightComputed";
65  
66      public static final String PROPERTY_CATCH_TOTAL_UNSORTED_WEIGHT = "catchTotalUnsortedWeight";
67  
68      public static final String PROPERTY_CATCH_TOTAL_UNSORTED_WEIGHT_COMPUTED = "catchTotalUnsortedWeightComputed";
69  
70      public static final String PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT = "catchTotalRejectedWeight";
71  
72      public static final String PROPERTY_CATCH_TOTAL_REJECTED_WEIGHT_COMPUTED = "catchTotalRejectedWeightComputed";
73  
74      public static final String PROPERTY_SPECIES_TOTAL_WEIGHT = "speciesTotalWeight";
75  
76      public static final String PROPERTY_SPECIES_TOTAL_WEIGHT_COMPUTED = "speciesTotalWeightComputed";
77  
78      public static final String PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT = "speciesTotalSortedWeight";
79  
80      public static final String PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT_COMPUTED = "speciesTotalSortedWeightComputed";
81  
82      public static final String PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT = "speciesTotalUnsortedWeight";
83  
84      public static final String PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT_COMPUTED = "speciesTotalUnsortedWeightComputed";
85  
86      public static final String PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_WEIGHT = "speciesTotalSampleSortedWeight";
87  
88      public static final String PROPERTY_SPECIES_TOTAL_SAMPLE_SORTED_WEIGHT_COMPUTED = "speciesTotalSampleSortedWeightComputed";
89  
90      public static final String PROPERTY_SPECIES_TOTAL_INERT_WEIGHT = "speciesTotalInertWeight";
91  
92      public static final String PROPERTY_SPECIES_TOTAL_INERT_WEIGHT_COMPUTED = "speciesTotalInertWeightComputed";
93  
94      public static final String PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT = "speciesTotalLivingNotItemizedWeight";
95  
96      public static final String PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT_COMPUTED = "speciesTotalLivingNotItemizedWeightComputed";
97  
98      public static final String PROPERTY_BENTHOS_TOTAL_WEIGHT = "benthosTotalWeight";
99  
100     public static final String PROPERTY_BENTHOS_TOTAL_WEIGHT_COMPUTED = "benthosTotalWeightComputed";
101 
102     public static final String PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT = "benthosTotalSortedWeight";
103 
104     public static final String PROPERTY_BENTHOS_TOTAL_SORTED_WEIGHT_COMPUTED = "benthosTotalSortedWeightComputed";
105 
106     public static final String PROPERTY_BENTHOS_TOTAL_UNSORTED_WEIGHT = "benthosTotalUnsortedWeight";
107 
108     public static final String PROPERTY_BENTHOS_TOTAL_UNSORTED_WEIGHT_COMPUTED = "benthosTotalUnsortedWeightComputed";
109 
110     public static final String PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_WEIGHT = "benthosTotalSampleSortedWeight";
111 
112     public static final String PROPERTY_BENTHOS_TOTAL_SAMPLE_SORTED_WEIGHT_COMPUTED = "benthosTotalSampleSortedWeightComputed";
113 
114     public static final String PROPERTY_BENTHOS_TOTAL_INERT_WEIGHT = "benthosTotalInertWeight";
115 
116     public static final String PROPERTY_BENTHOS_TOTAL_INERT_WEIGHT_COMPUTED = "benthosTotalInertWeightComputed";
117 
118     public static final String PROPERTY_BENTHOS_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT = "benthosTotalLivingNotItemizedWeight";
119 
120     public static final String PROPERTY_BENTHOS_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT_COMPUTED = "benthosTotalLivingNotItemizedWeightComputed";
121 
122     public static final String PROPERTY_MARINE_LITTER_TOTAL_WEIGHT = "marineLitterTotalWeight";
123 
124     public static final String PROPERTY_MARINE_LITTER_TOTAL_WEIGHT_COMPUTED = "marineLitterTotalWeightComputed";
125 
126     private static final long serialVersionUID = 1L;
127 
128     public static final String PROPERTY_CATCH_OBJECT_ID = "catchObjectId";
129 
130     public static final String PROPERTY_FISHING_OPERATION_OBJECT_ID = "fishingOperationObjectId";
131 
132     protected Short gearRankOrder;
133 
134     protected CatchBatch catchBatch;
135 
136     protected Boolean catchTotalWeightComputed;
137 
138     protected Boolean catchTotalRejectedWeightComputed;
139 
140     protected Boolean speciesTotalSortedWeightComputed;
141 
142     protected Boolean speciesTotalInertWeightComputed;
143 
144     protected Boolean speciesTotalLivingNotItemizedWeightComputed;
145 
146     protected Boolean benthosTotalSortedWeightComputed;
147 
148     protected Boolean benthosTotalInertWeightComputed;
149 
150     protected Boolean benthosTotalLivingNotItemizedWeightComputed;
151 
152     protected Boolean marineLitterTotalWeightComputed;
153 
154     private Boolean speciesTotalWeightComputed;
155 
156     private Boolean speciesTotalUnsortedWeightComputed;
157 
158     private Boolean speciesTotalSampleSortedWeightComputed;
159 
160     private Boolean benthosTotalWeightComputed;
161 
162     private Boolean benthosTotalUnsortedWeightComputed;
163 
164     private Boolean benthosTotalSampleSortedWeightComputed;
165 
166     protected Integer fishingOperationObjectId;
167 
168     protected Integer catchObjectId;
169 
170     public static OperationRow newEmptyInstance() {
171 
172         OperationRow row = new OperationRow();
173         row.forImport();
174         row.setCatchBatch(CatchBatchs.newCatchBatch());
175         return row;
176 
177     }
178 
179     public void setCatchBatch(CatchBatch catchBatch) {
180 
181         CatchBatch batch = CatchBatchs.newCatchBatch();
182 
183         if (catchBatch != null) {
184 
185             batch.setCatchTotalWeight(catchBatch.getCatchTotalWeight());
186             batch.setCatchTotalComputedWeight(catchBatch.getCatchTotalComputedWeight());
187             batch.setCatchTotalSortedTremisWeight(catchBatch.getCatchTotalSortedTremisWeight());
188             batch.setCatchTotalSortedCarousselWeight(catchBatch.getCatchTotalSortedCarousselWeight());
189             batch.setCatchTotalSortedComputedWeight(catchBatch.getCatchTotalSortedComputedWeight());
190             batch.setCatchTotalUnsortedComputedWeight(catchBatch.getCatchTotalUnsortedComputedWeight());
191             batch.setCatchTotalRejectedWeight(catchBatch.getCatchTotalRejectedWeight());
192             batch.setCatchTotalRejectedComputedWeight(catchBatch.getCatchTotalRejectedComputedWeight());
193 
194             batch.setSpeciesTotalComputedWeight(catchBatch.getSpeciesTotalComputedWeight());
195             batch.setSpeciesTotalSortedWeight(catchBatch.getSpeciesTotalSortedWeight());
196             batch.setSpeciesTotalSortedComputedWeight(catchBatch.getSpeciesTotalSortedComputedWeight());
197             batch.setSpeciesTotalUnsortedComputedWeight(catchBatch.getSpeciesTotalUnsortedComputedWeight());
198             batch.setSpeciesTotalSampleSortedComputedWeight(catchBatch.getSpeciesTotalSampleSortedComputedWeight());
199             batch.setSpeciesTotalLivingNotItemizedWeight(catchBatch.getSpeciesTotalLivingNotItemizedWeight());
200             batch.setSpeciesTotalLivingNotItemizedComputedWeight(catchBatch.getSpeciesTotalLivingNotItemizedComputedWeight());
201             batch.setSpeciesTotalInertWeight(catchBatch.getSpeciesTotalInertWeight());
202             batch.setSpeciesTotalInertComputedWeight(catchBatch.getSpeciesTotalInertComputedWeight());
203 
204             batch.setBenthosTotalComputedWeight(catchBatch.getBenthosTotalComputedWeight());
205             batch.setBenthosTotalSortedWeight(catchBatch.getBenthosTotalSortedWeight());
206             batch.setBenthosTotalSortedComputedWeight(catchBatch.getBenthosTotalSortedComputedWeight());
207             batch.setBenthosTotalUnsortedComputedWeight(catchBatch.getBenthosTotalUnsortedComputedWeight());
208             batch.setBenthosTotalInertWeight(catchBatch.getBenthosTotalInertWeight());
209             batch.setBenthosTotalInertComputedWeight(catchBatch.getBenthosTotalInertComputedWeight());
210             batch.setBenthosTotalSampleSortedComputedWeight(catchBatch.getBenthosTotalSampleSortedComputedWeight());
211             batch.setBenthosTotalLivingNotItemizedWeight(catchBatch.getBenthosTotalLivingNotItemizedWeight());
212             batch.setBenthosTotalLivingNotItemizedComputedWeight(catchBatch.getBenthosTotalLivingNotItemizedComputedWeight());
213 
214             batch.setMarineLitterTotalWeight(catchBatch.getMarineLitterTotalWeight());
215             batch.setMarineLitterTotalComputedWeight(catchBatch.getMarineLitterTotalComputedWeight());
216 
217             setCatchObjectId(catchBatch.getIdAsInt());
218 
219         }
220 
221         this.catchBatch = batch;
222 
223     }
224 
225     public void computeCatchValues(boolean exportSpecies, boolean exportBenthos, boolean exportMarineLitter) {
226 
227         setCatchTotalWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getCatchTotalWeight(), catchBatch.getCatchTotalComputedWeight()));
228         setCatchTotalRejectedWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getCatchTotalRejectedWeight(), catchBatch.getCatchTotalRejectedComputedWeight()));
229 
230 
231         if (exportSpecies) {
232 
233             setSpeciesTotalSortedWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getSpeciesTotalSortedWeight(), catchBatch.getSpeciesTotalSortedComputedWeight()));
234             setSpeciesTotalInertWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getSpeciesTotalInertWeight(), catchBatch.getSpeciesTotalInertComputedWeight()));
235             setSpeciesTotalLivingNotItemizedWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getSpeciesTotalLivingNotItemizedWeight(), catchBatch.getSpeciesTotalLivingNotItemizedComputedWeight()));
236 
237             speciesTotalWeightComputed = true;
238             speciesTotalUnsortedWeightComputed = true;
239             speciesTotalSampleSortedWeightComputed = true;
240 
241         } else {
242 
243             // remove species values
244 
245             catchBatch.setSpeciesTotalComputedWeight(null);
246             catchBatch.setSpeciesTotalSortedWeight(null);
247             catchBatch.setSpeciesTotalSortedWeight(null);
248             catchBatch.setSpeciesTotalUnsortedComputedWeight(null);
249             catchBatch.setSpeciesTotalSampleSortedComputedWeight(null);
250             catchBatch.setSpeciesTotalLivingNotItemizedWeight(null);
251             catchBatch.setSpeciesTotalLivingNotItemizedComputedWeight(null);
252             catchBatch.setSpeciesTotalInertWeight(null);
253             catchBatch.setSpeciesTotalInertComputedWeight(null);
254 
255         }
256 
257         if (exportBenthos) {
258 
259             setBenthosTotalSortedWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getBenthosTotalSortedWeight(), catchBatch.getBenthosTotalSortedComputedWeight()));
260             setBenthosTotalInertWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getBenthosTotalInertWeight(), catchBatch.getBenthosTotalInertComputedWeight()));
261             setBenthosTotalLivingNotItemizedWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getBenthosTotalLivingNotItemizedWeight(), catchBatch.getBenthosTotalLivingNotItemizedComputedWeight()));
262 
263             benthosTotalWeightComputed = true;
264             benthosTotalUnsortedWeightComputed = true;
265             benthosTotalSampleSortedWeightComputed = true;
266 
267         } else {
268 
269             // remove benthos values
270 
271             catchBatch.setBenthosTotalComputedWeight(null);
272             catchBatch.setBenthosTotalSortedWeight(null);
273             catchBatch.setBenthosTotalSortedComputedWeight(null);
274             catchBatch.setBenthosTotalUnsortedComputedWeight(null);
275             catchBatch.setBenthosTotalInertWeight(null);
276             catchBatch.setBenthosTotalInertComputedWeight(null);
277             catchBatch.setBenthosTotalSampleSortedComputedWeight(null);
278             catchBatch.setBenthosTotalLivingNotItemizedWeight(null);
279             catchBatch.setBenthosTotalLivingNotItemizedComputedWeight(null);
280 
281         }
282 
283         if (exportMarineLitter) {
284 
285             setMarineLitterTotalWeightComputed(Numbers.getValueOrComputedValueComputed(catchBatch.getMarineLitterTotalWeight(), catchBatch.getMarineLitterTotalComputedWeight()));
286 
287         } else {
288 
289             // remove marine litter values
290             catchBatch.setMarineLitterTotalWeight(null);
291             catchBatch.setMarineLitterTotalComputedWeight(null);
292         }
293 
294     }
295 
296     public CatchBatch getCatchBatch() {
297         return catchBatch;
298     }
299 
300     public void setFishingOperation(FishingOperation fishingOperation) {
301         super.setFishingOperation(fishingOperation);
302         if (getGear() != null) {
303             setGearRankOrder(getGear().getRankOrder());
304         }
305         setFishingOperationObjectId(fishingOperation.getIdAsInt());
306     }
307 
308     public void setCatchObjectId(Integer catchObjectId) {
309         this.catchObjectId = catchObjectId;
310     }
311 
312     public void setFishingOperationObjectId(Integer fishingOperationObjectId) {
313         this.fishingOperationObjectId = fishingOperationObjectId;
314     }
315 
316     public void setGear(Gear gear) {
317         getFishingOperation().setGear(gear);
318     }
319 
320     public void setGearRankOrder(Short gearRankOrder) {
321         this.gearRankOrder = gearRankOrder;
322     }
323 
324     public void setVessel(Vessel vessel) {
325         getFishingOperation().setVessel(vessel);
326     }
327 
328     public void setSubStrata(TuttiLocation subStrata) {
329         getFishingOperation().setSubStrata(subStrata);
330     }
331 
332     public void setStrata(TuttiLocation strata) {
333         getFishingOperation().setStrata(strata);
334     }
335 
336     public void setRecorderPerson(List<Person> recorderPerson) {
337         getFishingOperation().setRecorderPerson(recorderPerson);
338     }
339 
340     public void setLocation(TuttiLocation location) {
341         getFishingOperation().setLocation(location);
342     }
343 
344     public void setSecondaryVessel(List<Vessel> secondaryVessel) {
345         getFishingOperation().setSecondaryVessel(secondaryVessel);
346     }
347 
348     public void setComment(String comment) {
349         getFishingOperation().setComment(comment);
350     }
351 
352     public void setFishingOperationValid(Boolean fishingOperationValid) {
353         getFishingOperation().setFishingOperationValid(fishingOperationValid);
354     }
355 
356     public void setTrawlDistance(Integer trawlDistance) {
357         getFishingOperation().setTrawlDistance(trawlDistance);
358     }
359 
360     public void setFishingOperationRectiligne(boolean fishingOperationRectiligne) {
361         getFishingOperation().setFishingOperationRectiligne(fishingOperationRectiligne);
362     }
363 
364     public void setGearShootingEndDate(Date gearShootingEndDate) {
365         getFishingOperation().setGearShootingEndDate(gearShootingEndDate);
366     }
367 
368     public void setGearShootingEndLongitude(Float gearShootingEndLongitude) {
369         getFishingOperation().setGearShootingEndLongitude(gearShootingEndLongitude);
370     }
371 
372     public void setGearShootingEndLatitude(Float gearShootingEndLatitude) {
373         getFishingOperation().setGearShootingEndLatitude(gearShootingEndLatitude);
374     }
375 
376     public void setGearShootingStartDate(Date gearShootingStartDate) {
377         getFishingOperation().setGearShootingStartDate(gearShootingStartDate);
378     }
379 
380     public void setGearShootingStartLongitude(Float gearShootingStartLongitude) {
381         getFishingOperation().setGearShootingStartLongitude(gearShootingStartLongitude);
382     }
383 
384     public void setGearShootingStartLatitude(Float gearShootingStartLatitude) {
385         getFishingOperation().setGearShootingStartLatitude(gearShootingStartLatitude);
386     }
387 
388     public void setBenthosTotalLivingNotItemizedWeight(Float benthosTotalLivingNotItemizedWeight) {
389         catchBatch.setBenthosTotalLivingNotItemizedWeight(benthosTotalLivingNotItemizedWeight);
390     }
391 
392     public void setCatchTotalRejectedWeight(Float catchTotalRejectedWeight) {
393         catchBatch.setCatchTotalRejectedWeight(catchTotalRejectedWeight);
394     }
395 
396     public void setMarineLitterTotalWeight(Float marineLitterTotalWeight) {
397         catchBatch.setMarineLitterTotalWeight(marineLitterTotalWeight);
398     }
399 
400     public void setBenthosTotalInertWeight(Float benthosTotalInertWeight) {
401         catchBatch.setBenthosTotalInertWeight(benthosTotalInertWeight);
402     }
403 
404     public void setCatchTotalSortedTremisWeight(Float catchTotalSortedTremisWeight) {
405         catchBatch.setCatchTotalSortedTremisWeight(catchTotalSortedTremisWeight);
406     }
407 
408     public void setCatchTotalWeight(Float catchTotalWeight) {
409         catchBatch.setCatchTotalWeight(catchTotalWeight);
410     }
411 
412     public void setBenthosTotalSortedWeight(Float benthosTotalSortedWeight) {
413         catchBatch.setBenthosTotalSortedWeight(benthosTotalSortedWeight);
414     }
415 
416     public void setCatchTotalSortedCarousselWeight(Float catchTotalSortedCarousselWeight) {
417         catchBatch.setCatchTotalSortedCarousselWeight(catchTotalSortedCarousselWeight);
418     }
419 
420     public void setSpeciesTotalSortedWeight(Float speciesTotalSortedWeight) {
421         catchBatch.setSpeciesTotalSortedWeight(speciesTotalSortedWeight);
422     }
423 
424     public void setSpeciesTotalLivingNotItemizedWeight(Float speciesTotalLivingNotItemizedWeight) {
425         catchBatch.setSpeciesTotalLivingNotItemizedWeight(speciesTotalLivingNotItemizedWeight);
426     }
427 
428     public void setSpeciesTotalInertWeight(Float speciesTotalInertWeight) {
429         catchBatch.setSpeciesTotalInertWeight(speciesTotalInertWeight);
430     }
431 
432     public Short getGearRankOrder() {
433         return gearRankOrder;
434     }
435 
436     public Integer getFishingOperationObjectId() {
437         return fishingOperationObjectId;
438     }
439 
440     public Integer getCatchObjectId() {
441         return catchObjectId;
442     }
443 
444     public Gear getGear() {
445         return getFishingOperation().getGear();
446     }
447 
448     public Vessel getVessel() {
449         return getFishingOperation().getVessel();
450     }
451 
452     public Date getGearShootingStartDate() {
453         return getFishingOperation().getGearShootingStartDate();
454     }
455 
456     public Float getGearShootingStartLatitude() {
457         return getFishingOperation().getGearShootingStartLatitude();
458     }
459 
460     public Float getGearShootingStartLongitude() {
461         return getFishingOperation().getGearShootingStartLongitude();
462     }
463 
464     public Date getGearShootingEndDate() {
465         return getFishingOperation().getGearShootingEndDate();
466     }
467 
468     public Float getGearShootingEndLatitude() {
469         return getFishingOperation().getGearShootingEndLatitude();
470     }
471 
472     public Float getGearShootingEndLongitude() {
473         return getFishingOperation().getGearShootingEndLongitude();
474     }
475 
476     public TuttiLocation getStrata() {
477         return getFishingOperation().getStrata();
478     }
479 
480     public TuttiLocation getSubStrata() {
481         return getFishingOperation().getSubStrata();
482     }
483 
484     public TuttiLocation getLocation() {
485         return getFishingOperation().getLocation();
486     }
487 
488     public Boolean getFishingOperationValid() {
489         return getFishingOperation().getFishingOperationValid();
490     }
491 
492     public boolean isFishingOperationRectiligne() {
493         return getFishingOperation().isFishingOperationRectiligne();
494     }
495 
496     public Integer getTrawlDistance() {
497         return getFishingOperation().getTrawlDistance();
498     }
499 
500     public String getComment() {
501         return getFishingOperation().getComment();
502     }
503 
504     public List<Person> getRecorderPerson() {
505         return getFishingOperation().getRecorderPerson();
506     }
507 
508     public List<Vessel> getSecondaryVessel() {
509         return getFishingOperation().getSecondaryVessel();
510     }
511 
512     public String getDuration() {
513         return DateTimes.getDuration(
514                 getGearShootingStartDate(),
515                 getGearShootingEndDate(),
516                 "mm");
517     }
518 
519     public Float getCatchTotalWeight() {
520         return Numbers.getValueOrComputedValue(
521                 catchBatch.getCatchTotalWeight(),
522                 catchBatch.getCatchTotalComputedWeight());
523     }
524 
525     public Float getCatchTotalSortedTremisWeight() {
526         return catchBatch.getCatchTotalSortedTremisWeight();
527     }
528 
529     public Float getCatchTotalSortedCarousselWeight() {
530         return catchBatch.getCatchTotalSortedCarousselWeight();
531     }
532 
533     public Float getCatchTotalSortedWeight() {
534         return catchBatch.getCatchTotalSortedComputedWeight();
535     }
536 
537     public Float getCatchTotalUnsortedWeight() {
538         return catchBatch.getCatchTotalUnsortedComputedWeight();
539     }
540 
541     public Float getCatchTotalRejectedWeight() {
542         return Numbers.getValueOrComputedValue(
543                 catchBatch.getCatchTotalRejectedWeight(),
544                 catchBatch.getCatchTotalRejectedComputedWeight());
545     }
546 
547     public Float getSpeciesTotalWeight() {
548         return catchBatch.getSpeciesTotalComputedWeight();
549     }
550 
551     public Float getSpeciesTotalSortedWeight() {
552         return Numbers.getValueOrComputedValue(
553                 catchBatch.getSpeciesTotalSortedWeight(),
554                 catchBatch.getSpeciesTotalSortedComputedWeight());
555     }
556 
557     public Float getSpeciesTotalUnsortedWeight() {
558         return catchBatch.getSpeciesTotalUnsortedComputedWeight();
559     }
560 
561     public Float getSpeciesTotalSampleSortedWeight() {
562         return catchBatch.getSpeciesTotalSampleSortedComputedWeight();
563     }
564 
565     public Float getSpeciesTotalLivingNotItemizedWeight() {
566         return Numbers.getValueOrComputedValue(
567                 catchBatch.getSpeciesTotalLivingNotItemizedWeight(),
568                 catchBatch.getSpeciesTotalLivingNotItemizedComputedWeight());
569     }
570 
571     public Float getSpeciesTotalInertWeight() {
572         return Numbers.getValueOrComputedValue(
573                 catchBatch.getSpeciesTotalInertWeight(),
574                 catchBatch.getSpeciesTotalInertComputedWeight());
575     }
576 
577     public Float getBenthosTotalWeight() {
578         return catchBatch.getBenthosTotalComputedWeight();
579     }
580 
581     public Float getBenthosTotalSortedWeight() {
582         return Numbers.getValueOrComputedValue(
583                 catchBatch.getBenthosTotalSortedWeight(),
584                 catchBatch.getBenthosTotalSortedComputedWeight());
585     }
586 
587     public Float getBenthosTotalUnsortedWeight() {
588         return catchBatch.getBenthosTotalUnsortedComputedWeight();
589     }
590 
591     public Float getBenthosTotalInertWeight() {
592         return Numbers.getValueOrComputedValue(
593                 catchBatch.getBenthosTotalInertWeight(),
594                 catchBatch.getBenthosTotalInertComputedWeight());
595     }
596 
597     public Float getBenthosTotalSampleSortedWeight() {
598         return catchBatch.getBenthosTotalSampleSortedComputedWeight();
599     }
600 
601     public Float getBenthosTotalLivingNotItemizedWeight() {
602         return Numbers.getValueOrComputedValue(
603                 catchBatch.getBenthosTotalLivingNotItemizedWeight(),
604                 catchBatch.getBenthosTotalLivingNotItemizedComputedWeight());
605     }
606 
607     public Float getMarineLitterTotalWeight() {
608         return Numbers.getValueOrComputedValue(
609                 catchBatch.getMarineLitterTotalWeight(),
610                 catchBatch.getMarineLitterTotalComputedWeight());
611     }
612 
613     public Boolean getCatchTotalWeightComputed() {
614         return catchTotalWeightComputed;
615     }
616 
617     public Boolean getCatchTotalRejectedWeightComputed() {
618         return catchTotalRejectedWeightComputed;
619     }
620 
621     public Boolean getCatchTotalSortedTremisWeightComputed() {
622         return false;
623     }
624 
625     public Boolean getCatchTotalSortedCarousselWeightComputed() {
626         return false;
627     }
628 
629     public Boolean getCatchTotalSortedWeightComputed() {
630         return true;
631     }
632 
633     public Boolean getCatchTotalUnsortedWeightComputed() {
634         return true;
635     }
636 
637     public Boolean getSpeciesTotalWeightComputed() {
638         return speciesTotalWeightComputed;
639     }
640 
641     public Boolean getSpeciesTotalUnsortedWeightComputed() {
642         return speciesTotalUnsortedWeightComputed;
643     }
644 
645     public Boolean getSpeciesTotalSampleSortedWeightComputed() {
646         return speciesTotalSampleSortedWeightComputed;
647     }
648 
649     public Boolean getSpeciesTotalSortedWeightComputed() {
650         return speciesTotalSortedWeightComputed;
651     }
652 
653     public Boolean getSpeciesTotalInertWeightComputed() {
654         return speciesTotalInertWeightComputed;
655     }
656 
657     public Boolean getSpeciesTotalLivingNotItemizedWeightComputed() {
658         return speciesTotalLivingNotItemizedWeightComputed;
659     }
660 
661     public Boolean getBenthosTotalSortedWeightComputed() {
662         return benthosTotalSortedWeightComputed;
663     }
664 
665     public Boolean getBenthosTotalInertWeightComputed() {
666         return benthosTotalInertWeightComputed;
667     }
668 
669     public Boolean getBenthosTotalLivingNotItemizedWeightComputed() {
670         return benthosTotalLivingNotItemizedWeightComputed;
671     }
672 
673     public Boolean getBenthosTotalWeightComputed() {
674         return benthosTotalWeightComputed;
675     }
676 
677     public Boolean getBenthosTotalUnsortedWeightComputed() {
678         return benthosTotalUnsortedWeightComputed;
679     }
680 
681     public Boolean getBenthosTotalSampleSortedWeightComputed() {
682         return benthosTotalSampleSortedWeightComputed;
683     }
684 
685     public Boolean getMarineLitterTotalWeightComputed() {
686         return marineLitterTotalWeightComputed;
687     }
688 
689     public void setCatchTotalWeightComputed(Boolean catchTotalWeightComputed) {
690         this.catchTotalWeightComputed = catchTotalWeightComputed;
691     }
692 
693     public void setCatchTotalRejectedWeightComputed(Boolean catchTotalRejectedWeightComputed) {
694         this.catchTotalRejectedWeightComputed = catchTotalRejectedWeightComputed;
695     }
696 
697     public void setSpeciesTotalSortedWeightComputed(Boolean speciesTotalSortedWeightComputed) {
698         this.speciesTotalSortedWeightComputed = speciesTotalSortedWeightComputed;
699     }
700 
701     public void setSpeciesTotalInertWeightComputed(Boolean speciesTotalInertWeightComputed) {
702         this.speciesTotalInertWeightComputed = speciesTotalInertWeightComputed;
703     }
704 
705     public void setSpeciesTotalLivingNotItemizedWeightComputed(Boolean speciesTotalLivingNotItemizedWeightComputed) {
706         this.speciesTotalLivingNotItemizedWeightComputed = speciesTotalLivingNotItemizedWeightComputed;
707     }
708 
709     public void setBenthosTotalSortedWeightComputed(Boolean benthosTotalSortedWeightComputed) {
710         this.benthosTotalSortedWeightComputed = benthosTotalSortedWeightComputed;
711     }
712 
713     public void setBenthosTotalInertWeightComputed(Boolean benthosTotalInertWeightComputed) {
714         this.benthosTotalInertWeightComputed = benthosTotalInertWeightComputed;
715     }
716 
717     public void setBenthosTotalLivingNotItemizedWeightComputed(Boolean benthosTotalLivingNotItemizedWeightComputed) {
718         this.benthosTotalLivingNotItemizedWeightComputed = benthosTotalLivingNotItemizedWeightComputed;
719     }
720 
721     public void setMarineLitterTotalWeightComputed(Boolean marineLitterTotalWeightComputed) {
722         this.marineLitterTotalWeightComputed = marineLitterTotalWeightComputed;
723     }
724 
725 }