try {
ArrayList records = new ArrayList();
NamingEnumeration childList = db.list( id );
while( childList.hasMore() )
{
IndexRecord old = ( IndexRecord ) childList.next();
IndexRecord newRec = new IndexRecord();
newRec.copy( old );
records.add( newRec );
}
childList.close();
Iterator list = records.iterator();
while( list.hasNext() )
{
IndexRecord rec = ( IndexRecord ) list.next();
if ( engine != null && exprNode != null )
{
if ( db.getChildCount( rec.getEntryId() ) == 0 )
{
if( engine.evaluate( exprNode, rec.getEntryId() ) )
{
Attributes newEntry = db.lookup( rec.getEntryId() );
EntryNode child = new EntryNode( rec.getEntryId(),
this, db, newEntry, map, exprNode, engine);
children.add(child);
}
else
{
continue;
}
}
else
{
Attributes newEntry = db.lookup( rec.getEntryId() );
EntryNode child = new EntryNode( rec.getEntryId(),
this, db, newEntry, map, exprNode, engine );
children.add( child );
}
}
else
{
Attributes newEntry = db.lookup( rec.getEntryId() );
EntryNode child = new EntryNode( rec.getEntryId(), this,
db, newEntry, map );
children.add( child );
}
}
}