/** * 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 ArrayList getData(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()); ArrayList 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; }
/** * Getting data Iterator for a single radar station. * * @param stnName radar station name * @param start of the time * @param end of the time * @return dataset list * @throws IOException java io exception */ public ArrayList getRadarStationDatasets(String stnName, Date start, Date end) throws IOException { ArrayList datasetList = new ArrayList(); DqcRadarDatasetInfo dri = queryRadarStation(stnName, start, end); ArrayList iList = dri.getInvList(); int size = iList.size(); for (int i = 0; i < size; i++) { InvDatasetInfo iv = (InvDatasetInfo) iList.get(i); InvDataset tdata = iv.inv; ThreddsDataFactory tdFactory = new ThreddsDataFactory(); ThreddsDataFactory.Result result; result = tdFactory.openFeatureDataset(tdata, null); datasetList.add(result.featureDataset); } return datasetList; }