/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new MetadataTool(), args)); } }
final Fiji fiji = Fiji.Factory.open(mFijiURI, getConf()); try { if ((mOutFile != null) && !mOutFile.isEmpty()) { mRestorer.exportMetadata(mOutFile, fiji); } catch (IOException ioe) { getPrintStream().println("Error performing backup: " + ioe.getMessage()); getPrintStream().println("(Backup failed.)"); return FAILURE; if (isInteractive()) { if (!yesNoPrompt("Are you sure you want to restore metadata from backup? \n" + "This will delete your current metatable. ")) { getPrintStream().println("No metadata restore operation performed."); return FAILURE; getPrintStream().println("Restoring Metadata from backup."); initRestoreOps(); restoreMetadata(mInFile, fiji); getPrintStream().println("Error performing restore: " + ioe.getMessage()); getPrintStream().println("(Restore failed.)"); return FAILURE; getPrintStream().println(re.getMessage()); getPrintStream().println("(Restore failed.)"); return FAILURE;
getPrintStream().println("Restore complete.");