From 2b6a2fdd887521f16ec777aab3126d6209f2a0a6 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 29 Nov 2016 10:57:10 +0000 Subject: [PATCH] JAL-2344 corrected conversion of Type enum to FileFormat --- src/jalview/ws/dbsources/Pdb.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index 0aae38f..68dda88 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -40,7 +40,6 @@ import jalview.ws.ebi.EBIFetchClient; import java.util.ArrayList; import java.util.List; -import java.util.Vector; import com.stevesoft.pat.Regex; @@ -155,9 +154,10 @@ public class Pdb extends EbiFileRetrievedProxy } try { - // convert Type.PDB/MMCIF to FileFormat.PDB/MMCIF - // todo get rid of Type? - FileFormatI fileFormat = FileFormat.valueOf(pdbFileFormat.toString()); + // todo get rid of Type and use FileFormatI instead? + // todo get rid of "ext" and just use "tmp"? + FileFormatI fileFormat = pdbFileFormat == Type.PDB ? FileFormat.PDB + : FileFormat.MMCif; pdbAlignment = new FormatAdapter().readFile(file, DataSourceType.FILE, fileFormat); if (pdbAlignment != null) -- 1.7.10.2