Exemplo n.º 1
0
  /**
   * Getting data for a single radar station.
   *
   * @param stnName radar station name
   * @param start of the time
   * @param end of the time
   * @return data URI list
   * @throws IOException java io exception
   */
  public ArrayList getRadarStationURIs(String stnName, Date start, Date end) throws IOException {

    DqcRadarDatasetInfo dri = queryRadarStation(stnName, start, end);
    ArrayList uList = dri.getURIList();

    int size = uList.size();
    ArrayList datasetsURI = new ArrayList();

    for (int i = 0; i < size; i++) {
      DatasetURIInfo du = (DatasetURIInfo) uList.get(i);
      datasetsURI.add(du.uri);
    }

    return datasetsURI;
  }
Exemplo n.º 2
0
  /**
   * _more_
   *
   * @param sName _more_
   * @param dateSelect _more_
   * @param cancel _more_
   * @return _more_
   * @throws IOException _more_
   */
  public ArrayList getDataURIs(
      String sName, DateSelection dateSelect, ucar.nc2.util.CancelTask cancel) throws IOException {
    if ((cancel != null) && cancel.isCancel()) {
      return null;
    }
    DqcRadarDatasetInfo dri =
        queryRadarStation(sName, dateSelect.getStartFixedDate(), dateSelect.getEndFixedDate());

    // create a list to hold URIs
    List datasetsURIs = dateSelect.apply(dri.getURIList());
    ArrayList uriList = new ArrayList();

    Iterator it = datasetsURIs.iterator();
    while (it.hasNext()) {
      DatasetURIInfo ufo = (DatasetURIInfo) it.next();
      URI u = ufo.uri;
      uriList.add(u);
      if ((cancel != null) && cancel.isCancel()) {
        return null;
      }
    }

    return uriList;
  }