r1985 - trunk/wao-services/src/main/java/fr/ifremer/wao/services/service
Author: bleny Date: 2014-05-27 17:31:39 +0200 (Tue, 27 May 2014) New Revision: 1985 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1985 Log: change Service to Sector Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-05-27 14:17:54 UTC (rev 1984) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-05-27 15:31:39 UTC (rev 1985) @@ -171,7 +171,7 @@ String sectors = sampleRow.getSectors(); // get sector context - ServiceContext sectorPart = facadeContext.getOrAddSectorContext(sectors); + SectorContext sectorPart = facadeContext.getOrAddSectorContext(sectors); // compute nb tides per month Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> nbTidesPerMonth = computeNbTidesPerMonth(sampleRow); @@ -280,19 +280,19 @@ protected String facade; - protected Map<String, ServiceContext> sectorMap; + protected Map<String, SectorContext> sectorMap; protected FacadeContext(String facade) { this.facade = facade; this.sectorMap = new TreeMap<>(); } - protected ServiceContext getOrAddSectorContext(String sectors) { - ServiceContext sectorPart = sectorMap.get(sectors); + protected SectorContext getOrAddSectorContext(String sectors) { + SectorContext sectorPart = sectorMap.get(sectors); if (sectorPart == null) { // register a new sector - sectorPart = new ServiceContext(sectors); + sectorPart = new SectorContext(sectors); sectorMap.put(sectors, sectorPart); } return sectorPart; @@ -302,8 +302,8 @@ // get sector parts Collection<ObsMerSamplingPlan.ObsMerSamplingPlanSectorPart> sectorParts = new ArrayList<>(); - for (ServiceContext serviceContext : sectorMap.values()) { - ObsMerSamplingPlan.ObsMerSamplingPlanSectorPart sectorPart = serviceContext.toBean(); + for (SectorContext sectorContext : sectorMap.values()) { + ObsMerSamplingPlan.ObsMerSamplingPlanSectorPart sectorPart = sectorContext.toBean(); sectorParts.add(sectorPart); } // sort them @@ -318,13 +318,13 @@ } } - protected static class ServiceContext { + protected static class SectorContext { protected String sectors; protected Collection<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart> rows; - protected ServiceContext(String sectors) { + protected SectorContext(String sectors) { this.sectors = sectors; this.rows = new ArrayList<>(); }
participants (1)
-
bleny@users.forge.codelutin.com