X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=55bb03db516eaea6fc82b00b16cd61739778ec2a;hb=0f40a8334651302a74a223ecd3e583451302bb42;hp=fb414f41ff1d143dcf8ee74967b70543a275bb3d;hpb=0bec4854366c4bc4608ed0d7dc1506fc6afe2285;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index fb414f4..55bb03d 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -26,6 +26,7 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; +import jalview.datamodel.PDBEntry.Type; import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; @@ -280,8 +281,10 @@ public class AppletFormatAdapter { // TODO obtain config value from preference settings. // Set value to 'true' to test PDB processing with Jmol: JAL-1213 - boolean isParseWithJMOL = !StructureImportSettings - .getCurrentDefaultFormat().equalsIgnoreCase("PDB"); + boolean isParseWithJMOL = StructureImportSettings + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); if (isParseWithJMOL) { StructureImportSettings.addSettings(annotFromStructure, @@ -299,13 +302,15 @@ public class AppletFormatAdapter localSecondaryStruct, serviceSecondaryStruct, inFile, type); } + ((StructureFile) alignFile).setDbRefType(format); } - else if (format.equals("mmCIF")) + else if (format.equalsIgnoreCase("mmCIF")) { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, type); + ((StructureFile) alignFile).setDbRefType(format); } else if (format.equals("STH")) { @@ -447,13 +452,15 @@ public class AppletFormatAdapter alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } + ((StructureFile) alignFile).setDbRefType(Type.PDB); } - else if (format.equals("mmCIF")) + else if (format.equalsIgnoreCase("mmCIF")) { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); + ((StructureFile) alignFile).setDbRefType(Type.MMCIF); } else if (format.equals("STH")) {