Cursor copy() { Cursor clone = new Cursor(tableData.length); //clone.what = what; // not a copy !! clone.currentIndex = currentIndex; System.arraycopy(this.tableData, 0, clone.tableData, 0, tableData.length); System.arraycopy(this.recnum, 0, clone.recnum, 0, tableData.length); return clone; } }
@Override public IOIterator<PointFeatureCollection> getCollectionIterator() throws IOException { return new ProfileIterator(cursor.copy()); } }
StructureData getParentStructure() { return tableData[getParentIndex()]; }
public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize) throws IOException { int firstRecno, numrecs; StructureData parentStruct = cursor.getParentStructure(); if (startIndex != null) { int parentIndex = cursor.getParentRecnum(); firstRecno = startIndex[parentIndex]; numrecs = numRecords[parentIndex]; } else { firstRecno = parentStruct.getScalarInt(startVarName); numrecs = parentStruct.getScalarInt(numRecordsVarName); } return new StructureDataIteratorLinked(struct, firstRecno, numrecs, null); }
@Override public Station getStation() { return ft.makeStation(cursor.getParentStructure()); } }
public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize) throws IOException { int parentIndex = cursor.getParentRecnum(); ParentInfo info = indexMap[parentIndex]; List<Integer> index = (info == null) ? new ArrayList<Integer>() : info.recnumList; return new StructureDataIteratorIndexed(struct, index); }
@Override public StationFeature getStation() { return ft.makeStation(cursor.getParentStructure()); // LOOK is this always possible?? } }
@Override public StructureDataIterator getStructureDataIterator(Cursor cursor) throws IOException { if (!isInit) init(); int firstRecno, numrecs; StructureData parentStruct = cursor.getParentStructure(); if (startIndex != null) { int parentIndex = cursor.getParentRecnum(); firstRecno = startIndex[parentIndex]; numrecs = numRecords[parentIndex]; } else { firstRecno = parentStruct.getScalarInt(startVarName); numrecs = parentStruct.getScalarInt(numRecordsVarName); } return new StructureDataIteratorLinked(struct, firstRecno, numrecs, null); }
@Override public StructureDataIterator getStructureDataIterator(Cursor cursor) throws IOException { int parentIndex = cursor.getParentRecnum(); ParentInfo info = indexMap[parentIndex]; List<Integer> index = (info == null) ? new ArrayList<>() : info.recnumList; return new StructureDataIteratorIndexed(struct, index); }
@Override public PointFeatureCollectionIterator getPointFeatureCollectionIterator(int bufferSize) throws IOException { return new StandardSectionFeatureIterator(cursor.copy()); }
Cursor copy() { Cursor clone = new Cursor(tableData.length); //clone.what = what; // not a copy !! clone.currentIndex = currentIndex; System.arraycopy(this.tableData, 0, clone.tableData, 0, tableData.length); System.arraycopy(this.recnum, 0, clone.recnum, 0, tableData.length); return clone; } }
@Override public StationFeature getStation() { return ft.makeStation(cursor.getParentStructure()); // LOOK is this always possible?? }
public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize) throws IOException { if (!isInit) init(); int firstRecno, numrecs; StructureData parentStruct = cursor.getParentStructure(); if (startIndex != null) { int parentIndex = cursor.getParentRecnum(); firstRecno = startIndex[parentIndex]; numrecs = numRecords[parentIndex]; } else { firstRecno = parentStruct.getScalarInt(startVarName); numrecs = parentStruct.getScalarInt(numRecordsVarName); } return new StructureDataIteratorLinked(struct, firstRecno, numrecs, null); }
public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize) throws IOException { int parentIndex = cursor.getParentRecnum(); List<Integer> index = indexMap.get(parentIndex); if (index == null) index = new ArrayList<Integer>(); return new StructureDataIteratorIndexed(struct, index); }
int getParentRecnum() { return recnum[getParentIndex()]; }
@Override public PointFeatureCollectionIterator getPointFeatureCollectionIterator() throws IOException { return new ProfileFeatureIterator(cursor.copy()); }
Cursor copy() { Cursor clone = new Cursor(tableData.length); //clone.what = what; // not a copy !! clone.currentIndex = currentIndex; System.arraycopy(this.tableData, 0, clone.tableData, 0, tableData.length); System.arraycopy(this.recnum, 0, clone.recnum, 0, tableData.length); return clone; } }
@Override public StructureDataIterator getStructureDataIterator(Cursor cursor) throws IOException { StructureData parentStruct = cursor.getParentStructure(); int firstRecno = parentStruct.getScalarInt(start); return new StructureDataIteratorLinked(struct, firstRecno, -1, next); }
public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferSize) throws IOException { int parentIndex = cursor.getParentRecnum(); List<Integer> index = indexMap.get(parentIndex); if (index == null) index = new ArrayList<>(); return new StructureDataIteratorIndexed(struct, index); }
StructureData getParentStructure() { return tableData[getParentIndex()]; }