List<IndexEntry> recordForwards = new ArrayList<IndexEntry>();
Cursor<IndexEntry<String, String>> childList = null; //db.list( id );
while ( childList.next() )
{
IndexEntry old = childList.get();
IndexEntry newRec = new IndexEntry();
newRec.copy( old );
recordForwards.add( newRec );
}
childList.close();
Iterator list = recordForwards.iterator();
while ( list.hasNext() )
{
IndexEntry rec = ( IndexEntry ) list.next();
if ( engine != null && exprNode != null )
{
if ( db.getChildCount( ( String ) rec.getId() ) == 0 )
{
Evaluator evaluator = engine.evaluator( exprNode );
if ( evaluator.evaluate( rec ) )
{
Entry newEntry = db.lookup( ( String ) rec.getId() );
EntryNode child = new EntryNode( ( String ) rec.getId(), this, db, newEntry, map, exprNode,
engine );
children.add( child );
}
else
{
continue;
}
}
else
{
Entry newEntry = db.lookup( ( String ) rec.getId() );
EntryNode child = new EntryNode( ( String ) rec.getId(), this, db, newEntry, map, exprNode,
engine );
children.add( child );
}
}
else
{
Entry newEntry = db.lookup( ( String ) rec.getId() );
EntryNode child = new EntryNode( ( String ) rec.getId(), this, db, newEntry, map );
children.add( child );
}
}
}
catch ( Exception e )