JAL-1486 JAL-1543 pushed alignment viewport->view->flat file logic into jalview.io...
[jalview.git] / src / jalview / io / FormatAdapter.java
index 9913428..c2a317a 100755 (executable)
@@ -20,6 +20,7 @@
  */
 package jalview.io;
 
+import jalview.api.AlignViewportI;
 import jalview.datamodel.*;
 
 /**
@@ -247,4 +248,16 @@ public class FormatAdapter extends AppletFormatAdapter
     }
     return AppletFormatAdapter.isValidFormat(format, forwriting);
   }
+
+  /**
+   * Create a flat file representation of a given view or selected region of a view
+   * @param format
+   * @param av
+   * @return String containing flat file
+   */
+  public String formatSequences(String format, AlignViewportI av, boolean selectedOnly)
+  {
+    return formatSequences(format, getCacheSuffixDefault(format), av, selectedOnly);
+  }
+
 }