- // af.featureSettings_actionPerformed(null);
- String[] defdb = null, otherdb = sfetcher
- .getDbInstances(jalview.ws.dbsources.das.datamodel.DasSequenceSource.class);
- List<DbSourceProxy> selsources = new ArrayList<DbSourceProxy>();
- Vector dasselsrc = (af.featureSettings != null) ? af.featureSettings
- .getSelectedSources() : new jalview.gui.DasSourceBrowser()
- .getSelectedSources();
- Enumeration<jalviewSourceI> en = dasselsrc.elements();
- while (en.hasMoreElements())
- {
- jalviewSourceI src = en.nextElement();
- List<DbSourceProxy> sp = src.getSequenceSourceProxies();
- selsources.addAll(sp);
- if (sp.size() > 1)
- {
- Cache.log.debug("Added many Db Sources for :" + src.getTitle());
- }
- }
- // select appropriate databases based on alignFrame context.
- if (af.getViewport().getAlignment().isNucleotide())
- {
- defdb = DBRefSource.DNACODINGDBS;
- }
- else
- {
- defdb = DBRefSource.PROTEINDBS;
- }
- List<DbSourceProxy> srces = new ArrayList<DbSourceProxy>();
- for (String ddb : defdb)
- {
- List<DbSourceProxy> srcesfordb = sfetcher.getSourceProxy(ddb);
- if (srcesfordb != null)
- {
- srces.addAll(srcesfordb);
- }
- }
-
- // append the selected sequence sources to the default dbs
- srces.addAll(selsources);
- dbSources = srces.toArray(new DbSourceProxy[0]);