*
* @return vector of selected das source nicknames
*/
- public Vector getSelectedSources()
+ public Vector<jalviewSourceI> getSelectedSources()
{
return dassourceBrowser.getSelectedSources();
}
import jalview.util.GroupUrlLink.UrlStringTooLongException;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
+import jalview.ws.DBRefFetcher;
import java.awt.Color;
import java.awt.event.ActionEvent;
@Override
public void run()
{
- boolean isNuclueotide = ap.alignFrame.getViewport().getAlignment()
+ boolean isNucleotide = ap.alignFrame.getViewport().getAlignment()
.isNucleotide();
- new jalview.ws.DBRefFetcher(sequences, ap.alignFrame, null,
- ap.alignFrame.featureSettings, isNuclueotide)
+ new DBRefFetcher(sequences, ap.alignFrame, null,
+ ap.alignFrame.featureSettings, isNucleotide)
.fetchDBRefs(false);
}
import jalview.jbgui.GStructureChooser;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
+import jalview.ws.DBRefFetcher;
import jalview.ws.sifts.SiftsSettings;
import java.awt.event.ItemEvent;
{
ssm.setProgressBar(null);
ssm.setProgressBar("Fetching Database refs..");
- new jalview.ws.DBRefFetcher(sequences, null, null, null, false)
- .fetchDBRefs(true);
+ new DBRefFetcher(sequences).fetchDBRefs(true);
break;
}
}
}
- if (pdbEntriesToView.length > 1)
- {
- ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
- for (SequenceI seq : sequences)
- {
- seqsMap.add(new SequenceI[] { seq });
- }
- SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
+ if (pdbEntriesToView.length > 1)
+ {
+ ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
+ for (SequenceI seq : sequences)
+ {
+ seqsMap.add(new SequenceI[] { seq });
+ }
+ SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
ssm.setProgressBar(null);
ssm.setProgressBar("Fetching PDB Structures for selected entries..");
- sViewer.viewStructures(pdbEntriesToView, collatedSeqs, alignPanel);
- }
- else
- {
+ sViewer.viewStructures(pdbEntriesToView, collatedSeqs, alignPanel);
+ }
+ else
+ {
ssm.setProgressBar(null);
ssm.setProgressBar("Fetching PDB Structure for "
+ pdbEntriesToView[0].getId());
- sViewer.viewStructures(pdbEntriesToView[0], sequences, alignPanel);
- }
+ sViewer.viewStructures(pdbEntriesToView[0], sequences, alignPanel);
+ }
}
/**
String[] defdb = null, otherdb = sfetcher
.getDbInstances(jalview.ws.dbsources.das.datamodel.DasSequenceSource.class);
List<DbSourceProxy> selsources = new ArrayList<DbSourceProxy>();
- Vector dasselsrc = (featureSettings != null) ? featureSettings
+ Vector<jalviewSourceI> dasselsrc = (featureSettings != null) ? featureSettings
.getSelectedSources() : new jalview.gui.DasSourceBrowser()
.getSelectedSources();
Enumeration<jalviewSourceI> en = dasselsrc.elements();
}
/**
+ * Constructor with only sequences provided
+ *
+ * @param sequences
+ */
+ public DBRefFetcher(SequenceI[] sequences)
+ {
+ this(sequences, null, null, null, false);
+ }
+
+ /**
* Add a listener to be notified when sequence fetching is complete
*
* @param l
import jalview.bin.Cache;
import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.FeatureSettings;
+import jalview.util.DBRefUtils;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
{
for (int j = 0; j < dbref.length; j++)
{
- if (dbref[j].getSource().equals(
- jalview.datamodel.DBRefSource.UNIPROT))
+ if (dbref[j].getSource().equals(DBRefSource.UNIPROT))
{
refCount++;
break;
public void run()
{
running = true;
- boolean isNuclueotide = af.getViewport().getAlignment()
+ boolean isNucleotide = af.getViewport().getAlignment()
.isNucleotide();
- new jalview.ws.DBRefFetcher(sequences, af, null, af.featureSettings,
- isNuclueotide).fetchDBRefs(true);
+ new DBRefFetcher(sequences, af, null, af.featureSettings,
+ isNucleotide).fetchDBRefs(true);
startFetching();
setGuiFetchComplete();
{
jalviewSourceI[] sources = sourceRegistry.getSources().toArray(
new jalviewSourceI[0]);
- String active = jalview.bin.Cache.getDefault("DAS_ACTIVE_SOURCE",
+ String active = Cache.getDefault("DAS_ACTIVE_SOURCE",
"uniprot");
StringTokenizer st = new StringTokenizer(active, "\t");
selectedSources = new Vector();
{
return null;
}
- DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
+ DBRefEntry[] uprefs = DBRefUtils.selectRefs(
seq.getDBRefs(), new String[] {
// jalview.datamodel.DBRefSource.PDB,
- jalview.datamodel.DBRefSource.UNIPROT,
+ DBRefSource.UNIPROT,
// jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord
// sys sources
});
for (COORDINATES csys : dasSource.getVersion().getCOORDINATES())
{
- if (jalview.util.DBRefUtils.isDasCoordinateSystem(
+ if (DBRefUtils.isDasCoordinateSystem(
csys.getAuthority(), uprefs[j]))
{
debug("Launched fetcher for coordinate system "