From: gmungoc Date: Tue, 29 Nov 2016 10:57:10 +0000 (+0000) Subject: JAL-2344 corrected conversion of Type enum to FileFormat X-Git-Tag: Release_2_10_3b1~397 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2b6a2fdd887521f16ec777aab3126d6209f2a0a6;p=jalview.git JAL-2344 corrected conversion of Type enum to FileFormat --- 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)