@Test public void canGetMultiPatternProductSetParameters() throws Exception { Map<String, String> mockInputMapRaw = getProductSetParametersRawMap(); when(mockExecuteRequestExtractor.getInputParametersMapRaw()).thenReturn(mockInputMapRaw); ProductSet[] productSetsMultiPattern = getMockProductSetsWithMultiPatterns(); CalvalusFacade mockCalvalusFacade = getMockCalvalusFacade(); calvalusDataInputs = new CalvalusDataInputs(mockExecuteRequestExtractor, mockCalvalusProcessor, productSetsMultiPattern, mockCalvalusFacade); assertThat(calvalusDataInputs.getValue("inputPath"), equalTo("/calvalus/eodata/MER_RR__1P/r03/${yyyy}/${MM}/${dd}/.*.N1," + "/calvalus/eodata/MER_RRG__1P/r03/${yyyy}/${MM}/${dd}/.*.N1," + "/calvalus/eodata/MER_FRS__1P/r03/${yyyy}/${MM}/${dd}/.*.N1")); assertThat(calvalusDataInputs.getValue("minDate"), equalTo("2009-06-01")); assertThat(calvalusDataInputs.getValue("maxDate"), equalTo("2009-06-30")); assertThat(calvalusDataInputs.getValue("periodLength"), equalTo("30")); assertThat(calvalusDataInputs.getValue("regionWKT"), equalTo("polygon((10.00 54.00, 14.27 53.47))")); assertThat(calvalusDataInputs.getValue("outputFormat"), equalTo("NetCDF4")); }
public String getValue(String parameterName) { return inputMapFormatted.get(parameterName); }
CalvalusDataInputs { public String getValue(String parameterName) { return inputMapFormatted.get(parameterName); } }
CalvalusDataInputs { public String getValue(String parameterName) { return inputMapFormatted.get(parameterName); } CalvalusDataInputs(ExecuteRequestExtractor executeRequestExtractor,
                       WpsProcess calvalusProcessor,
                       ProductSet[] productSets,
                       CalvalusFacade calvalusFacade); }
CalvalusDataInputs { public String getValue(String parameterName) { return inputMapFormatted.get(parameterName); } CalvalusDataInputs(ExecuteRequestExtractor executeRequestExtractor,
                       WpsProcess calvalusProcessor,
                       ProductSet[] productSets,
                       CalvalusFacade calvalusFacade); String getValue(String parameterName); @Override String toString(); }
CalvalusDataInputs { public String getValue(String parameterName) { return inputMapFormatted.get(parameterName); } CalvalusDataInputs(ExecuteRequestExtractor executeRequestExtractor,
                       WpsProcess calvalusProcessor,
                       ProductSet[] productSets,
                       CalvalusFacade calvalusFacade); String getValue(String parameterName); @Override String toString(); static final long MIN_DATE; static final long MAX_DATE; static SimpleDateFormat ISO_DATE_FORMAT; }