@Test public void testThatDatePartsAreReplacedWhenNotGiven() throws ParseException { List<String> pathGlobs = InputPathResolver.getInputPathPatterns("/foo/${yyyy}/${MM}/${dd}/.*.N1", null, null, null); assertNotNull(pathGlobs); assertEquals(1, pathGlobs.size()); assertEquals("/foo/.*/.*/.*/.*.N1", pathGlobs.get(0)); }
public static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate, String regionName) { InputPathResolver inputPathResolver = new InputPathResolver(); inputPathResolver.setMinDate(minDate); inputPathResolver.setMaxDate(maxDate); inputPathResolver.setRegionName(regionName); return inputPathResolver.resolve(inputPathPattern); }
InputPathResolver { public static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate, String regionName) { InputPathResolver inputPathResolver = new InputPathResolver(); inputPathResolver.setMinDate(minDate); inputPathResolver.setMaxDate(maxDate); inputPathResolver.setRegionName(regionName); return inputPathResolver.resolve(inputPathPattern); } }
InputPathResolver { public static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate, String regionName) { InputPathResolver inputPathResolver = new InputPathResolver(); inputPathResolver.setMinDate(minDate); inputPathResolver.setMaxDate(maxDate); inputPathResolver.setRegionName(regionName); return inputPathResolver.resolve(inputPathPattern); } InputPathResolver(); }
InputPathResolver { public static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate, String regionName) { InputPathResolver inputPathResolver = new InputPathResolver(); inputPathResolver.setMinDate(minDate); inputPathResolver.setMaxDate(maxDate); inputPathResolver.setRegionName(regionName); return inputPathResolver.resolve(inputPathPattern); } InputPathResolver(); String getRegionName(); void setRegionName(String regionName); Date getMinDate(); void setMinDate(Date minDate); Date getMaxDate(); void setMaxDate(Date maxDate); List<String> resolve(String inputPathPatterns); List<String> resolveMultiYear(String inputPathPatterns); static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate,
                                                    String regionName); static boolean containsDateVariables(String pattern); }
InputPathResolver { public static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate, String regionName) { InputPathResolver inputPathResolver = new InputPathResolver(); inputPathResolver.setMinDate(minDate); inputPathResolver.setMaxDate(maxDate); inputPathResolver.setRegionName(regionName); return inputPathResolver.resolve(inputPathPattern); } InputPathResolver(); String getRegionName(); void setRegionName(String regionName); Date getMinDate(); void setMinDate(Date minDate); Date getMaxDate(); void setMaxDate(Date maxDate); List<String> resolve(String inputPathPatterns); List<String> resolveMultiYear(String inputPathPatterns); static List<String> getInputPathPatterns(String inputPathPattern, Date minDate, Date maxDate,
                                                    String regionName); static boolean containsDateVariables(String pattern);  }