@Test public void testExtractTimeStamps_1() throws ParseException, ValidationException { final TimeStampExtractor extractor = new TimeStampExtractor("yyyyMMdd", "${startDate}*.dim"); final ProductData.UTC[] timeStamps = extractor.extractTimeStamps("20111103_est_wac_wew_1200.dim"); assertEquals(timeStamps.length, 2); assertEquals(ProductData.UTC.parse("2011-11-03", "yyyy-MM-dd").getAsDate().getTime(), timeStamps[0].getAsDate().getTime()); assertEquals(timeStamps[0].getAsDate().getTime(), timeStamps[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);  }