@Override protected void buildNetcdfDataset(CancelTask cancelTask) throws IOException { // each Dataset just gets "transfered" into the resulting NetcdfDataset List<Dataset> nestedDatasets = getDatasets(); for (Dataset vnested : nestedDatasets) { // LOOK could just open the file, not use acquire. NetcdfFile ncfile = vnested.acquireFile(cancelTask); DatasetConstructor.transferDataset(ncfile, ncDataset, null); // do not close - all stay open. Could use Proxy if need to open only as needed. openDatasets.add(ncfile); } }
@Override protected void buildNetcdfDataset(CancelTask cancelTask) throws IOException { // each Dataset just gets "transfered" into the resulting NetcdfDataset List<Dataset> nestedDatasets = getDatasets(); for (Dataset vnested : nestedDatasets) { // LOOK could just open the file, not use acquire. NetcdfFile ncfile = vnested.acquireFile(cancelTask); DatasetConstructor.transferDataset(ncfile, ncDataset, null); // do not close - all stay open. Could use Proxy if need to open only as needed. openDatasets.add(ncfile); } }
@Override protected void buildNetcdfDataset(CancelTask cancelTask) throws IOException { // each Dataset just gets "transfered" into the resulting NetcdfDataset List<Dataset> nestedDatasets = getDatasets(); for (Dataset vnested : nestedDatasets) { // LOOK could just open the file, not use acquire. NetcdfFile ncfile = vnested.acquireFile(cancelTask); DatasetConstructor.transferDataset(ncfile, ncDataset, null); setDatasetAcquireProxy(vnested, ncDataset); vnested.close( ncfile); // close it because we use DatasetProxyReader to acquire } ncDataset.finish(); }