import jalview.datamodel.SequenceI;
import jalview.ext.jmol.JmolParser;
import jalview.structure.StructureImportSettings;
+import jalview.util.Platform;
import java.io.File;
import java.io.IOException;
{
this.selectedFile = selectedFile;
- if (selectedFile != null)
- this.inFile = selectedFile.getPath();
- this.inFile = file;
+ // BH 2019.10.06 PDB.getSequenceRecords calling this and then needs string,
+ // below
+ inFile = (selectedFile == null ? file : selectedFile.getPath());
try
{
if (fileFormat.isStructureFile())
}
else
{
- // todo is MCview parsing obsolete yet? JAL-2120
+ // BH: This block is executed by PDBSequenceFetcherTest
+
+ // todo is mc_view parsing obsolete yet? JAL-2120
StructureImportSettings.setShowSeqFeatures(true);
- alignFile = new MCview.PDBfile(annotFromStructure,
+ alignFile = new mc_view.PDBfile(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct, inFile,
sourceType);
}
else
{
StructureImportSettings.setShowSeqFeatures(true);
- alignFile = new MCview.PDBfile(annotFromStructure,
+ alignFile = new mc_view.PDBfile(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct, source);
}
((StructureFile) alignFile).setDbRefType(Type.PDB);
public static DataSourceType checkProtocol(Object dataObject)
{
if(dataObject instanceof File)
+ {
return DataSourceType.FILE;
+ }
String data = dataObject.toString();
DataSourceType protocol = DataSourceType.PASTE;
{
protocol = DataSourceType.URL;
}
- else if (jalview.bin.Jalview.isJS)
+ else if (Platform.isJS())
{
protocol = DataSourceType.RELATIVE_URL;
}
return protocol;
}
+ /**
+ * @param args
+ * @j2sIgnore
+ */
public static void main(String[] args)
{
int i = 0;