Ejemplo n.º 1
0
  /**
   * Getting data for a single radar station, with time range.
   *
   * @param sName radar station name
   * @param dateSelect the date time selection information
   * @param cancel _more_
   * @return list of radialDatasetSweep
   * @throws IOException _more_
   */
  public List getData(String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel)
      throws IOException {
    if ((cancel != null) && cancel.isCancel()) {
      return null;
    }
    TDSRadarDatasetInfo dri =
        queryRadarStation(sName, dateSelect.getStartFixedDate(), dateSelect.getEndFixedDate());
    List datasetList = new ArrayList();

    List datasetINVs = dateSelect.apply(dri.getInvList());

    Iterator it = datasetINVs.iterator();
    while (it.hasNext()) {
      InvDatasetInfo ifo = (InvDatasetInfo) it.next();
      InvDataset tdata = ifo.inv;
      ThreddsDataFactory tdFactory = new ThreddsDataFactory();
      ThreddsDataFactory.Result result;
      result = tdFactory.openFeatureDataset(tdata, null);
      datasetList.add(result.featureDataset);
      if ((cancel != null) && cancel.isCancel()) {
        return null;
      }
    }

    return datasetList;
  }
Ejemplo n.º 2
0
  /**
   * get all radar station.
   *
   * @return List of type Station objects
   */
  public List<Station> getRadarStations() {
    List<Station> slist = new ArrayList();
    Iterator it = this.stationHMap.values().iterator();
    while (it.hasNext()) {
      slist.add((Station) it.next());
    }

    return slist;
  }