X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws1%2FSeqSearchWSThread.java;h=edc9ae89b4f588eaf879d241351336d14f28244d;hb=136c0793b90b72b928c4d77dc109dd5c644e00d3;hp=a28494cb7a26ce92f667c5d4ca02e4a0389a6dd0;hpb=572510ba0fea6a8f4e4dd3e81bfee506d7febed6;p=jalview.git diff --git a/src/jalview/ws/jws1/SeqSearchWSThread.java b/src/jalview/ws/jws1/SeqSearchWSThread.java index a28494c..edc9ae8 100644 --- a/src/jalview/ws/jws1/SeqSearchWSThread.java +++ b/src/jalview/ws/jws1/SeqSearchWSThread.java @@ -21,8 +21,10 @@ package jalview.ws.jws1; import jalview.analysis.AlignSeq; +import jalview.api.FeatureColourI; import jalview.bin.Cache; import jalview.datamodel.Alignment; +import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; @@ -152,6 +154,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI * * @return true if getAlignment will return a valid alignment result. */ + @Override public boolean hasResults() { if (subjobComplete @@ -170,7 +173,8 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI * * @return null or { Alignment(+features and annotation), NewickFile)} */ - public Object[] getAlignment(Alignment dataset, Map featureColours) + public Object[] getAlignment(AlignmentI dataset, + Map featureColours) { if (result != null && result.isFinished()) @@ -205,7 +209,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI if (inFile != null && inFile.length() > 0) { new jalview.io.AnnotationFile().readAnnotationFile(al, inFile, - jalview.io.AppletFormatAdapter.PASTE); + jalview.io.DataSourceType.PASTE); } } catch (Exception e) { @@ -221,7 +225,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI if (inFile != null && inFile.length() > 0) { jalview.io.FeaturesFile ff = new jalview.io.FeaturesFile( - inFile, jalview.io.AppletFormatAdapter.PASTE); + inFile, jalview.io.DataSourceType.PASTE); ff.parse(al, featureColours, false); } } catch (Exception e) @@ -238,7 +242,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI if (inFile != null && inFile.length() > 0) { nf = new jalview.io.NewickFile(inFile, - jalview.io.AppletFormatAdapter.PASTE); + jalview.io.DataSourceType.PASTE); if (!nf.isValid()) { nf.close(); @@ -287,6 +291,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI * * @return boolean true if job can be submitted. */ + @Override public boolean hasValidInput() { if (seqs.getSeqs() != null) @@ -299,7 +304,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI String alTitle; // name which will be used to form new alignment window. - Alignment dataset; // dataset to which the new alignment will be + AlignmentI dataset; // dataset to which the new alignment will be // associated. @@ -341,7 +346,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI SeqSearchWSThread(ext.vamsas.SeqSearchI server, String wsUrl, WebserviceInfo wsinfo, jalview.gui.AlignFrame alFrame, String wsname, String title, AlignmentView _msa, String db, - Alignment seqset) + AlignmentI seqset) { this(server, wsUrl, wsinfo, alFrame, _msa, wsname, db); OutputHeader = wsInfo.getProgressText(); @@ -373,11 +378,13 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } } + @Override public boolean isCancellable() { return true; } + @Override public void cancelJob() { if (!jobComplete && jobs != null) @@ -444,12 +451,14 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } } + @Override public void pollJob(AWsJob job) throws Exception { ((SeqSearchWSJob) job).result = server.getResult(((SeqSearchWSJob) job) .getJobId()); } + @Override public void StartJob(AWsJob job) { if (!(job instanceof SeqSearchWSJob)) @@ -536,6 +545,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI return msa; } + @Override public void parseResult() { int results = 0; // number of result sets received @@ -579,6 +589,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI wsInfo.showResultsNewFrame .addActionListener(new java.awt.event.ActionListener() { + @Override public void actionPerformed(java.awt.event.ActionEvent evt) { displayResults(true); @@ -587,6 +598,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI wsInfo.mergeResults .addActionListener(new java.awt.event.ActionListener() { + @Override public void actionPerformed(java.awt.event.ActionEvent evt) { displayResults(false); @@ -612,7 +624,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI // NewickFile nf[] = new NewickFile[jobs.length]; for (int j = 0; j < jobs.length; j++) { - Map featureColours = new HashMap(); + Map featureColours = new HashMap(); Alignment al = null; NewickFile nf = null; if (jobs[j].hasResults()) @@ -654,7 +666,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); if (nf != null) { - af.ShowNewickTree(nf, MessageManager.formatMessage( + af.showNewickTree(nf, MessageManager.formatMessage( "label.tree_from", new String[] { this.alTitle })); } // initialise with same renderer settings as in parent alignframe. @@ -664,6 +676,7 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } } + @Override public boolean canMergeResults() { return false;