X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws1%2FSeqSearchWSThread.java;h=2f2bf2ca9db53f64f90758663dddbe55373e29b3;hb=31ee6e439fa0e6432e812089e092df0cee1eb223;hp=b14917e0f8737f06b28513e3c8dd65485ae9c1dd;hpb=8b27085fa7fc5f2877e078421284c2636b85b8c6;p=jalview.git diff --git a/src/jalview/ws/jws1/SeqSearchWSThread.java b/src/jalview/ws/jws1/SeqSearchWSThread.java index b14917e..2f2bf2c 100644 --- a/src/jalview/ws/jws1/SeqSearchWSThread.java +++ b/src/jalview/ws/jws1/SeqSearchWSThread.java @@ -37,7 +37,6 @@ import jalview.ws.JobStateSummary; import jalview.ws.WSClientI; import java.util.HashMap; -import java.util.Hashtable; import java.util.Map; import java.util.Vector; @@ -77,8 +76,6 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } - Hashtable SeqNames = new Hashtable(); - Vector emptySeqs = new Vector(); /** @@ -95,9 +92,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI int nseqs = 0; if (minlen < 0) { - throw new Error( - MessageManager - .getString("error.implementation_error_minlen_must_be_greater_zero")); + throw new Error(MessageManager.getString( + "error.implementation_error_minlen_must_be_greater_zero")); } for (int i = 0; i < seqs.length; i++) { @@ -108,7 +104,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } boolean valid = nseqs >= 1; // need at least one sequence for valid input // TODO: generalise - vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs] + vamsas.objects.simple.Sequence[] seqarray = (valid) + ? new vamsas.objects.simple.Sequence[nseqs] : null; boolean submitGaps = (nseqs == 1) ? false : true; // profile is submitted // with gaps @@ -134,8 +131,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI String empty = null; if (seqs[i].getEnd() >= seqs[i].getStart()) { - empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq - .extractGaps(jalview.util.Comparison.GapChars, + empty = (submitGaps) ? seqs[i].getSequenceAsString() + : AlignSeq.extractGaps(jalview.util.Comparison.GapChars, seqs[i].getSequenceAsString()); } emptySeqs.add(new String[] { newname, empty }); @@ -157,11 +154,10 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI @Override public boolean hasResults() { - if (subjobComplete - && result != null - && result.isFinished() + if (subjobComplete && result != null && result.isFinished() && ((SeqSearchResult) result).getAlignment() != null - && ((SeqSearchResult) result).getAlignment().getSeqs() != null) + && ((SeqSearchResult) result).getAlignment() + .getSeqs() != null) { return true; } @@ -184,8 +180,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI // int alseq_l = 0; if (((SeqSearchResult) result).getAlignment() != null) { - alseqs = getVamsasAlignment(((SeqSearchResult) result) - .getAlignment()); + alseqs = getVamsasAlignment( + ((SeqSearchResult) result).getAlignment()); // alseq_gapchar = ( (SeqSearchResult) // result).getAlignment().getGapchar().charAt(0); // alseq_l = alseqs.length; @@ -213,8 +209,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } } catch (Exception e) { - System.err - .println("Failed to parse the annotation file associated with the alignment."); + System.err.println( + "Failed to parse the annotation file associated with the alignment."); System.err.println(">>>EOF" + inFile + "\n<< 0) { - jalview.io.FeaturesFile ff = new jalview.io.FeaturesFile( - inFile, jalview.io.DataSourceType.PASTE); + jalview.io.FeaturesFile ff = new jalview.io.FeaturesFile(inFile, + jalview.io.DataSourceType.PASTE); ff.parse(al, featureColours, false); } } catch (Exception e) { - System.err - .println("Failed to parse the Features file associated with the alignment."); + System.err.println( + "Failed to parse the Features file associated with the alignment."); System.err.println(">>>EOF" + inFile + "\n<<>>EOF" + inFile + "\n<<