X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=1738f99a54d485b2d37c9943f387f2a13b8df674;hb=8b27085fa7fc5f2877e078421284c2636b85b8c6;hp=be042e6b6476a7491dc7494d89a138d6771662d9;hpb=ddd696878955d609d942c4173dd66a0da9572741;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index be042e6..1738f99 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -32,8 +32,9 @@ import jalview.datamodel.Annotation; import jalview.datamodel.PDBEntry; import jalview.datamodel.SearchResults; import jalview.datamodel.SequenceI; +import jalview.ext.jmol.JmolParser; import jalview.gui.IProgressIndicator; -import jalview.io.AppletFormatAdapter; +import jalview.io.DataSourceType; import jalview.io.StructureFile; import jalview.util.MappingUtils; import jalview.util.MessageManager; @@ -316,14 +317,14 @@ public class StructureSelectionManager * (may be nill, individual elements may be nill) * @param pdbFile * - structure data resource - * @param protocol + * @param paste * - how to resolve data from resource * @return null or the structure data parsed as a pdb file */ synchronized public StructureFile setMapping(SequenceI[] sequence, - String[] targetChains, String pdbFile, String protocol) + String[] targetChains, String pdbFile, DataSourceType paste) { - return setMapping(true, sequence, targetChains, pdbFile, protocol); + return setMapping(true, sequence, targetChains, pdbFile, paste); } @@ -341,14 +342,14 @@ public class StructureSelectionManager * (may be nill, individual elements may be nill) * @param pdbFile * - structure data resource - * @param protocol + * @param sourceType * - how to resolve data from resource * @return null or the structure data parsed as a pdb file */ synchronized public StructureFile setMapping(boolean forStructureView, SequenceI[] sequenceArray, String[] targetChainIds, String pdbFile, - String protocol) + DataSourceType sourceType) { /* * There will be better ways of doing this in the future, for now we'll use @@ -391,17 +392,17 @@ public class StructureSelectionManager .toString()); if (isParseWithJMOL || (pdbFile != null && isCIFFile(pdbFile))) { - pdb = new jalview.ext.jmol.JmolParser(addTempFacAnnot, parseSecStr, - secStructServices, pdbFile, protocol); + pdb = new JmolParser(addTempFacAnnot, parseSecStr, + secStructServices, pdbFile, sourceType); } else { pdb = new PDBfile(addTempFacAnnot, parseSecStr, secStructServices, - pdbFile, protocol); + pdbFile, sourceType); } if (pdb.getId() != null && pdb.getId().trim().length() > 0 - && AppletFormatAdapter.FILE.equals(protocol)) + && sourceType == DataSourceType.FILE) { registerPDBFile(pdb.getId().trim(), pdbFile); } @@ -496,7 +497,7 @@ public class StructureSelectionManager continue; } - if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE)) + if (sourceType == DataSourceType.PASTE) { pdbFile = "INLINE" + pdb.getId(); }