Merge branch 'mmw/JAL-4199-web-services-testing' into development/Release_2_12_Branch
[jalview.git] / src / jalview / ws2 / actions / annotation / AnnotationProviderI.java
1 package jalview.ws2.actions.annotation;
2
3 import java.io.IOException;
4 import java.util.List;
5 import java.util.Map;
6
7 import jalview.api.FeatureColourI;
8 import jalview.datamodel.AlignmentAnnotation;
9 import jalview.datamodel.SequenceI;
10 import jalview.datamodel.features.FeatureMatcherSetI;
11 import jalview.ws2.api.WebServiceJobHandle;
12 import jalview.ws2.client.api.AnnotationWebServiceClientI;
13 import jalview.ws2.client.api.WebServiceClientI;
14
15 /**
16  * An interface for providing annotation results to the annotation services. It
17  * declares a method to attach annotations fetched from the server to sequences.
18  * Web service clients wanting to support annotation acitons must implement this
19  * interface in addition to {@link WebServiceClientI}
20  * 
21  * @author mmwarowny
22  *
23  * @see AnnotationWebServiceClientI
24  */
25 public interface AnnotationProviderI
26 {
27   /**
28    * Retrieves annotations from the job result on the server and attaches them
29    * to provided sequences. Additionally, adds feature colours and filters to
30    * provided containers.
31    * 
32    * @param job
33    *          web service job
34    * @param sequences
35    *          features and alignment annotation added to these will be
36    *          imported to the dataset for the alignment
37    * @param colours
38    *          container for feature colours
39    * @param filters
40    *          container for feature filters
41    * @return sequence and alignment annotation rows that should be made
42    *         visible/updated on alignment
43    * @throws IOException
44    *           annotation retrieval failed
45    */
46   public List<AlignmentAnnotation> attachAnnotations(WebServiceJobHandle job,
47       List<SequenceI> sequences, Map<String, FeatureColourI> colours,
48       Map<String, FeatureMatcherSetI> filters) throws IOException;
49 }