JAL-1620 version bump and release notes
[jalview.git] / src / jalview / io / AppletFormatAdapter.java
index d43e7c1..81783fc 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
  * Copyright (C) 2014 The Jalview Authors
  *
  * This file is part of Jalview.
@@ -25,6 +25,7 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
+import jalview.util.MessageManager;
 
 import java.io.File;
 import java.io.InputStream;
@@ -122,6 +123,21 @@ public class AppletFormatAdapter
 
   public static String CLASSLOADER = "ClassLoader";
 
+  /**
+   * add jalview-derived non-secondary structure annotation from PDB structure
+   */
+  boolean annotFromStructure = false;
+
+  /**
+   * add secondary structure from PDB data with built-in algorithms
+   */
+  boolean localSecondaryStruct = false;
+
+  /**
+   * process PDB data with web services
+   */
+  boolean serviceSecondaryStruct = false;
+
   AlignFile afile = null;
 
   String inFile;
@@ -235,7 +251,8 @@ public class AppletFormatAdapter
       }
       else if (format.equals("PDB"))
       {
-        afile = new MCview.PDBfile(inFile, type);
+        afile = new MCview.PDBfile(annotFromStructure,
+                localSecondaryStruct, serviceSecondaryStruct, inFile, type);
         // Uncomment to test Jmol data based PDB processing: JAL-1213
         // afile = new jalview.ext.jmol.PDBFileWithJmol(inFile, type);
       }
@@ -356,7 +373,8 @@ public class AppletFormatAdapter
       }
       else if (format.equals("PDB"))
       {
-        afile = new MCview.PDBfile(source);
+        afile = new MCview.PDBfile(annotFromStructure,
+                localSecondaryStruct, serviceSecondaryStruct, source);
       }
       else if (format.equals("STH"))
       {
@@ -516,8 +534,7 @@ public class AppletFormatAdapter
 
       else
       {
-        throw new Exception(
-                "Implementation error: Unknown file format string");
+        throw new Exception(MessageManager.getString("error.implementation_error_unknown_file_format_string"));
       }
       afile.setNewlineString(newline);
       afile.addJVSuffix(jvsuffix);