JAL-1705 DbSourceProxy properties converted to methods, tidy/format code
[jalview.git] / src / jalview / ws / seqfetcher / DbSourceProxy.java
index 33f62b6..1e62d13 100644 (file)
@@ -78,15 +78,6 @@ public interface DbSourceProxy
   public Regex getAccessionValidator();
 
   /**
-   * DbSource properties hash - define the capabilities of this source Property
-   * hash methods defined in DbSourceProxyImpl. See constants in
-   * jalview.datamodel.DBRefSource for definition of properties.
-   * 
-   * @return
-   */
-  public Hashtable getDbSourceProperties();
-
-  /**
    * 
    * @return a test/example query that can be used to validate retrieval and
    *         parsing mechanisms
@@ -133,19 +124,43 @@ public interface DbSourceProxy
   public StringBuffer getRawRecords();
 
   /**
-   * Find out more info about the source.
+   * Tier for this data source
    * 
-   * @param dbsourceproperty
-   *          - one of the database reference source properties in
-   *          jalview.datamodel.DBRefSource
-   * @return true if the source has this property
+   * @return 0 - primary datasource, 1 - das primary source, 2 - secondary
    */
-  public boolean isA(Object dbsourceproperty);
+  public int getTier();
 
   /**
-   * Tier for this data source
+   * Extracts valid accession strings from a query string. If there is an
+   * accession id validator, returns the the matched region or the first
+   * subgroup match from the matched region; else just returns the whole query.
    * 
-   * @return 0 - primary datasource, 1 - das primary source, 2 - secondary
+   * @param query
+   * @return
    */
-  public int getTier();
-}
+  String getAccessionIdFromQuery(String query);
+
+  /**
+   * Returns the maximum number of accession ids that can be queried in one
+   * request.
+   * 
+   * @return
+   */
+  public int getMaximumQueryCount();
+
+  /**
+   * Returns true if the source may provide coding DNA i.e. sequences with
+   * implicit peptide products
+   * 
+   * @return
+   */
+  public boolean isDnaCoding();
+
+  /**
+   * Answers true if the database is a source of alignments (for example, domain
+   * families)
+   * 
+   * @return
+   */
+  public boolean isAlignmentSource();
+}
\ No newline at end of file