new Function<File, Index>()
{
@Override
public Index apply(File f)
{
IndexMetaData metaData;
try
{
metaData = indexCache.getMetaData(f);
}
catch ( Exception e )
{
context.getExhibitor().getLog().add(ActivityLog.Type.ERROR, "Loading index metadata: " + f, e);
metaData = new IndexMetaData(new Date(), new Date(), 0);
}
return new Index
(
f.getName(),
format.format(metaData.getFrom()),
format.format(metaData.getTo()),
metaData.getEntryCount()
);
}
}
)
){};