File outputChild = new File(outputFile, fileName);
migrateImpl(inputChild, outputChild,
path + "/" + fileName, migrator);
}
} else {
Notification note = notificationFactory.
createLocalizedNotification(
NotificationType.ERROR, "cannot-create-dir",
outputFile.getAbsolutePath());
reporter.reportNotification(note);
}
} else {
InputStream in = new FileInputStream(inputFile);
OutputCreator out = new FileOutputCreator(outputFile);
try {
InputMetadata inputMeta =
frameworkFactory.createInputMetadata(path, true);
migrator.migrate(inputMeta, in, out);
} catch (ResourceMigrationException me) {
reporter.reportNotification(
notificationFactory.createThrowableNotification(
NotificationType.ERROR, me));
}
}
} else {
Notification note = notificationFactory.createLocalizedNotification(
NotificationType.ERROR, "file-missing",
inputFile.getAbsolutePath());
reporter.reportNotification(note);
}
}