fileCount((BaseNode) fileList.getRoot());
startTime = System.currentTimeMillis();
RootNode root = (RootNode) fileList.getRoot();
for (int i = 0; i < root.getChildCount() && !stopping; i++) {
ObjectFolderNode object = (ObjectFolderNode) root.getChildAt(i);
// work out what kind of harvester to use for each object...
if (!FileModel.hasAFile(object)) {
LogMessage msg = new LogMessage(LogMessage.DEBUG, object
.getName(), "Object contains no files - skipping",
"Add files to this object");
LogManager.getInstance().logMessage(msg);
continue;
}
String harvesterClass = config.getClassName();
if (harvesterClass != null) {
try {
harvester = (Harvester) Class.forName(harvesterClass)
.newInstance();
// go to it...
System.out.println("Harvesting " + object);
harvester.harvest(config, object, new PropsManager(object,
mainFrame), this);
} catch (Throwable ex) {
System.out.println("Exception Harvesting " + object);
LogMessage msg = new LogMessage(LogMessage.ERROR, ex, ex
.getMessage(), "");
LogManager.getInstance().logMessage(msg);
object.setStatus(HarvestStatus.ERROR, ex.getMessage()
+ " (logid=" + msg.getId() + ")");
error = true;
}
System.gc();
} else {