X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fpacked%2FParsePackedSet.java;fp=src%2Fjalview%2Fio%2Fpacked%2FParsePackedSet.java;h=138fef717606bb6e7af189c2390a9f5457212daf;hb=2595e9d4ee0dbbd3406a98c4e49a61ccde806479;hp=71999f0639459e665854c9e77cf887e79935ffae;hpb=e20075ba805d744d7cc4976e2b8d5e5840fb0a8d;p=jalview.git diff --git a/src/jalview/io/packed/ParsePackedSet.java b/src/jalview/io/packed/ParsePackedSet.java index 71999f0..138fef7 100644 --- a/src/jalview/io/packed/ParsePackedSet.java +++ b/src/jalview/io/packed/ParsePackedSet.java @@ -23,6 +23,7 @@ package jalview.io.packed; import jalview.api.FeatureColourI; import jalview.datamodel.AlignmentI; import jalview.io.AppletFormatAdapter; +import jalview.io.FileFormatI; import jalview.io.FileParse; import jalview.io.FormatAdapter; import jalview.io.IdentifyFile; @@ -64,7 +65,7 @@ public class ParsePackedSet FileParse src = dta.getDataSource(); if (dta.getType().equals(DataProvider.JvDataType.ALIGNMENT)) { - String fmt = null; + FileFormatI fmt = null; try { fmt = new IdentifyFile().identify(src, false); @@ -76,32 +77,24 @@ public class ParsePackedSet if (fmt != null) { - if (!FormatAdapter.isValidIOFormat(fmt, false)) + // parse the alignment + AlignmentI al = null; + try { - errmsg = fmt; - exerror = null; + al = new FormatAdapter().readFromFile(src, fmt); + } catch (Exception e) + { + errmsg = "Failed to parse alignment from result set"; + exerror = e; } - else + if (al != null) { - // parse the alignment - AlignmentI al = null; - try - { - al = new FormatAdapter().readFromFile(src, fmt); - } catch (Exception e) - { - errmsg = "Failed to parse alignment from result set"; - exerror = e; - } - if (al != null) - { - // deuniquify and construct/merge additional dataset entries if - // necessary. - context.addAlignment(al); - context.updateSetModified(true); - rslt.add(al); - deuniquify = true; - } + // deuniquify and construct/merge additional dataset entries if + // necessary. + context.addAlignment(al); + context.updateSetModified(true); + rslt.add(al); + deuniquify = true; } } }