X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFeaturesFile.java;h=d2282b1f05c37f77dc3cc42af7a34fd26f483030;hb=be762d8d9c71a7aa3121e845c45911c7192b7827;hp=e1fccaffd86c6028cd7ebf36d2c4c043e306803b;hpb=d1bb7a31fc091606aedbc255a5766ac79e36fa91;p=jalview.git diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index e1fccaf..d2282b1 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -45,7 +45,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -77,19 +76,6 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI protected static final String GFF_VERSION = "##gff-version"; - private static final Comparator SORT_NULL_LAST = new Comparator() - { - @Override - public int compare(String o1, String o2) - { - if (o1 == null) - { - return o2 == null ? 0 : 1; - } - return (o2 == null ? -1 : o1.compareTo(o2)); - } - }; - private AlignmentI lastmatchedAl = null; private SequenceIdMatcher matcher = null; @@ -108,14 +94,14 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI /** * Constructor which does not parse the file immediately * - * @param inFile + * @param file * @param paste * @throws IOException */ - public FeaturesFile(String inFile, DataSourceType paste) + public FeaturesFile(String file, DataSourceType paste) throws IOException { - super(false, inFile, paste); + super(false, file, paste); } /** @@ -131,15 +117,14 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * Constructor that optionally parses the file immediately * * @param parseImmediately - * @param inFile + * @param file * @param type * @throws IOException */ - public FeaturesFile(boolean parseImmediately, String inFile, - DataSourceType type) - throws IOException + public FeaturesFile(boolean parseImmediately, String file, + DataSourceType type) throws IOException { - super(parseImmediately, inFile, type); + super(parseImmediately, file, type); } /** @@ -319,7 +304,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI */ protected boolean parseJalviewFeature(String line, String[] gffColumns, AlignmentI alignment, Map featureColours, - boolean removeHTML, boolean relaxedIdMatching, String featureGroup) + boolean removeHTML, boolean relaxedIdMatching, + String featureGroup) { /* * tokens: description seqid seqIndex start end type [score] @@ -876,8 +862,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI fromCount = Integer.parseInt(tokens[2]); } catch (NumberFormatException nfe) { - throw new IOException("Invalid number in Align field: " - + nfe.getMessage()); + throw new IOException( + "Invalid number in Align field: " + nfe.getMessage()); } /* @@ -1098,9 +1084,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * @param newseqs * @throws IOException */ - protected void processGffPragma(String line, - Map gffProps, AlignmentI align, - List newseqs) throws IOException + protected void processGffPragma(String line, Map gffProps, + AlignmentI align, List newseqs) throws IOException { line = line.trim(); if ("###".equals(line))