// RecordFactory tripleRecordFactory = new RecordFactory(SystemTDB.LenIndexTripleRecord, 0) ;
// RecordFactory quadRecordFactory = new RecordFactory(SystemTDB.LenIndexQuadRecord, 0) ;
RecordFactory nodeTableRecordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId) ;
Index n2id1 = IndexBuilder.createIndex(new FileSet(location1, Names.indexNode2Id), nodeTableRecordFactory) ;
Index n2id2 = IndexBuilder.createIndex(new FileSet(location2, Names.indexNode2Id), nodeTableRecordFactory) ;
System.out.println("Node table 01: node2id index") ;
Iterator<Record> iter1 = n2id1.iterator() ;
while ( iter1.hasNext() ) {
System.out.println(iter1.next()) ;
}
System.out.println("Node table 02: node2id index") ;
Iterator<Record> iter2 = n2id2.iterator() ;
while ( iter2.hasNext() ) {
System.out.println(iter2.next()) ;
}
System.out.println("Node table: how do we merge the node2id indexes?") ;
List<Iterator<Record>> indexes = new ArrayList<Iterator<Record>>();
indexes.add(n2id1.iterator()) ;
indexes.add(n2id2.iterator()) ;
MergeSortIterator<Record> merger = new MergeSortIterator<Record>(indexes, new RecordComparator()) ;
while ( merger.hasNext() ) {
System.out.println(merger.next());
}