コード例 #1
0
 @Test
 public void getFDForDatasetScanGridDataset() throws IOException {
   MockHttpServletRequest req = new MockHttpServletRequest();
   MockHttpServletResponse res = new MockHttpServletResponse();
   FeatureDataset fd =
       featureDatasetService.findDatasetByPath(
           req, res, "testGridScan/GFS_CONUS_80km_20120227_0000.grib1");
   assertNotNull(fd);
   assertEquals(FeatureType.GRID, fd.getFeatureType());
 }
コード例 #2
0
 @Test
 public void getFDForSingleFileStationDataset() throws IOException {
   MockHttpServletRequest req = new MockHttpServletRequest();
   MockHttpServletResponse res = new MockHttpServletResponse();
   FeatureDataset fd =
       featureDatasetService.findDatasetByPath(
           req, res, "cdmUnitTest/ncss/point_features/metar/Surface_METAR_20130826_0000.nc");
   assertNotNull(fd);
   assertEquals(FeatureType.STATION, fd.getFeatureType());
 }
コード例 #3
0
 @Test
 public void getFDForSingleFileGridDataset() throws IOException {
   MockHttpServletRequest req = new MockHttpServletRequest();
   MockHttpServletResponse res = new MockHttpServletResponse();
   FeatureDataset fd =
       featureDatasetService.findDatasetByPath(
           req, res, "cdmUnitTest/ncss/CONUS_80km_nc/GFS_CONUS_80km_20120419_0000.nc");
   assertNotNull(fd);
   assertEquals(FeatureType.GRID, fd.getFeatureType());
 }
コード例 #4
0
  @Test
  public void getFDForFeatureCollectionGridDataset() throws IOException {
    MockHttpServletRequest req = new MockHttpServletRequest();
    MockHttpServletResponse res = new MockHttpServletResponse();

    FeatureDataset fd =
        featureDatasetService.findDatasetByPath(req, res, "testGFSfmrc/GFS_CONUS_80km_nc_best.ncd");
    assertNotNull(fd);
    assertEquals(FeatureType.GRID, fd.getFeatureType());
  }
コード例 #5
0
  @Test
  public void getFDForFeatureCollectionStationDataset() throws IOException {
    MockHttpServletRequest req = new MockHttpServletRequest();
    MockHttpServletResponse res = new MockHttpServletResponse();

    FeatureDataset fd =
        featureDatasetService.findDatasetByPath(
            req, res, "testStationFeatureCollection/Metar_Station_Data_fc.cdmr");
    assertNotNull(fd);
    assertEquals(FeatureType.STATION, fd.getFeatureType());
  }
コード例 #6
0
  @Test
  public void getFDForDatasetScanStationDataset() throws IOException {
    MockHttpServletRequest req = new MockHttpServletRequest();
    MockHttpServletResponse res = new MockHttpServletResponse();

    String reqPath = "testStationScan/Surface_METAR_20130826_0000.nc";
    FeatureDataset fd = featureDatasetService.findDatasetByPath(req, res, reqPath);
    if (fd == null) {
      DataRootHandler.DataRootMatch match =
          DataRootHandler.getInstance().findDataRootMatch(reqPath);
      if (match == null) {
        Formatter f = new Formatter();
        DataRootHandler.getInstance().showRoots(f);
        System.out.printf("DataRoots%n%s%n", f);
      }
    }
    assertNotNull(fd);
    assertEquals(FeatureType.STATION, fd.getFeatureType());
  }