* @param aparser
* @param format
*/
- private void createOutputFiles(ArgsParser aparser,
- FileFormatI format)
+ private void createOutputFiles(ArgsParser aparser, FileFormatI format)
{
AlignFrame af = currentAlignFrame;
while (aparser.getSize() >= 2)
"Creating image map: " + imageFile.getAbsolutePath());
continue;
default:
- // fall through - try to parse as an alignment data export format
- FileFormatI outFormat=null;
- try {
- outFormat = FileFormats.getInstance().forName(outputFormat);
- } catch (Exception formatP) {
- }
- if (outFormat==null) {
- System.out.println("Couldn't parse "+outputFormat+" as a valid Jalview format string.");
- continue;
- }
- if (!outFormat.isWritable())
- {
- System.out.println(
- "This version of Jalview does not support alignment export as "
- + outputFormat);
- continue;
- }
- // record file as it was passed to Jalview so it is recognisable to the CLI caller
- String file;
- fname = new File(file=aparser.nextValue()).getAbsolutePath();
- // JBPNote - yuck - really wish we did have a bean returned from this which gave success/fail like before !
- af.saveAlignment(fname, outFormat);
- if (!af.isSaveAlignmentSuccessful())
- {
- System.out.println("Written alignment in " + outputFormat
- + " format to " + file);
- continue;
- } else {
- System.out.println("Error writing file " + file + " in "
- + outputFormat + " format!!");
- }
+ // fall through - try to parse as an alignment data export format
+ FileFormatI outFormat = null;
+ try
+ {
+ outFormat = FileFormats.getInstance().forName(outputFormat);
+ } catch (Exception formatP)
+ {
+ }
+ if (outFormat == null)
+ {
+ System.out.println("Couldn't parse " + outputFormat
+ + " as a valid Jalview format string.");
+ continue;
+ }
+ if (!outFormat.isWritable())
+ {
+ System.out.println(
+ "This version of Jalview does not support alignment export as "
+ + outputFormat);
+ continue;
+ }
+ // record file as it was passed to Jalview so it is recognisable to the CLI
+ // caller
+ String file;
+ fname = new File(file = aparser.nextValue()).getAbsolutePath();
+ // JBPNote - yuck - really wish we did have a bean returned from this which gave
+ // success/fail like before !
+ af.saveAlignment(fname, outFormat);
+ if (!af.isSaveAlignmentSuccessful())
+ {
+ System.out.println("Written alignment in " + outputFormat
+ + " format to " + file);
+ continue;
+ }
+ else
+ {
+ System.out.println("Error writing file " + file + " in "
+ + outputFormat + " format!!");
+ }
}
}
// ??? Should report - 'ignoring' extra args here...