Merge branch 'alpha/JAL-3066_Jalview_212_slivka-integration' into alpha/JAL-3362_Jalv...
[jalview.git] / src / jalview / ws / api / SequenceAnnotationServiceI.java
diff --git a/src/jalview/ws/api/SequenceAnnotationServiceI.java b/src/jalview/ws/api/SequenceAnnotationServiceI.java
new file mode 100644 (file)
index 0000000..9ca2d31
--- /dev/null
@@ -0,0 +1,51 @@
+package jalview.ws.api;
+
+import jalview.api.FeatureColourI;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceI;
+import jalview.datamodel.features.FeatureMatcherSetI;
+import jalview.ws.params.ArgumentI;
+import jalview.ws.params.WsParamSetI;
+
+import java.util.List;
+import java.util.Map;
+
+public interface SequenceAnnotationServiceI extends JalviewWebServiceI
+{
+
+
+  /**
+   * submit sequences to service with no parameters, or preset or parameter set.
+   * Nb- almost the same as the 'align' method in the Msa service :)
+   * 
+   * @param seqs
+   * @param preset
+   * @param paramset
+   * @return
+   * @throws Throwable
+   */
+  JobId submitToService(List<SequenceI> seqs, WsParamSetI preset,
+          List<ArgumentI> paramset) throws Throwable;
+
+  /**
+   * materialise annotation and features for sequences input to the service
+   * 
+   * @param job
+   * @param seqs
+   *          - features and alignment annotation added to these will be
+   *          imported to the dataset for the alignment
+   * @param featureColours
+   *          - container for feature colours - any defined will be merged with
+   *          viewport
+   * @param featureFilters
+   *          - container for filters - any defined will be merged with viewport
+   * @return sequence and alignment annotation rows that should be made
+   *         visible/updated on alignment
+   * @throws Throwable
+   */
+  List<AlignmentAnnotation> getAnnotationResult(JobId job,
+          List<SequenceI> seqs, Map<String, FeatureColourI> featureColours,
+          Map<String, FeatureMatcherSetI> featureFilters) throws Throwable;
+  
+
+}