List<SequenceI> seqsWithoutSourceDBRef = null;
private boolean showChooserGUI = true;
+ /**
+ * when true, queries to external services are supressed (no SIFTs, no PDBe, no 3D-Beacons, etc)
+ */
+ private boolean dontQueryServices = false;
private static StructureViewer lastTargetedView = null;
public StructureChooser(SequenceI[] selectedSeqs, SequenceI selectedSeq,
AlignmentPanel ap, boolean showGUI)
{
+ this(selectedSeqs, selectedSeq, ap, showGUI, false);
+ }
+
+ public StructureChooser(SequenceI[] selectedSeqs, SequenceI selectedSeq,
+ AlignmentPanel ap, boolean showGUI, boolean dontQueryServices)
+ {
+
// which FTS engine to use
data = StructureChooserQuerySource.getQuerySourceFor(selectedSeqs);
initDialog();
this.selectedSequences = selectedSeqs;
this.progressIndicator = (ap == null) ? null : ap.alignFrame;
this.showChooserGUI = showGUI;
+ this.dontQueryServices = dontQueryServices;
init();
}
}
});
- Executors.defaultThreadFactory().newThread(new Runnable()
+ if (!dontQueryServices)
{
- @Override
- public void run()
+ Executors.defaultThreadFactory().newThread(new Runnable()
{
- populateSeqsWithoutSourceDBRef();
- initialStructureDiscovery();
- }
-
- }).start();
+ @Override
+ public void run()
+ {
+ populateSeqsWithoutSourceDBRef();
+ initialStructureDiscovery();
+ }
+ }).start();
+ } else {
+ Console.debug("Structure chooser not querying services to discover metadata.");
+ }
}
// called by init
}
} catch (Exception e)
{
- Console.debugPrintStackTrace(e);
+ Console.printStackTrace(e);
errors.add(e.getMessage());
continue;
}
{
// headless = true;
prompt = false;
- sc = new StructureChooser(new SequenceI[] { seq }, seq, ap, false);
+ // suppress structure viewer's external service queries
+ sc = new StructureChooser(new SequenceI[] { seq }, seq, ap, false,true);
}
if (ssm == null)
{