JAL-1517 fix copyright for 2.8.2
[jalview.git] / src / jalview / ws / dbsources / GeneDbSource.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3  * Copyright (C) 2014 The Jalview Authors
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
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.ws.dbsources;
22
23
24 import com.stevesoft.pat.Regex;
25
26 import jalview.datamodel.AlignmentI;
27 import jalview.datamodel.DBRefSource;
28 import jalview.ws.seqfetcher.DbSourceProxy;
29
30 /**
31  * Test class for accessing GeneDB - not yet finished.
32  * 
33  * @author JimP
34  * 
35  */
36 public class GeneDbSource extends EmblXmlSource implements DbSourceProxy
37 {
38
39   public GeneDbSource()
40   {
41     addDbSourceProperty(DBRefSource.DNASEQDB);
42     addDbSourceProperty(DBRefSource.CODINGSEQDB);
43   }
44
45   /*
46    * (non-Javadoc)
47    * 
48    * @see jalview.ws.DbSourceProxy#getAccessionSeparator()
49    */
50   public String getAccessionSeparator()
51   {
52     // TODO Auto-generated method stub
53     return null;
54   }
55
56   /*
57    * (non-Javadoc)
58    * 
59    * @see jalview.ws.DbSourceProxy#getAccessionValidator()
60    */
61   public Regex getAccessionValidator()
62   {
63     // TODO Auto-generated method stub
64     return null;
65   }
66
67   /*
68    * (non-Javadoc)
69    * 
70    * @see jalview.ws.DbSourceProxy#getDbSource()
71    */
72   public String getDbSource()
73   {
74     return DBRefSource.GENEDB;
75   }
76
77   /*
78    * (non-Javadoc)
79    * 
80    * @see jalview.ws.DbSourceProxy#getDbVersion()
81    */
82   public String getDbVersion()
83   {
84     // TODO Auto-generated method stub
85     return "0";
86   }
87
88   /*
89    * (non-Javadoc)
90    * 
91    * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[])
92    */
93   public AlignmentI getSequenceRecords(String queries) throws Exception
94   {
95     // query of form
96     // http://www.genedb.org/genedb/ArtemisFormHandler?id=&dest=EMBL
97     //
98     return getEmblSequenceRecords(DBRefSource.GENEDB, queries);
99   }
100
101   /*
102    * (non-Javadoc)
103    * 
104    * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String)
105    */
106   public boolean isValidReference(String accession)
107   {
108     // TODO Auto-generated method stub
109     return false;
110   }
111
112   /**
113    * return T.Brucei Mannosyl-Transferase TbPIG-M
114    */
115   public String getTestQuery()
116   {
117     return "Tb927.6.3300";
118   }
119
120   public String getDbName()
121   {
122     return "GeneDB"; // getDbSource();
123   }
124   @Override
125   public int getTier()
126   {
127     return 0;
128   }
129 }