OPeNDAPUtils { public static String generateOpenDapURL(String datasetURI, List<String> requestedVariableList, List<?> gridVariableList, Range timeRange, Range yRange, Range xRange) throws OPeNDAPUtilException { return generateOpenDapURL(datasetURI, requestedVariableList, gridVariableList, timeRange, yRange, xRange, OPeNDAPContentType.NONE); }  static String generateOpenDapURL(String datasetURI, List<String> requestedVariableList,
            List<?> gridVariableList, Range timeRange, Range yRange, Range xRange); static String generateOpenDapURL(String datasetURI, List<String> requestedVariableList,
            List<?> gridVariableList, Range timeRange, Range yRange, Range xRange,
            OPeNDAPContentType contentType); static Map<String, String> getDimensionRawNameRangeMapping(List<?> gridVariableList,
            String xRangeString, String yRangeString, String timeRangeString); static Map<String, String> getDimensionVariableNameRangeMapping(
            List<?> gridVariableList, String xRangeString, String yRangeString,
            String timeRangeString); static boolean isOPeNDAP(URI uri); static final int RANGE_STRIDE; static final String PARAMETER_DECLARATOR; static final String RANGE_DELIMETER; static final String URI_DELIMETER; static final String OPENDAP_PROTO; static final String REQUEST_PROTO; static final List<String> REQUIRED_ATTRIBUTES; static final String DESCRIPTION_HEADER; }
@Test public void daymetOpendapUriTest() { String gridSetLocation = "dods: List<String> gridVariableList = Arrays.asList("prcp", "srad", "swe"); Range timeRange = null; try { timeRange = new Range(9763, 10128); } catch (InvalidRangeException ignore) {} assertNotNull(timeRange); Range xLngRange = null; try { xLngRange = new Range(1241, 1852); } catch (InvalidRangeException ignore) {} assertNotNull(xLngRange); Range yLatRange = null; try { yLatRange = new Range(1903, 2369); } catch (InvalidRangeException ignore) {} assertNotNull(yLatRange); String openDapURL = null; try { openDapURL = OPeNDAPUtils.generateOpenDapURL(gridSetLocation, gridVariableList, daymetGridDataSet.getNetcdfFile().getVariables(), timeRange, yLatRange, xLngRange); } catch (OPeNDAPUtilException ignore) {} assertNotNull(openDapURL); assertTrue(openDapURL.equals("http: }
@Test public void prismOpendapUriTest() { String gridSetLocation = "dods: List<String> gridVariableList = Arrays.asList("ppt"); Range timeRange = null; try { timeRange = new Range(0, 1417); } catch (InvalidRangeException ignore) {} assertNotNull(timeRange); Range xLngRange = null; try { xLngRange = new Range(382, 552); } catch (InvalidRangeException ignore) {} assertNotNull(xLngRange); Range yLatRange = null; try { yLatRange = new Range(213, 312); } catch (InvalidRangeException ignore) {} assertNotNull(yLatRange); String openDapURL = null; try { openDapURL = OPeNDAPUtils.generateOpenDapURL(gridSetLocation, gridVariableList, prismGridDataSet.getNetcdfFile().getVariables(), timeRange, yLatRange, xLngRange); } catch (OPeNDAPUtilException ignore) {} assertNotNull(openDapURL); assertTrue(openDapURL.equals("http: }
@Test public void ssebopetaOpendapUriTest() { String gridSetLocation = "dods: List<String> gridVariableList = Arrays.asList("et"); Range timeRange = null; try { timeRange = new Range(0, 179); } catch (InvalidRangeException ignore) {} assertNotNull(timeRange); Range xLngRange = null; try { xLngRange = new Range(1881, 2663); } catch (InvalidRangeException ignore) {} assertNotNull(xLngRange); Range yLatRange = null; try { yLatRange = new Range(943, 1391); } catch (InvalidRangeException ignore) {} assertNotNull(yLatRange); String openDapURL = null; try { openDapURL = OPeNDAPUtils.generateOpenDapURL(gridSetLocation, gridVariableList, ssebopetaGridDataSet.getNetcdfFile().getVariables(), timeRange, yLatRange, xLngRange); } catch (OPeNDAPUtilException ignore) {} assertNotNull(openDapURL); assertTrue(openDapURL.equals("http: }