JAL-4199 Set all setup methods to alwaysRun
[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    *          sequences the annotations will be added to
36    * @param colours
37    *          container for feature colours
38    * @param filters
39    *          container for feature filters
40    * @return sequence and alignment annotation rows that should be made
41    *         visible/updated on alignment
42    * @throws IOException
43    *           annotation retrieval failed
44    */
45   public List<AlignmentAnnotation> attachAnnotations(WebServiceJobHandle job,
46       List<SequenceI> sequences, Map<String, FeatureColourI> colours,
47       Map<String, FeatureMatcherSetI> filters) throws IOException;
48 }