This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository wao. See http://git.codelutin.com/wao.git commit 91b7f0912d2d250e259afe2f2764f059d38189b3 Author: Brendan Le Ny <bleny@codelutin.com> Date: Tue Oct 14 11:15:16 2014 +0200 On renomme une variable du plan pour parler d'observation et non de marée --- .../wao/services/service/ObsMerSamplingPlan.java | 4 ++-- .../services/service/ObsMerSamplingPlanBuilder.java | 14 +++++++------- .../wao/services/service/ObsVenteSamplingPlan.java | 4 ++-- .../service/ObsVenteSamplingPlanBuilder.java | 10 +++++----- .../ifremer/wao/services/service/SamplingPlan.java | 20 +++++--------------- 5 files changed, 21 insertions(+), 31 deletions(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java index 9ca7366..ede800e 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java @@ -144,13 +144,13 @@ public class ObsMerSamplingPlan extends SamplingPlan { protected Double appliedCoverageRate; public ObsMerSamplingPlanSampleRowPart(Locale locale, - Map<Date, Effort> nbTidesPerMonth, + Map<Date, Effort> effortInObservationsPerMonths, SampleRow sampleRow, Integer observationTimesInDaysExpected, Long observationTimesInDaysReal, Long observationTimesInDaysEstimated, long sampleRowContactCounts) { - super(locale, nbTidesPerMonth, sampleRow, sampleRowContactCounts); + super(locale, effortInObservationsPerMonths, sampleRow, sampleRowContactCounts); this.observationTimesInDaysExpected = observationTimesInDaysExpected; this.observationTimesInDaysReal = observationTimesInDaysReal; this.observationTimesInDaysEstimated = observationTimesInDaysEstimated; diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java index f213674..8a368d1 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java @@ -183,12 +183,12 @@ public class ObsMerSamplingPlanBuilder { SectorContext sectorPart = facadeContext.getOrAddSectorContext(sectors); // compute nb tides per month - Map<Date, SamplingPlan.Effort> nbTidesPerMonth = computeNbTidesPerMonth(sampleRow); + Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths = getEffortInObservationsPerMonths(sampleRow); // add sample row sectorPart.addSampleRow(sampleRowsFilterValues.getLocale(), sampleRow, - nbTidesPerMonth, + effortInObservationsPerMonths, observationTimesInDaysExpected, observationTimesInDaysReal, observationTimesInDaysEstimated, @@ -250,7 +250,7 @@ public class ObsMerSamplingPlanBuilder { return result; } - protected Map<Date, SamplingPlan.Effort> computeNbTidesPerMonth(SampleRow sampleRow) { + protected Map<Date, SamplingPlan.Effort> getEffortInObservationsPerMonths(SampleRow sampleRow) { Map<Date, SamplingPlan.Effort> result = new TreeMap<>(); for (Date month : months) { Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month); @@ -282,8 +282,8 @@ public class ObsMerSamplingPlanBuilder { highTotalEstimated += estimatedTidesValue; } result.put(month, new SamplingPlan.Effort(expectedTidesValue, - realTidesValue, - estimatedTidesValue)); + realTidesValue, + estimatedTidesValue)); } return result; @@ -344,7 +344,7 @@ public class ObsMerSamplingPlanBuilder { protected ObsMerSamplingPlan.SamplingPlanSampleRowPart addSampleRow(Locale locale, SampleRow row, - Map<Date, SamplingPlan.Effort> nbTidesPerMonth, + Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths, Integer observationTimesInDaysExpected, Long observationTimesInDaysReal, Long observationTimesInDaysEstimated, @@ -352,7 +352,7 @@ public class ObsMerSamplingPlanBuilder { ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart rowPart = new ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart(locale, - nbTidesPerMonth, + effortInObservationsPerMonths, row, observationTimesInDaysExpected, observationTimesInDaysReal, diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java index dbe8e56..eb3cd7a 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java @@ -50,8 +50,8 @@ public class ObsVenteSamplingPlan extends SamplingPlan implements Iterable<Sampl protected String samplingStrategy; - public ObsVenteSamplingPlanSampleRowPart(Locale locale, Map<Date, Effort> nbTidesPerMonth, SampleRow sampleRow, long sampleRowContactCounts) { - super(locale, nbTidesPerMonth, sampleRow, sampleRowContactCounts); + public ObsVenteSamplingPlanSampleRowPart(Locale locale, Map<Date, Effort> effortInObservationsPerMonths, SampleRow sampleRow, long sampleRowContactCounts) { + super(locale, effortInObservationsPerMonths, sampleRow, sampleRowContactCounts); terrestrialLocationInfos = sampleRow.getTerrestrialLocationInfos(); terrestrialLocationNamesAndDescriptions = new LinkedHashMap<>(); if (CollectionUtils.isNotEmpty(sampleRow.getTerrestrialLocations())) { diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java index 5285c75..165ea51 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java @@ -147,12 +147,12 @@ public class ObsVenteSamplingPlanBuilder { SectorContext sectorPart = facadeContext.getOrAddSectorContext(sectors); // compute nb tides per month - Map<Date, SamplingPlan.Effort> nbTidesPerMonth = computeNbTidesPerMonth(sampleRow); + Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths = getEffortInObservationsPerMonths(sampleRow); // add sample row sectorPart.addSampleRow(sampleRowsFilterValues.getLocale(), sampleRow, - nbTidesPerMonth, + effortInObservationsPerMonths, sampleRowContactCounts); sampleRowsFilterValues.addSampleRow(sampleRow); @@ -203,7 +203,7 @@ public class ObsVenteSamplingPlanBuilder { return result; } - protected Map<Date, SamplingPlan.Effort> computeNbTidesPerMonth(SampleRow sampleRow) { + protected Map<Date, SamplingPlan.Effort> getEffortInObservationsPerMonths(SampleRow sampleRow) { Map<Date, SamplingPlan.Effort> result = new TreeMap<>(); for (Date month : months) { Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month); @@ -297,13 +297,13 @@ public class ObsVenteSamplingPlanBuilder { protected ObsMerSamplingPlan.SamplingPlanSampleRowPart addSampleRow(Locale locale, SampleRow row, - Map<Date, SamplingPlan.Effort> nbTidesPerMonth, + Map<Date, SamplingPlan.Effort> effortInObservationsPerMonths, long sampleRowContactCounts) { ObsVenteSamplingPlan.ObsVenteSamplingPlanSampleRowPart rowPart = new ObsVenteSamplingPlan.ObsVenteSamplingPlanSampleRowPart( locale, - nbTidesPerMonth, + effortInObservationsPerMonths, row, sampleRowContactCounts); rows.add(rowPart); diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java index 7def4aa..2f35f41 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java @@ -263,7 +263,7 @@ public abstract class SamplingPlan implements Iterable<SamplingPlan.SamplingPlan /** * Nb tides by month. */ - protected Map<Date, Effort> nbTidesPerMonth; + protected Map<Date, Effort> effortInObservationsPerMonths; protected long sampleRowContactCounts; @@ -331,16 +331,16 @@ public abstract class SamplingPlan implements Iterable<SamplingPlan.SamplingPlan protected boolean elligibleBoatsProvided; public SamplingPlanSampleRowPart(Locale locale, - Map<Date, Effort> nbTidesPerMonth, + Map<Date, Effort> effortInObservationsPerMonths, SampleRow sampleRow, long sampleRowContactCounts) { - this.nbTidesPerMonth = nbTidesPerMonth; + this.effortInObservationsPerMonths = effortInObservationsPerMonths; this.sampleRowContactCounts = sampleRowContactCounts; // compute total tides int totalTidesExpected = 0; int totalTidesEstimated = 0; int totalTidesReal = 0; - for (Effort effort : nbTidesPerMonth.values()) { + for (Effort effort : effortInObservationsPerMonths.values()) { Integer totalExpected = effort.getExpected(); if (totalExpected != null) { totalTidesExpected += totalExpected; @@ -489,17 +489,7 @@ public abstract class SamplingPlan implements Iterable<SamplingPlan.SamplingPlan } public Effort getEffortInObservationsForMonth(Date month) { - return nbTidesPerMonth.get(month); - } - - public String getTotalRealPercentage() { - String result = totalObservations.getRealPercentage(); - return result; - } - - public String getTotalEstimatedPercentage() { - String result = totalObservations.getEstimatedPercentage(); - return result; + return effortInObservationsPerMonths.get(month); } public String getFishingZones() { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.