pfam seed and full alignment retrieval and nicer ordering of sequence db sources...
[jalview.git] / src / jalview / ws / seqfetcher / ASequenceFetcher.java
index c4f7e9a..0785ea2 100644 (file)
@@ -255,4 +255,24 @@ public class ASequenceFetcher
     }\r
   }\r
 \r
+  /**\r
+   * test if the database handler for dbName contains the given dbProperty\r
+   * @param dbName\r
+   * @param dbProperty\r
+   * @return true if proxy has the given property\r
+   */\r
+  public boolean hasDbSourceProperty(String dbName, String dbProperty)\r
+  {\r
+    // TODO: decide if invalidDbName exception is thrown here.\r
+    DbSourceProxy proxy = getSourceProxy(dbName);\r
+    if (proxy!=null)\r
+    {\r
+      if (proxy.getDbSourceProperties()!=null)\r
+      {\r
+        return proxy.getDbSourceProperties().containsKey(dbProperty);\r
+      }\r
+    }\r
+    return false;\r
+  }\r
+\r
 }
\ No newline at end of file