@Test public void ssebopetaVariableDimensionNameTest() { String timeRangeString = "[0:1:179]"; String xRangeString = "[1881:1:2663]"; String yRangeString = "[943:1:1391]"; Map<String, String> dimensionVariableMapping = OPeNDAPUtils.getDimensionVariableNameRangeMapping(ssebopetaGridDataSet.getNetcdfFile().getVariables(), xRangeString, yRangeString, timeRangeString); assertNotNull(dimensionVariableMapping); assertThat(dimensionVariableMapping.size(), is(equalTo(3))); assertTrue(dimensionVariableMapping.containsKey("time")); assertTrue(dimensionVariableMapping.get("time").equals(timeRangeString)); assertTrue(dimensionVariableMapping.containsKey("lat")); assertTrue(dimensionVariableMapping.get("lat").equals(yRangeString)); assertTrue(dimensionVariableMapping.containsKey("lon")); assertTrue(dimensionVariableMapping.get("lon").equals(xRangeString)); }
public static Map<String, String> getDimensionVariableNameRangeMapping( List<?> gridVariableList, String xRangeString, String yRangeString, String timeRangeString) { Map<String, String> results = new HashMap<String, String>(); for (int i = 0; i < gridVariableList.size(); i++) { Object variable = gridVariableList.get(i); if (variable instanceof CoordinateAxis1D) { String varName = ((VariableDS) variable).getShortName(); switch (((CoordinateAxis1D) variable).getAxisType()) { case GeoX: case Lon: { results.put(varName, xRangeString); break; } case GeoY: case Lat: { results.put(varName, yRangeString); break; } case Time: { results.put(varName, timeRangeString); break; } default: { } } } } return results; }
OPeNDAPUtils { public static Map<String, String> getDimensionVariableNameRangeMapping( List<?> gridVariableList, String xRangeString, String yRangeString, String timeRangeString) { Map<String, String> results = new HashMap<String, String>(); for (int i = 0; i < gridVariableList.size(); i++) { Object variable = gridVariableList.get(i); if (variable instanceof CoordinateAxis1D) { String varName = ((VariableDS) variable).getShortName(); switch (((CoordinateAxis1D) variable).getAxisType()) { case GeoX: case Lon: { results.put(varName, xRangeString); break; } case GeoY: case Lat: { results.put(varName, yRangeString); break; } case Time: { results.put(varName, timeRangeString); break; } default: { } } } } return results; } }
OPeNDAPUtils { public static Map<String, String> getDimensionVariableNameRangeMapping( List<?> gridVariableList, String xRangeString, String yRangeString, String timeRangeString) { Map<String, String> results = new HashMap<String, String>(); for (int i = 0; i < gridVariableList.size(); i++) { Object variable = gridVariableList.get(i); if (variable instanceof CoordinateAxis1D) { String varName = ((VariableDS) variable).getShortName(); switch (((CoordinateAxis1D) variable).getAxisType()) { case GeoX: case Lon: { results.put(varName, xRangeString); break; } case GeoY: case Lat: { results.put(varName, yRangeString); break; } case Time: { results.put(varName, timeRangeString); break; } default: { } } } } return results; }  }
OPeNDAPUtils { public static Map<String, String> getDimensionVariableNameRangeMapping( List<?> gridVariableList, String xRangeString, String yRangeString, String timeRangeString) { Map<String, String> results = new HashMap<String, String>(); for (int i = 0; i < gridVariableList.size(); i++) { Object variable = gridVariableList.get(i); if (variable instanceof CoordinateAxis1D) { String varName = ((VariableDS) variable).getShortName(); switch (((CoordinateAxis1D) variable).getAxisType()) { case GeoX: case Lon: { results.put(varName, xRangeString); break; } case GeoY: case Lat: { results.put(varName, yRangeString); break; } case Time: { results.put(varName, timeRangeString); break; } default: { } } } } return results; }  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); }
OPeNDAPUtils { public static Map<String, String> getDimensionVariableNameRangeMapping( List<?> gridVariableList, String xRangeString, String yRangeString, String timeRangeString) { Map<String, String> results = new HashMap<String, String>(); for (int i = 0; i < gridVariableList.size(); i++) { Object variable = gridVariableList.get(i); if (variable instanceof CoordinateAxis1D) { String varName = ((VariableDS) variable).getShortName(); switch (((CoordinateAxis1D) variable).getAxisType()) { case GeoX: case Lon: { results.put(varName, xRangeString); break; } case GeoY: case Lat: { results.put(varName, yRangeString); break; } case Time: { results.put(varName, timeRangeString); break; } default: { } } } } return results; }  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; }