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
5 * This file is part of Jalview.
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.
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.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.ws.dbsources;
20 import com.stevesoft.pat.Regex;
22 import jalview.datamodel.AlignmentI;
23 import jalview.datamodel.DBRefSource;
24 import jalview.ws.seqfetcher.DbSourceProxy;
30 public class EmblSource extends EmblXmlSource implements DbSourceProxy
35 addDbSourceProperty(DBRefSource.DNASEQDB);
36 addDbSourceProperty(DBRefSource.CODINGSEQDB);
42 * @see jalview.ws.DbSourceProxy#getAccessionSeparator()
44 public String getAccessionSeparator()
46 // TODO Auto-generated method stub
53 * @see jalview.ws.DbSourceProxy#getAccessionValidator()
55 public Regex getAccessionValidator()
57 return new com.stevesoft.pat.Regex("^[A-Z]+[0-9]+");
63 * @see jalview.ws.DbSourceProxy#getDbSource()
65 public String getDbSource()
67 return DBRefSource.EMBL;
73 * @see jalview.ws.DbSourceProxy#getDbVersion()
75 public String getDbVersion()
77 // TODO Auto-generated method stub
84 * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[])
86 public AlignmentI getSequenceRecords(String queries) throws Exception
88 return getEmblSequenceRecords(DBRefSource.EMBL, queries);
94 * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String)
96 public boolean isValidReference(String accession)
98 // most embl refs look like ..
100 return (accession == null || accession.length() < 2) ? false
101 : getAccessionValidator().search(accession);
106 * return LHD_CHICK coding gene
108 public String getTestQuery()
113 public String getDbName()
115 return "EMBL"; // getDbSource();