X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fseqfetcher%2FDbSourceProxy.java;h=9fa904a0b85e7284c2e00574b985a8df6da54cec;hb=b57a02c25e335d033c97f8a6bacd6b54f62bd2b6;hp=9c5356a50ac794618be1bef989b1dea6d1b19ea6;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/ws/seqfetcher/DbSourceProxy.java b/src/jalview/ws/seqfetcher/DbSourceProxy.java index 9c5356a..9fa904a 100644 --- a/src/jalview/ws/seqfetcher/DbSourceProxy.java +++ b/src/jalview/ws/seqfetcher/DbSourceProxy.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) - * Copyright (C) 2010 J Procter, AM Waterhouse, 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 file is part of Jalview. * @@ -30,8 +30,7 @@ import com.stevesoft.pat.Regex; * add/define mechanism for retrieval of Trees and distance matrices from a * database (unify with io) * - * @author JimP - * + * @author JimP TODO: promote to API */ public interface DbSourceProxy { @@ -67,7 +66,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 */ @@ -102,9 +103,12 @@ public interface DbSourceProxy * into an alignment * * @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 + * - propagated from underlying transport to database (note - + * exceptions are not raised if query not found in database) + * */ public AlignmentI getSequenceRecords(String queries) throws Exception; @@ -120,4 +124,14 @@ 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); }