return dbs;\r
}\r
\r
+ /**\r
+ * constructs and instance of the proxy and registers it as a valid\r
+ * dbrefsource\r
+ * \r
+ * @param dbSourceProxy\r
+ * reference for class implementing\r
+ * jalview.ws.seqfetcher.DbSourceProxy\r
+ * @throws java.lang.IllegalArgumentException\r
+ * if class does not implement\r
+ * jalview.ws.seqfetcher.DbSourceProxy\r
+ */\r
+ protected void addDBRefSourceImpl(Class dbSourceProxy)\r
+ throws java.lang.IllegalArgumentException\r
+ {\r
+ try\r
+ {\r
+ Object proxyObj = dbSourceProxy.getConstructor(\r
+ null).newInstance(null);\r
+ if (!DbSourceProxy.class.isInstance(proxyObj))\r
+ {\r
+ throw new IllegalArgumentException(\r
+ dbSourceProxy.toString()\r
+ + " does not implement the jalview.ws.seqfetcher.DbSourceProxy");\r
+ }\r
+ DbSourceProxy proxy = (DbSourceProxy) proxyObj; \r
+ if (proxy != null)\r
+ {\r
+ if (FETCHABLEDBS == null)\r
+ {\r
+ FETCHABLEDBS = new Hashtable();\r
+ }\r
+ FETCHABLEDBS.put(proxy.getDbSource(), proxy);\r
+ }\r
+ } \r
+ catch (IllegalArgumentException e)\r
+ {\r
+ throw e;\r
+ }\r
+ catch (Exception e)\r
+ {\r
+ // Serious problems if this happens.\r
+ throw new Error("DBRefSource Implementation Exception", e);\r
+ }\r
+ }\r
+\r
}
\ No newline at end of file