| ... |
... |
@@ -20,7 +20,6 @@ |
|
20
|
20
|
*/
|
|
21
|
21
|
package fr.ird.t3.actions.data.level3;
|
|
22
|
22
|
|
|
23
|
|
-import com.google.common.base.Preconditions;
|
|
24
|
23
|
import fr.ird.t3.actions.T3Action;
|
|
25
|
24
|
import fr.ird.t3.entities.data.Activity;
|
|
26
|
25
|
import fr.ird.t3.entities.data.ActivityTopiaDao;
|
| ... |
... |
@@ -219,9 +218,9 @@ public class Level3Action extends T3Action<Level3Configuration> { |
|
219
|
218
|
int nbZones = e.getValue();
|
|
220
|
219
|
// is activity was already treated ?
|
|
221
|
220
|
boolean newActivity = outputContext.addActivityId(activity.getTopiaId());
|
|
222
|
|
- if (!newActivity) {
|
|
223
|
|
- Preconditions.checkState(nbZones > 1, "Only a multi-zone activity can be seen more tha once!, problem with activity: " + activity.getTopiaId());
|
|
224
|
|
- }
|
|
|
221
|
+// if (!newActivity) {
|
|
|
222
|
+// Preconditions.checkState(nbZones > 1, "Only a multi-zone activity can be seen more tha once!, problem with activity: " + activity.getTopiaId());
|
|
|
223
|
+// }
|
|
225
|
224
|
doExecuteActivityInCatchStratum(
|
|
226
|
225
|
catchStratum,
|
|
227
|
226
|
sampleStratum,
|
| ... |
... |
@@ -287,12 +286,12 @@ public class Level3Action extends T3Action<Level3Configuration> { |
|
287
|
286
|
addInfoMessage(message);
|
|
288
|
287
|
// to deal with multiple-zone activities (must keep a track of what was already done)
|
|
289
|
288
|
boolean activityMultiZone = nbZones > 1;
|
|
290
|
|
- Map<String, String> previousValues;
|
|
291
|
|
- if (activityMultiZone) {
|
|
292
|
|
- previousValues = inputContext.getActivityWithMultiZones(activity);
|
|
293
|
|
- } else {
|
|
294
|
|
- previousValues = null;
|
|
295
|
|
- }
|
|
|
289
|
+ Map<String, String> previousValues = inputContext.getActivityWithMultiZones(activity);
|
|
|
290
|
+// if (activityMultiZone) {
|
|
|
291
|
+// previousValues = inputContext.getActivityWithMultiZones(activity);
|
|
|
292
|
+// } else {
|
|
|
293
|
+// previousValues = null;
|
|
|
294
|
+// }
|
|
296
|
295
|
if (deleteOldData) {
|
|
297
|
296
|
// delete old data for this activity
|
|
298
|
297
|
log.debug(String.format("Delete previous level3 data of %s :: %d", activity.getTopiaId(), activity.sizeExtrapolatedAllSetSpeciesFrequency()));
|
| ... |
... |
@@ -303,7 +302,7 @@ public class Level3Action extends T3Action<Level3Configuration> { |
|
303
|
302
|
if (activityWithSample && !useAllSamplesOfStratum) {
|
|
304
|
303
|
// need only to clone back data from SetSpeciesFrequency to new table
|
|
305
|
304
|
message = l(locale, "t3.level3.message.activity.with.sample.useOwn.composition");
|
|
306
|
|
- log.info(message);
|
|
|
305
|
+ log.debug(message);
|
|
307
|
306
|
addInfoMessage(message);
|
|
308
|
307
|
for (SetSpeciesFrequency setSpeciesFrequency : activity.getSetSpeciesFrequency()) {
|
|
309
|
308
|
Species aSpecies = setSpeciesFrequency.getSpecies();
|
| ... |
... |
@@ -322,7 +321,7 @@ public class Level3Action extends T3Action<Level3Configuration> { |
|
322
|
321
|
} else {
|
|
323
|
322
|
message = l(locale, "t3.level3.message.activity.with.no.sample.useSampleStratum.composition", activityStr);
|
|
324
|
323
|
}
|
|
325
|
|
- log.info(message);
|
|
|
324
|
+ log.debug(message);
|
|
326
|
325
|
addInfoMessage(message);
|
|
327
|
326
|
Map<Species, LengthCompositionAggregateModel> compositionModels = sampleStratum.getCompositionModel();
|
|
328
|
327
|
// get all species found in catches
|