/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
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.gui.JvOptionPane;
+import jalview.util.DBRefUtils;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import java.util.StringTokenizer;
import java.util.Vector;
-import javax.swing.JOptionPane;
-
import org.biodas.jdas.client.FeaturesClient;
import org.biodas.jdas.client.adapters.features.DasGFFAdapter;
import org.biodas.jdas.client.adapters.features.DasGFFAdapter.GFFAdapter;
int refCount = 0;
for (int i = 0; i < sequences.length; i++)
{
- DBRefEntry[] dbref = sequences[i].getDBRef();
+ DBRefEntry[] dbref = sequences[i].getDBRefs();
if (dbref != null)
{
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;
if (checkDbrefs && refCount < sequences.length && uniprotCount > 0)
{
- int reply = JOptionPane.YES_OPTION;
+ int reply = JvOptionPane.YES_OPTION;
if (promptFetchDbrefs)
{
- reply = JOptionPane
+ reply = JvOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
MessageManager
.getString("info.you_want_jalview_to_find_uniprot_accessions"),
MessageManager
.getString("label.find_uniprot_accession_ids"),
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
+ JvOptionPane.YES_NO_OPTION,
+ JvOptionPane.QUESTION_MESSAGE);
}
- if (reply == JOptionPane.YES_OPTION)
+ if (reply == JvOptionPane.YES_OPTION)
{
Thread thread = new Thread(new FetchDBRefs());
thread.start();
class FetchSeqFeatures implements Runnable
{
+ @Override
public void run()
{
startFetching();
class FetchDBRefs implements Runnable
{
+ @Override
public void run()
{
running = true;
- new DBRefFetcher(sequences, af).fetchDBRefs(true);
+ boolean isNucleotide = af.getViewport().getAlignment().isNucleotide();
+ 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",
- "uniprot");
+ String active = Cache.getDefault("DAS_ACTIVE_SOURCE", "uniprot");
StringTokenizer st = new StringTokenizer(active, "\t");
selectedSources = new Vector();
String token;
{
return null;
}
- DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
- seq.getDBRef(), new String[] {
+ 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(
- csys.getAuthority(), uprefs[j]))
+ if (DBRefUtils.isDasCoordinateSystem(csys.getAuthority(),
+ uprefs[j]))
{
debug("Launched fetcher for coordinate system "
+ csys.getAuthority());