@Override public ProfileFeature getProfileByDate(Date date) throws IOException { resetIteration(); while (hasNext()) { ProfileFeature pf = next(); if (pf.getTime().equals(date)) return pf; } return null; }
public PointFeatureCollection next() throws IOException { count++; return new StandardProfileFeature(s, getTimeUnit(), getAltUnits(), ft.getObsTime(cursor), cursor.copy(), profileData); }
public StationFeature makeStation(StructureData stationData, int recnum) { StationFeature s = ft.makeStation(stationData); if (s == null) return null; return new StandardStationProfileFeature(s, stationData, recnum); }
public Station makeStation(StructureData stationData, int recnum) { Station s = ft.makeStation(stationData); if (s == null) return null; return new StandardStationProfileFeature(s, stationData, recnum); }
@Override public PointFeatureCollection next() throws IOException { count++; PointFeatureCollection result = new StandardProfileFeature(station, getTimeUnit(), getAltUnits(), ft.getObsTime(cursor), cursor.copy(), profileData); prev = (DsgCollectionImpl) result; return result; }
@Override public List<Date> getTimes() throws IOException { List<Date> result = new ArrayList<>(); resetIteration(); while (hasNext()) { ProfileFeature pf = next(); result.add(pf.getTime()); } return result; }
@Override public ProfileFeature getProfileByDate(Date date) throws IOException { resetIteration(); while (hasNext()) { ProfileFeature pf = next(); if (pf.getTime().equals(date)) return pf; } return null; }
@Override public List<Date> getTimes() throws IOException { List<Date> result = new ArrayList<Date>(); resetIteration(); while (hasNext()) { ProfileFeature pf = next(); result.add(pf.getTime()); } return result; }
ProfileFeatureIterator(Cursor cursor) throws IOException { this.cursor = cursor; sdataIter = ft.getMiddleFeatureDataIterator(cursor); CollectionInfo info = getInfo(); if (!info.isComplete()) calcInfo = info; }
@Override public StationProfileFeature next() throws IOException { Cursor cursor = new Cursor(ft.getNumberOfLevels()); cursor.recnum[2] = sdataIter.getCurrentRecno(); cursor.tableData[2] = stationProfileData; // obs(leaf) = 0, profile=1, section(root)=2 cursor.currentIndex = 2; ft.addParentJoin(cursor); // there may be parent joins StationProfileFeature result = new StandardStationProfileFeature(ft.makeStation(stationProfileData), cursor, stationProfileData, cursor.recnum[2]); prev = (DsgCollectionImpl) result; // common for Station and StationProfile return result; }