StationProfileFeatureCollectionSubset(StationProfileCollectionImpl from, List<Station> stations) throws IOException { super( from.getName(), from.getTimeUnit(), from.getAltUnits()); this.from = from; this.stations = stations; }
@Override public void resetIteration() throws IOException { localIterator = getNestedPointFeatureCollectionIterator(); }
public StationProfileCollectionImpl subset(ucar.unidata.geoloc.LatLonRect boundingBox) throws IOException { return subset( getStations(boundingBox)); }
@Override public StationProfileFeatureCollection subset(LatLonRect boundingBox, CalendarDateRange dateRange) throws IOException { return subset(getStationFeatures(boundingBox), dateRange); }
@Override public StationFeature findStationFeature(String name) { return getStationHelper().getStation(name); }
@Override public boolean hasNext() throws IOException { if (localIterator == null) resetIteration(); return localIterator.hasNext(); }
@Override public StationProfileCollectionImpl subset(List<StationFeature> stnsWanted, CalendarDateRange dateRange) throws IOException { if (dateRange == null) return subset(stnsWanted); List<StationFeature> subsetStations = new ArrayList<>(); for (StationFeature sf : stnsWanted) { StationProfileFeature stsf = (StationProfileFeature) sf; // LOOK StationProfileFeature subset = stsf.subset(dateRange); subsetStations.add(subset); } return new StationProfileFeatureCollectionSubset(this, subsetStations); }
StationProfileFeatureCollectionSubset(StationProfileCollectionImpl from, List<Station> stations) { super( from.getName()); this.from = from; stationHelper = new StationHelper(); stationHelper.setStations(stations); }
protected StationHelper getStationHelper() { if (stationHelper == null) { synchronized (this) { if (stationHelper == null) { try { stationHelper = createStationHelper(); } catch (IOException e) { // The methods that will call getStationHelper() aren't declared to throw IOException, so we must // wrap it in an unchecked exception. throw new RuntimeException(e); } } } } assert stationHelper != null : "We screwed this up."; return stationHelper; }
@Override public LatLonRect getBoundingBox() { return getStationHelper().getBoundingBox(); }
@Override public StationProfileCollectionImpl subset(ucar.unidata.geoloc.LatLonRect boundingBox) throws IOException { return subset(getStationFeatures(boundingBox)); }
public boolean hasNext() throws IOException { if (localIterator == null) resetIteration(); return localIterator.hasNext(); }
protected StationHelper getStationHelper() { if (stationHelper == null) { synchronized (this) { if (stationHelper == null) { try { stationHelper = createStationHelper(); } catch (IOException e) { // The methods that will call getStationHelper() aren't declared to throw IOException, so we must // wrap it in an unchecked exception. throw new RuntimeException(e); } } } } assert stationHelper != null : "We screwed this up."; return stationHelper; }
StationProfileFeatureCollectionSubset(StationProfileCollectionImpl from, List<StationFeature> stations) throws IOException { super( from.getName(), from.getTimeUnit(), from.getAltUnits()); this.from = from; this.stations = stations; }
public void resetIteration() throws IOException { localIterator = getNestedPointFeatureCollectionIterator(-1); }
@Override public List<StationFeature> getStationFeatures() throws IOException { return getStationHelper().getStationFeatures(); }
public StationProfileCollectionImpl subset(ucar.unidata.geoloc.LatLonRect boundingBox) throws IOException { return subset( getStations(boundingBox)); }
public boolean hasNext() throws IOException { if (localIterator == null) resetIteration(); return localIterator.hasNext(); }
public void resetIteration() throws IOException { localIterator = getNestedPointFeatureCollectionIterator(-1); }
@Override protected StationHelper createStationHelper() throws IOException { return from.getStationHelper().subset(stations); }