@Test public void testGetDatePairList_DateList() throws ProductionException, ParseException { ProductionRequest productionRequest = new ProductionRequest("L3", "ewa", "dateList", "2010-06-15 2010-07-01 2010-07-19 "); List<DateRange> dateRangeList = L3ProductionType.getDateRanges(productionRequest, null); assertEquals(3, dateRangeList.size()); assertEquals("2010-06-15", asString(dateRangeList.get(0).getStartDate())); assertEquals("2010-06-15", asString(dateRangeList.get(0).getStopDate())); assertEquals("2010-07-01", asString(dateRangeList.get(1).getStartDate())); assertEquals("2010-07-01", asString(dateRangeList.get(1).getStopDate())); assertEquals("2010-07-19", asString(dateRangeList.get(2).getStartDate())); assertEquals("2010-07-19", asString(dateRangeList.get(2).getStopDate())); }
static List<DateRange> getDateRanges(ProductionRequest productionRequest, String periodLengthDefault) throws ProductionException { Date[] dateList = productionRequest.getDates("dateList", null); if (dateList != null) { return DateRangeCalculator.fromDateList(dateList); } else { Date minDate = productionRequest.getDate("minDate"); Date maxDate = productionRequest.getDate("maxDate"); String periodLength; if (periodLengthDefault != null) { periodLength = productionRequest.getString("periodLength", periodLengthDefault); } else { periodLength = productionRequest.getString("periodLength"); } String compositingPeriodLength = productionRequest.getString("compositingPeriodLength", periodLength); return DateRangeCalculator.fromMinMax(minDate, maxDate, periodLength, compositingPeriodLength); } }
L3ProductionType extends HadoopProductionType { static List<DateRange> getDateRanges(ProductionRequest productionRequest, String periodLengthDefault) throws ProductionException { Date[] dateList = productionRequest.getDates("dateList", null); if (dateList != null) { return DateRangeCalculator.fromDateList(dateList); } else { Date minDate = productionRequest.getDate("minDate"); Date maxDate = productionRequest.getDate("maxDate"); String periodLength; if (periodLengthDefault != null) { periodLength = productionRequest.getString("periodLength", periodLengthDefault); } else { periodLength = productionRequest.getString("periodLength"); } String compositingPeriodLength = productionRequest.getString("compositingPeriodLength", periodLength); return DateRangeCalculator.fromMinMax(minDate, maxDate, periodLength, compositingPeriodLength); } } }
L3ProductionType extends HadoopProductionType { static List<DateRange> getDateRanges(ProductionRequest productionRequest, String periodLengthDefault) throws ProductionException { Date[] dateList = productionRequest.getDates("dateList", null); if (dateList != null) { return DateRangeCalculator.fromDateList(dateList); } else { Date minDate = productionRequest.getDate("minDate"); Date maxDate = productionRequest.getDate("maxDate"); String periodLength; if (periodLengthDefault != null) { periodLength = productionRequest.getString("periodLength", periodLengthDefault); } else { periodLength = productionRequest.getString("periodLength"); } String compositingPeriodLength = productionRequest.getString("compositingPeriodLength", periodLength); return DateRangeCalculator.fromMinMax(minDate, maxDate, periodLength, compositingPeriodLength); } } L3ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); }
L3ProductionType extends HadoopProductionType { static List<DateRange> getDateRanges(ProductionRequest productionRequest, String periodLengthDefault) throws ProductionException { Date[] dateList = productionRequest.getDates("dateList", null); if (dateList != null) { return DateRangeCalculator.fromDateList(dateList); } else { Date minDate = productionRequest.getDate("minDate"); Date maxDate = productionRequest.getDate("maxDate"); String periodLength; if (periodLengthDefault != null) { periodLength = productionRequest.getString("periodLength", periodLengthDefault); } else { periodLength = productionRequest.getString("periodLength"); } String compositingPeriodLength = productionRequest.getString("compositingPeriodLength", periodLength); return DateRangeCalculator.fromMinMax(minDate, maxDate, periodLength, compositingPeriodLength); } } L3ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); @Override Production createProduction(ProductionRequest productionRequest); static String getL3ConfigXml(ProductionRequest productionRequest); }
L3ProductionType extends HadoopProductionType { static List<DateRange> getDateRanges(ProductionRequest productionRequest, String periodLengthDefault) throws ProductionException { Date[] dateList = productionRequest.getDates("dateList", null); if (dateList != null) { return DateRangeCalculator.fromDateList(dateList); } else { Date minDate = productionRequest.getDate("minDate"); Date maxDate = productionRequest.getDate("maxDate"); String periodLength; if (periodLengthDefault != null) { periodLength = productionRequest.getString("periodLength", periodLengthDefault); } else { periodLength = productionRequest.getString("periodLength"); } String compositingPeriodLength = productionRequest.getString("compositingPeriodLength", periodLength); return DateRangeCalculator.fromMinMax(minDate, maxDate, periodLength, compositingPeriodLength); } } L3ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); @Override Production createProduction(ProductionRequest productionRequest); static String getL3ConfigXml(ProductionRequest productionRequest);  }