X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=9695891e566bad7f332692a2cf64e68d476e2110;hb=894672b99c68bc0562ef5a3a0396a4825c8d7d48;hp=42a8ead3785390315d01b4a51de0b4c2e6e33041;hpb=834ebffc22ed9e72b139cadf5652d1a7006da9b3;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 42a8ead..9695891 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -26,7 +26,9 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; -import jalview.structure.StructureViewSettings; +import jalview.datamodel.PDBEntry.Type; +import jalview.ext.jmol.JmolParser; +import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; import java.io.File; @@ -280,32 +282,33 @@ public class AppletFormatAdapter { // TODO obtain config value from preference settings. // Set value to 'true' to test PDB processing with Jmol: JAL-1213 - boolean isParseWithJMOL = !StructureViewSettings - .getCurrentDefaultFormat().equalsIgnoreCase("PDB"); + boolean isParseWithJMOL = StructureImportSettings + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); if (isParseWithJMOL) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, - type); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); } else { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - StructureViewSettings.setShowSeqFeatures(true); + StructureImportSettings.setShowSeqFeatures(true); alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, type); } + ((StructureFile) alignFile).setDbRefType(format); } - else if (format.equals("mmCIF")) + else if (format.equalsIgnoreCase("mmCIF")) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, type); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); + ((StructureFile) alignFile).setDbRefType(format); } else if (format.equals("STH")) { @@ -436,24 +439,24 @@ public class AppletFormatAdapter boolean isParseWithJMOL = false; if (isParseWithJMOL) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, source); + alignFile = new JmolParser(source); } else { - StructureViewSettings.setShowSeqFeatures(true); + StructureImportSettings.setShowSeqFeatures(true); alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } + ((StructureFile) alignFile).setDbRefType(Type.PDB); } - else if (format.equals("mmCIF")) + else if (format.equalsIgnoreCase("mmCIF")) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, source); + alignFile = new JmolParser(source); + ((StructureFile) alignFile).setDbRefType(Type.MMCIF); } else if (format.equals("STH")) {