964d85fc5c11455ae216b808349d41f454369548
[jalview.git] / src / jalview / io / packed / DataProvider.java
1 package jalview.io.packed;
2
3 /**
4  * API for a data provider that can be used with jalview.io.packed.ParsePackedSet
5  * @author JimP
6  *
7  */
8 public interface DataProvider
9 {
10   /**
11    * class of data expected to be provided by datasource
12    * @author JimP
13    *
14    */
15   public enum JvDataType
16   {
17     /**
18      * any alignment flatfile recognisable by jalview.io.IdentifyFile
19      */
20     ALIGNMENT,
21     /**
22      * a jalview annotation file
23      */
24     ANNOTATION, 
25     /**
26      * a GFF or Jalview features file 
27      */
28     FEATURES,
29     /**
30      * a tree representation understood by the NewickFile parser
31      */
32     TREE,
33     /**
34      * any file that provides data that should be associated with a specified sequence.
35      */
36     SEQASSOCATED;
37   }
38
39   /**
40    * data to be parsed according to its type. Each call to getDataSource
41    * should return a new instance of the same data stream initialised to the
42    * beginning of the chunk of data that is to be parsed.
43    * 
44    * @return
45    */
46   jalview.io.FileParse getDataSource();
47
48   /**
49    * association context for data. Either null or a specific sequence.
50    * 
51    * @return
52    */
53   Object getSequenceTarget();
54
55   /**
56    * type of data
57    * 
58    * @return
59    */
60   DataProvider.JvDataType getType();
61 }