formatting
[jalview.git] / src / jalview / ws / seqfetcher / DbSourceProxy.java
index 895c03e..9fa904a 100644 (file)
@@ -1,20 +1,19 @@
 /*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
- * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle\r
  * \r
- * This program is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License\r
- * as published by the Free Software Foundation; either version 2\r
- * of the License, or (at your option) any later version.\r
+ * This file is part of Jalview.\r
  * \r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
+ * Jalview is free software: you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License \r
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r
  * \r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+ * Jalview is distributed in the hope that it will be useful, but \r
+ * WITHOUT ANY WARRANTY; without even the implied warranty \r
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR \r
+ * PURPOSE.  See the GNU General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.\r
  */\r
 package jalview.ws.seqfetcher;\r
 \r
@@ -31,8 +30,7 @@ import com.stevesoft.pat.Regex;
  * add/define mechanism for retrieval of Trees and distance matrices from a\r
  * database (unify with io)\r
  * \r
- * @author JimP\r
- * \r
+ * @author JimP TODO: promote to API\r
  */\r
 public interface DbSourceProxy\r
 {\r
@@ -68,7 +66,9 @@ public interface DbSourceProxy
 \r
   /**\r
    * Regular expression for checking form of query string understood by this\r
-   * source.\r
+   * source. If the Regex includes parenthesis, then the first parenthesis\r
+   * should yield the same accession string as the one used to annotate the\r
+   * sequence. This is used to match query strings to returned sequences.\r
    * \r
    * @return null or a validation regex\r
    */\r
@@ -103,9 +103,12 @@ public interface DbSourceProxy
    * into an alignment\r
    * \r
    * @param queries\r
+   *          - one or more queries for database in expected form\r
    * @return null if queries were successful but result was not parsable\r
    * @throws Exception\r
-   *                 TODO\r
+   *           - propagated from underlying transport to database (note -\r
+   *           exceptions are not raised if query not found in database)\r
+   * \r
    */\r
   public AlignmentI getSequenceRecords(String queries) throws Exception;\r
 \r
@@ -121,4 +124,14 @@ public interface DbSourceProxy
    * @return one or more string buffers for each individual query\r
    */\r
   public StringBuffer getRawRecords();\r
+\r
+  /**\r
+   * Find out more info about the source.\r
+   * \r
+   * @param dbsourceproperty\r
+   *          - one of the database reference source properties in\r
+   *          jalview.datamodel.DBRefSource\r
+   * @return true if the source has this property\r
+   */\r
+  public boolean isA(Object dbsourceproperty);\r
 }\r