From 2ed4d627d3eb73a49299aad68bf719881ec4538d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 23 Sep 2021 17:26:33 +0100 Subject: [PATCH] JAL-3821 less ambiguous base class name for EMBL and GenBank flat file parsers --- src/jalview/io/{FlatFile.java => EMBLLikeFlatFile.java} | 4 ++-- src/jalview/io/EmblFlatFile.java | 2 +- src/jalview/io/GenBankFile.java | 2 +- test/jalview/io/GenBankFileTest.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/jalview/io/{FlatFile.java => EMBLLikeFlatFile.java} (99%) diff --git a/src/jalview/io/FlatFile.java b/src/jalview/io/EMBLLikeFlatFile.java similarity index 99% rename from src/jalview/io/FlatFile.java rename to src/jalview/io/EMBLLikeFlatFile.java index 9e5c652..64943b2 100644 --- a/src/jalview/io/FlatFile.java +++ b/src/jalview/io/EMBLLikeFlatFile.java @@ -45,7 +45,7 @@ import jalview.util.MappingUtils; * each line is formatted differently in GenBank and EMBL. See * http://www.insdc.org/files/feature_table.html#7.1. */ -public abstract class FlatFile extends AlignFile +public abstract class EMBLLikeFlatFile extends AlignFile { protected static final String LOCATION = "location"; @@ -194,7 +194,7 @@ public abstract class FlatFile extends AlignFile * @param sourceId * @throws IOException */ - public FlatFile(FileParse fp, String sourceId) throws IOException + public EMBLLikeFlatFile(FileParse fp, String sourceId) throws IOException { super(false, fp); // don't parse immediately this.sourceDb = sourceId; diff --git a/src/jalview/io/EmblFlatFile.java b/src/jalview/io/EmblFlatFile.java index 19496ef..7808d1a 100644 --- a/src/jalview/io/EmblFlatFile.java +++ b/src/jalview/io/EmblFlatFile.java @@ -25,7 +25,7 @@ import jalview.util.DBRefUtils; * @see ftp://ftp.ebi.ac.uk/pub/databases/ena/sequence/release/doc/usrman.txt * @see ftp://ftp.ebi.ac.uk/pub/databases/embl/doc/FT_current.html */ -public class EmblFlatFile extends FlatFile +public class EmblFlatFile extends EMBLLikeFlatFile { /** * Constructor given a data source and the id of the source database diff --git a/src/jalview/io/GenBankFile.java b/src/jalview/io/GenBankFile.java index ba7b4b4..f1ca0e3 100644 --- a/src/jalview/io/GenBankFile.java +++ b/src/jalview/io/GenBankFile.java @@ -16,7 +16,7 @@ import java.io.IOException; * @author gmcarstairs * @see https://www.ncbi.nlm.nih.gov/Sitemap/samplerecord.html */ -public class GenBankFile extends FlatFile +public class GenBankFile extends EMBLLikeFlatFile { private static final String DEFINITION = "DEFINITION"; diff --git a/test/jalview/io/GenBankFileTest.java b/test/jalview/io/GenBankFileTest.java index 89f0d0e..97e4754 100644 --- a/test/jalview/io/GenBankFileTest.java +++ b/test/jalview/io/GenBankFileTest.java @@ -42,7 +42,7 @@ public class GenBankFileTest File dataFile = new File("test/jalview/io/J03321.gb"); FileParse fp = new FileParse(dataFile.getAbsolutePath(), DataSourceType.FILE); - FlatFile parser = new GenBankFile(fp, "GenBankTest"); + EMBLLikeFlatFile parser = new GenBankFile(fp, "GenBankTest"); List seqs = parser.getSeqs(); assertEquals(seqs.size(), 1); -- 1.7.10.2