@Test public void testExtractTimeStamps_6() throws ParseException, ValidationException { final TimeStampExtractor extractor = new TimeStampExtractor("yyyyMMdd", "*${startDate}*.dim"); ProductData.UTC[] dateRange = extractor.extractTimeStamps( "something__20110601_bas_wac_acr_1200__20110602___something.dim"); assertEquals(2, dateRange.length); assertEquals(ProductData.UTC.parse("2011-06-02", "yyyy-MM-dd").getAsDate().getTime(), dateRange[0].getAsDate().getTime()); assertEquals(dateRange[0].getAsDate().getTime(), dateRange[1].getAsDate().getTime()); }
public ProductData.UTC[] extractTimeStamps(String fileName) throws ValidationException { final ProductData.UTC startTime = timeStampAccess.getStartTime(fileName); final ProductData.UTC stopTime = timeStampAccess.getStopTime(fileName); return new ProductData.UTC[]{startTime, stopTime}; }
TimeStampExtractor { public ProductData.UTC[] extractTimeStamps(String fileName) throws ValidationException { final ProductData.UTC startTime = timeStampAccess.getStartTime(fileName); final ProductData.UTC stopTime = timeStampAccess.getStopTime(fileName); return new ProductData.UTC[]{startTime, stopTime}; } }
TimeStampExtractor { public ProductData.UTC[] extractTimeStamps(String fileName) throws ValidationException { final ProductData.UTC startTime = timeStampAccess.getStartTime(fileName); final ProductData.UTC stopTime = timeStampAccess.getStopTime(fileName); return new ProductData.UTC[]{startTime, stopTime}; } TimeStampExtractor(String dateInterpretationPattern, String filenameInterpretationPattern); }
TimeStampExtractor { public ProductData.UTC[] extractTimeStamps(String fileName) throws ValidationException { final ProductData.UTC startTime = timeStampAccess.getStartTime(fileName); final ProductData.UTC stopTime = timeStampAccess.getStopTime(fileName); return new ProductData.UTC[]{startTime, stopTime}; } TimeStampExtractor(String dateInterpretationPattern, String filenameInterpretationPattern); ProductData.UTC[] extractTimeStamps(String fileName); }
TimeStampExtractor { public ProductData.UTC[] extractTimeStamps(String fileName) throws ValidationException { final ProductData.UTC startTime = timeStampAccess.getStartTime(fileName); final ProductData.UTC stopTime = timeStampAccess.getStopTime(fileName); return new ProductData.UTC[]{startTime, stopTime}; } TimeStampExtractor(String dateInterpretationPattern, String filenameInterpretationPattern); ProductData.UTC[] extractTimeStamps(String fileName);  }