From 6749a5b122dd78b4abbf0940dbe854dc0298ae65 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 10 Oct 2019 15:32:53 +0100 Subject: [PATCH] JAL-3070 set calcId and autocalculated flags for annotation returned by the service --- .../ws/jws2/SeqAnnotationServiceCalcWorker.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java b/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java index 661bdf7..81dfa30 100644 --- a/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java +++ b/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java @@ -424,6 +424,24 @@ public class SeqAnnotationServiceCalcWorker extends AlignCalcWorker // sequence, excluding regions not annotated due to gapMap/column // visibility + // update calcId if it is not already set on returned annotation + if (returnedAnnot != null) + { + for (AlignmentAnnotation aa : returnedAnnot) + { + // assume that any CalcIds already set + if (getCalcId() != null && aa.getCalcId() == null + || "".equals(aa.getCalcId())) + { + aa.setCalcId(getCalcId()); + } + // autocalculated annotation are created by interactive alignment + // analysis services + aa.autoCalculated = service.isAlignmentAnalysis() + && service.isInteractiveUpdate(); + } + } + running.setAnnotation(returnedAnnot); if (running.hasResults()) -- 1.7.10.2