JAL-1432 updated copyright notices
[jalview.git] / src / jalview / ws / dbsources / GeneDbSource.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 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  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.ws.dbsources;
20
21
22 import com.stevesoft.pat.Regex;
23
24 import jalview.datamodel.AlignmentI;
25 import jalview.datamodel.DBRefSource;
26 import jalview.ws.seqfetcher.DbSourceProxy;
27
28 /**
29  * Test class for accessing GeneDB - not yet finished.
30  * 
31  * @author JimP
32  * 
33  */
34 public class GeneDbSource extends EmblXmlSource implements DbSourceProxy
35 {
36
37   public GeneDbSource()
38   {
39     addDbSourceProperty(DBRefSource.DNASEQDB);
40     addDbSourceProperty(DBRefSource.CODINGSEQDB);
41   }
42
43   /*
44    * (non-Javadoc)
45    * 
46    * @see jalview.ws.DbSourceProxy#getAccessionSeparator()
47    */
48   public String getAccessionSeparator()
49   {
50     // TODO Auto-generated method stub
51     return null;
52   }
53
54   /*
55    * (non-Javadoc)
56    * 
57    * @see jalview.ws.DbSourceProxy#getAccessionValidator()
58    */
59   public Regex getAccessionValidator()
60   {
61     // TODO Auto-generated method stub
62     return null;
63   }
64
65   /*
66    * (non-Javadoc)
67    * 
68    * @see jalview.ws.DbSourceProxy#getDbSource()
69    */
70   public String getDbSource()
71   {
72     return DBRefSource.GENEDB;
73   }
74
75   /*
76    * (non-Javadoc)
77    * 
78    * @see jalview.ws.DbSourceProxy#getDbVersion()
79    */
80   public String getDbVersion()
81   {
82     // TODO Auto-generated method stub
83     return "0";
84   }
85
86   /*
87    * (non-Javadoc)
88    * 
89    * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[])
90    */
91   public AlignmentI getSequenceRecords(String queries) throws Exception
92   {
93     // query of form
94     // http://www.genedb.org/genedb/ArtemisFormHandler?id=&dest=EMBL
95     //
96     return getEmblSequenceRecords(DBRefSource.GENEDB, queries);
97   }
98
99   /*
100    * (non-Javadoc)
101    * 
102    * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String)
103    */
104   public boolean isValidReference(String accession)
105   {
106     // TODO Auto-generated method stub
107     return false;
108   }
109
110   /**
111    * return T.Brucei Mannosyl-Transferase TbPIG-M
112    */
113   public String getTestQuery()
114   {
115     return "Tb927.6.3300";
116   }
117
118   public String getDbName()
119   {
120     return "GeneDB"; // getDbSource();
121   }
122   @Override
123   public int getTier()
124   {
125     return 0;
126   }
127 }