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;
* (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);
}
* (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
.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);
}
continue;
}
- if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE))
+ if (sourceType == DataSourceType.PASTE)
{
pdbFile = "INLINE" + pdb.getId();
}