JAL-972 - test to distinguish sources based on age - used to select one of duplicate...
[jalview.git] / src / jalview / ws / dbsources / das / api / jalviewSourceI.java
1 package jalview.ws.dbsources.das.api;
2
3 import java.util.List;
4
5 import jalview.ws.seqfetcher.DbSourceProxy;
6
7 import org.biodas.jdas.schema.sources.MAINTAINER;
8 import org.biodas.jdas.schema.sources.VERSION;
9
10 public interface jalviewSourceI
11 {
12
13   String getTitle();
14
15   VERSION getVersion();
16
17   String getDocHref();
18
19   String getDescription();
20
21   String getUri();
22
23   MAINTAINER getMAINTAINER();
24
25   String getEmail();
26
27   boolean isLocal();
28
29   boolean isSequenceSource();
30
31   String[] getCapabilityList(VERSION v);
32
33   String[] getLabelsFor(VERSION v);
34
35   /**
36    * 
37    * @return null if not a sequence source, otherwise a series of database sources that can be used to retrieve sequence data for particular database coordinate systems
38    */
39   List<DbSourceProxy> getSequenceSourceProxies();
40
41   boolean isFeatureSource();
42
43   /**
44    * returns the base URL for the latest version of a source's DAS endpoint set
45    * @return
46    */
47   String getSourceURL();
48
49   /**
50    * test to see if this source's latest version is older than the given source 
51    * @param jalviewSourceI
52    * @return true if newer than given source
53    */
54   boolean isNewerThan(jalviewSourceI jalviewSourceI);
55
56 }