X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=552f00edc24cbc8fea60631a5ce93f6369dc71e0;hb=19f8ee5562523508666b4472ad624b9e549a3cea;hp=fca726359ae9a1002f038f869f214b5221ac61f0;hpb=0555b298d22be533a0a67a3cd0ce2db883bae8bd;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index fca7263..552f00e 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -26,6 +26,8 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; +import jalview.datamodel.PDBEntry.Type; +import jalview.ext.jmol.JmolParser; import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; @@ -276,38 +278,11 @@ public class AppletFormatAdapter alignFile = new JPredFile(inFile, type); ((JPredFile) alignFile).removeNonSequences(); } - else if (format.equals("PDB")) - { - // TODO obtain config value from preference settings. - // Set value to 'true' to test PDB processing with Jmol: JAL-1213 - boolean isParseWithJMOL = StructureImportSettings - .getDefaultPDBFileParser().equalsIgnoreCase( - StructureImportSettings.JMOL_PARSER); - if (isParseWithJMOL) - { - StructureImportSettings.addSettings(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, - type); - } - else - { - StructureImportSettings.addSettings(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct); - StructureImportSettings.setShowSeqFeatures(true); - alignFile = new MCview.PDBfile(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, - type); - } - ((StructureFile) alignFile).setDbRefType(format); - } - else if (format.equals("mmCIF")) + else if (format.equals("PDB") || format.equalsIgnoreCase("mmCIF")) { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, type); + alignFile = new JmolParser(inFile, type); ((StructureFile) alignFile).setDbRefType(format); } else if (format.equals("STH")) @@ -441,8 +416,7 @@ public class AppletFormatAdapter { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, source); + alignFile = new JmolParser(source); } else { @@ -450,17 +424,14 @@ public class AppletFormatAdapter alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } - ((StructureFile) alignFile) - .setDbRefType(StructureImportSettings.PDB); + ((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(StructureImportSettings.MMCIF); + alignFile = new JmolParser(source); + ((StructureFile) alignFile).setDbRefType(Type.MMCIF); } else if (format.equals("STH")) {