308bc21a49b26cc874dab6c86cdc2f3c416317c5
[jalview.git] / src / jalview / ws / dbsources / das / api / jalviewSourceI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3  * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 package jalview.ws.dbsources.das.api;
19
20 import java.util.List;
21
22 import jalview.ws.seqfetcher.DbSourceProxy;
23
24 import org.biodas.jdas.schema.sources.MAINTAINER;
25 import org.biodas.jdas.schema.sources.VERSION;
26
27 public interface jalviewSourceI
28 {
29
30   String getTitle();
31
32   VERSION getVersion();
33
34   String getDocHref();
35
36   String getDescription();
37
38   String getUri();
39
40   MAINTAINER getMAINTAINER();
41
42   String getEmail();
43
44   boolean isLocal();
45
46   boolean isSequenceSource();
47
48   String[] getCapabilityList(VERSION v);
49
50   String[] getLabelsFor(VERSION v);
51
52   /**
53    * 
54    * @return null if not a sequence source, otherwise a series of database
55    *         sources that can be used to retrieve sequence data for particular
56    *         database coordinate systems
57    */
58   List<DbSourceProxy> getSequenceSourceProxies();
59
60   boolean isFeatureSource();
61
62   /**
63    * returns the base URL for the latest version of a source's DAS endpoint set
64    * 
65    * @return
66    */
67   String getSourceURL();
68
69   /**
70    * test to see if this source's latest version is older than the given source
71    * 
72    * @param jalviewSourceI
73    * @return true if newer than given source
74    */
75   boolean isNewerThan(jalviewSourceI jalviewSourceI);
76
77   /**
78    * test if the source is a reference source for the authority
79    * @return
80    */
81   boolean isReferenceSource();
82
83 }