From b4ff9affaf85176402f148c100e24b8546052173 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 8 Feb 2017 15:01:21 +0000 Subject: [PATCH] =?utf8?q?JAL-2136=20update=20merged=20code=20for=20JAL-2040?= =?utf8?q?=20for=20new=20FileFormat/Protocol=20interface=20(JAL-2344)=E2=80=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/io/AnnotationFile.java | 5 +++-- test/jalview/io/ImportHomologyModelTest.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 2491464..d40ee1b 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -1262,7 +1262,8 @@ public class AnnotationFile private boolean add_structmodel(AlignmentI al, SequenceI refSeq2, String tempId, String urlToModel, String urlToPairwise) { - String warningMessage = null, modelPath = null, modelProt = null, aliPath = null, aliProt = null; + String warningMessage = null, modelPath = null, aliPath = null; + DataSourceType modelProt = null, aliProt = null; boolean added = false; try { // locate tempId. if it exists, will need to merge, otherwise: @@ -1278,7 +1279,7 @@ public class AnnotationFile aliProt = AppletFormatAdapter.checkProtocol(aliPath); // 2. load urlToPairwise AlignmentI pwa = new AppletFormatAdapter().readFile(aliPath, aliProt, - "FASTA"); + FileFormat.Fasta); SequenceI qPw = null, tPw = null; if (pwa != null) { diff --git a/test/jalview/io/ImportHomologyModelTest.java b/test/jalview/io/ImportHomologyModelTest.java index 292a34d..8827c9c 100644 --- a/test/jalview/io/ImportHomologyModelTest.java +++ b/test/jalview/io/ImportHomologyModelTest.java @@ -62,10 +62,11 @@ public class ImportHomologyModelTest Boolean.TRUE.toString()); FileLoader loader = new FileLoader(false); af = loader.LoadFileWaitTillLoaded(profile_msa, - FormatAdapter.FILE); + jalview.io.DataSourceType.FILE); Desktop.addInternalFrame(af, "homology models", 800, 500); al = af.getViewport().getAlignment(); - af.loadJalviewDataFile(profile_annot, FormatAdapter.FILE, null, null); + af.loadJalviewDataFile(profile_annot, jalview.io.DataSourceType.FILE, + null, null); // if file was loaded, the view should have a reference sequence set Assert.assertTrue(al.hasSeqrep()); } -- 1.7.10.2