X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEmblSource.java;h=e5f0c6282b230f9878ab11e64c15d423824e20c3;hb=47168f025aefdaa044802bd5f8f510ffe43a4808;hp=007ae52c83ee05b9edf414fd5c939dac0b1cd31a;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git
diff --git a/src/jalview/ws/dbsources/EmblSource.java b/src/jalview/ws/dbsources/EmblSource.java
index 007ae52..e5f0c62 100644
--- a/src/jalview/ws/dbsources/EmblSource.java
+++ b/src/jalview/ws/dbsources/EmblSource.java
@@ -1,127 +1,126 @@
-/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
- *
- * 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.
- *
- * 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 .
- */
-package jalview.ws.dbsources;
-
-import java.io.File;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-
-import com.stevesoft.pat.Regex;
-
-import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentI;
-import jalview.datamodel.DBRefSource;
-import jalview.datamodel.SequenceI;
-import jalview.datamodel.xdb.embl.EmblEntry;
-import jalview.ws.ebi.EBIFetchClient;
-import jalview.ws.seqfetcher.DbSourceProxy;
-import jalview.ws.seqfetcher.DbSourceProxyImpl;
-
-/**
- * @author JimP
- *
- */
-public class EmblSource extends EmblXmlSource implements DbSourceProxy
-{
-
- 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]+");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see jalview.ws.DbSourceProxy#getDbSource()
- */
- public String getDbSource()
- {
- return DBRefSource.EMBL;
- }
-
- /*
- * (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[])
- */
- 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
- */
- public String getTestQuery()
- {
- return "X53828";
- }
-
- public String getDbName()
- {
- return "EMBL"; // getDbSource();
- }
-}
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 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.
+ *
+ * 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 .
+ * 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 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]+");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see jalview.ws.DbSourceProxy#getDbSource()
+ */
+ public String getDbSource()
+ {
+ return DBRefSource.EMBL;
+ }
+
+ /*
+ * (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[])
+ */
+ 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
+ */
+ public String getTestQuery()
+ {
+ return "X53828";
+ }
+
+ public String getDbName()
+ {
+ return "EMBL"; // getDbSource();
+ }
+
+ @Override
+ public int getTier()
+ {
+ return 0;
+ }
+}