X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEmblSource.java;h=4cff4a06b9a23d9050aa5cc76e5871eac6a5cfd5;hb=0a37e3b824b46b026916e124b42400590242d145;hp=44427a5bacc16b66014731033e706b3e7bdbd1c3;hpb=865a855a4ca87eadb3e5ff284ed32ed307d9c34b;p=jalview.git diff --git a/src/jalview/ws/dbsources/EmblSource.java b/src/jalview/ws/dbsources/EmblSource.java index 44427a5..4cff4a0 100644 --- a/src/jalview/ws/dbsources/EmblSource.java +++ b/src/jalview/ws/dbsources/EmblSource.java @@ -1,61 +1,38 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.ws.dbsources; -import com.stevesoft.pat.Regex; - import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefSource; -import jalview.ws.seqfetcher.DbSourceProxy; /** * @author JimP * */ -public class EmblSource extends EmblXmlSource implements DbSourceProxy +public class EmblSource extends /* EmblXmlSource */ EmblFlatfileSource { public EmblSource() { - addDbSourceProperty(DBRefSource.DNASEQDB); - addDbSourceProperty(DBRefSource.CODINGSEQDB); - } - - /* - * (non-Javadoc) - * - * @see jalview.ws.DbSourceProxy#getAccessionSeparator() - */ - public String getAccessionSeparator() - { - // TODO Auto-generated method stub - return null; - } - - /* - * (non-Javadoc) - * - * @see jalview.ws.DbSourceProxy#getAccessionValidator() - */ - public Regex getAccessionValidator() - { - return new com.stevesoft.pat.Regex("^[A-Z]+[0-9]+"); + super(); } /* @@ -63,6 +40,7 @@ public class EmblSource extends EmblXmlSource implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getDbSource() */ + @Override public String getDbSource() { return DBRefSource.EMBL; @@ -71,54 +49,26 @@ public class EmblSource extends EmblXmlSource implements DbSourceProxy /* * (non-Javadoc) * - * @see jalview.ws.DbSourceProxy#getDbVersion() - */ - public String getDbVersion() - { - // TODO Auto-generated method stub - return "0"; - } - - /* - * (non-Javadoc) - * * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[]) */ + @Override public AlignmentI getSequenceRecords(String queries) throws Exception { return getEmblSequenceRecords(DBRefSource.EMBL, queries); } - /* - * (non-Javadoc) - * - * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String) - */ - public boolean isValidReference(String accession) - { - // most embl refs look like .. - - return (accession == null || accession.length() < 2) ? false - : getAccessionValidator().search(accession); - - } - /** * return LHD_CHICK coding gene */ + @Override public String getTestQuery() { return "X53828"; } + @Override public String getDbName() { return "EMBL"; // getDbSource(); } - - @Override - public int getTier() - { - return 0; - } }