JAL-653 JAL-1780 JAL-1543 javadoc and comment about further refactoring
[jalview.git] / src / jalview / io / FileParse.java
index 764715f..8f5144b 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -20,6 +20,8 @@
  */
 package jalview.io;
 
+import jalview.api.AlignExportSettingI;
+import jalview.api.AlignViewportI;
 import jalview.util.MessageManager;
 
 import java.io.BufferedReader;
@@ -48,10 +50,26 @@ public class FileParse
 
   public File inFile = null;
 
-  public int index = 1; // sequence counter for FileParse object created from
+  /**
+   * a viewport associated with the current file operation. May be null. May
+   * move to different object.
+   */
+  private AlignViewportI viewport;
 
-  // same data source
+  /**
+   * specific settings for exporting data from the current context
+   */
+  private AlignExportSettingI exportSettings;
+
+  /**
+   * sequence counter for FileParse object created from same data source
+   */
+  public int index = 1;
 
+  /**
+   * separator for extracting specific 'frame' of a datasource for formats that
+   * support multiple records (e.g. BLC, Stockholm, etc)
+   */
   protected char suffixSeparator = '#';
 
   /**
@@ -488,4 +506,33 @@ public class FileParse
     }
     return null;
   }
+
+  public AlignViewportI getViewport()
+  {
+    return viewport;
+  }
+
+  public void setViewport(AlignViewportI viewport)
+  {
+    this.viewport = viewport;
+  }
+
+  /**
+   * @return the currently configured exportSettings for writing data.
+   */
+  public AlignExportSettingI getExportSettings()
+  {
+    return exportSettings;
+  }
+
+  /**
+   * Set configuration for export of data.
+   * 
+   * @param exportSettings
+   *          the exportSettings to set
+   */
+  public void setExportSettings(AlignExportSettingI exportSettings)
+  {
+    this.exportSettings = exportSettings;
+  }
 }