@Test public void testExtractTimeStamps_withDOY() throws ParseException, ValidationException { final TimeStampExtractor extractor = new TimeStampExtractor("yyyyDDD", "A${startDate}.L3m_DAY_SST_4"); ProductData.UTC[] dateRange = extractor.extractTimeStamps("A2010159.L3m_DAY_SST_4"); assertEquals(2, dateRange.length); assertEquals(ProductData.UTC.parse("2010-06-08:00:00:00", "yyyy-MM-dd:HH:mm:ss").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);  }