final File colDir = collection.getDirectory();
final String colDirPath = colDir.getAbsolutePath();
final int colDirPathLength = colDirPath.length();
final String filterExpr = DbCollection.getDocumentFilterExp(colFilter);
final IOFileFilter idxFileFiler;
if(filterExpr == null) {
idxFileFiler = new FileUtils.SuffixFileFilter(IDocumentTable.DTM_SEGMENT_FILE_SUFFIX);
} else {
String fname = filterExpr + IDocumentTable.DTM_SEGMENT_FILE_SUFFIX;
idxFileFiler = new FileUtils.NameFileFilter(fname);
}
final IOFileFilter idxDirFilter = new FileUtils.NameFileFilter(LabelingHandler.INDEX_DIR_NAME);
final List<File> files = FileUtils.listFiles(colDir, idxFileFiler, idxDirFilter);
final List<Pair<DbCollection, String>> lst = new ArrayList<Pair<DbCollection, String>>(files.size());
for(File f : files) {
String fname = FileUtils.getFileName(f);
String dname = fname.substring(0, fname.lastIndexOf('.'));