X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fseqfetcher%2FDbSourceProxy.java;h=3dacb1206abc26e93f758fdaecdd92e961d22f4e;hb=d904a499f1863e96cd699e0c5f7f0f81710e8ad9;hp=895c03e2df932dbf9f462f42f46f890d6aa80ae9;hpb=2de8acfae59aced665e4c37ad0f7dcc2ed68818e;p=jalview.git diff --git a/src/jalview/ws/seqfetcher/DbSourceProxy.java b/src/jalview/ws/seqfetcher/DbSourceProxy.java index 895c03e..3dacb12 100644 --- a/src/jalview/ws/seqfetcher/DbSourceProxy.java +++ b/src/jalview/ws/seqfetcher/DbSourceProxy.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle * - * This program 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 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program 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. + * 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. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * 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.seqfetcher; @@ -32,7 +31,7 @@ import com.stevesoft.pat.Regex; * database (unify with io) * * @author JimP - * + * TODO: promote to API */ public interface DbSourceProxy { @@ -68,7 +67,9 @@ public interface DbSourceProxy /** * Regular expression for checking form of query string understood by this - * source. + * source. If the Regex includes parenthesis, then the first parenthesis + * should yield the same accession string as the one used to annotate the + * sequence. This is used to match query strings to returned sequences. * * @return null or a validation regex */ @@ -101,11 +102,10 @@ public interface DbSourceProxy /** * make one or more queries to the database and attempt to parse the response * into an alignment - * - * @param queries + * @param queries - one or more queries for database in expected form * @return null if queries were successful but result was not parsable - * @throws Exception - * TODO + * @throws Exception - propagated from underlying transport to database (note - exceptions are not raised if query not found in database) + * */ public AlignmentI getSequenceRecords(String queries) throws Exception; @@ -121,4 +121,12 @@ public interface DbSourceProxy * @return one or more string buffers for each individual query */ public StringBuffer getRawRecords(); + + + /** + * Find out more info about the source. + * @param dbsourceproperty - one of the database reference source properties in jalview.datamodel.DBRefSource + * @return true if the source has this property + */ + public boolean isA(Object dbsourceproperty); }