: new CrossRef(seqs, dataset)
.findXrefSourcesForSequences(dna);
+ pass2 = 0;
+ do // second cross ref and recover crossref loop
+ {
for (String db : ptypes)
{
- pass2 = 0;
- do // second cross ref and recover crossref loop
- {
// counter for splitframe views retrieved via crossref
int p = 0;
// build next key so we an retrieve all views
: new CrossRef(xrseqs, dataset)
.findXrefSourcesForSequences(avp
.getAlignViewport().isNucleotide());
- for (String xrefdb : xrptypes)
+ pass3 = 0;
+ do // 3rd cross ref and recover crossref loop
{
- pass3 = 0;
- do // 3rd cross ref and recover crossref loop
+ for (String xrefdb : xrptypes)
{
List<AlignmentViewPanel> cra_views2 = new ArrayList<AlignmentViewPanel>();
int q = 0;
String nextnextxref = "{" + p + "}" + nextxref + " -> "
+ xrefdb + "{" + q + "}";
- AlignFrame nextaf = Desktop.getAlignFrameFor(avp
- .getAlignViewport());
if (pass3 == 0)
{
+ AlignFrame nextaf = Desktop.getAlignFrameFor(avp
+ .getAlignViewport());
+
cra = new CrossRefAction(nextaf, xrseqs, avp
.getAlignViewport().isNucleotide(), xrefdb);
cra.run();
nextavp);
keyseq.add(nextnextxref);
}
- } while (pass3++ < 2 && pass2 < 1);
- }
+ } // end of loop around showing all xrefdb for crossrf2
+ // fetchdb->crossref1->crossref-2->verify for xrefs we
+ // either loop twice when pass2=0, or just once when pass2=1
+ // (recovered project from previous crossref)
+ } while (pass3++ < 2 && pass2 < 1);
}
- } while (pass2++ < 2 && pass1 < 1);
}
+ // fetchdb-->crossref1
+ // for each xref we try to retrieve xref, store and verify when
+ // pass1=0, or just retrieve and verify when pass1=1
+ } while (pass2++ < 2 && pass1 < 1);
+ // fetchdb
+ // for each ref we
+ // loop twice: first, do the retrieve, second recover from saved project
} while (++pass1 < 2);
}
}
if (savedProjects != null)
{
if (savedProjects.get(xrefpath) == null)
- {
- // write a project file for this view. On the second pass, this will be
- // recovered and cross-references verified
- try
- {
- File prfile = File.createTempFile("crossRefTest", ".jvp");
- AlignFrame af = Desktop.getAlignFrameFor(avp.getAlignViewport());
- new Jalview2XML(false).saveAlignment(af, prfile.toString(),
- af.getTitle());
- System.out.println("Written view from '" + xrefpath + "' as '"
- + prfile.getAbsolutePath() + "'");
- savedProjects.put(xrefpath, prfile);
- } catch (IOException q)
{
- Assert.fail("Unexpected IO Exception", q);
- }
+ // write a project file for this view. On the second pass, this will be
+ // recovered and cross-references verified
+ try
+ {
+ File prfile = File.createTempFile("crossRefTest", ".jvp");
+ AlignFrame af = Desktop.getAlignFrameFor(avp.getAlignViewport());
+ new Jalview2XML(false).saveAlignment(af, prfile.toString(),
+ af.getTitle());
+ System.out.println("Written view from '" + xrefpath + "' as '"
+ + prfile.getAbsolutePath() + "'");
+ savedProjects.put(xrefpath, prfile);
+ } catch (IOException q)
+ {
+ Assert.fail("Unexpected IO Exception", q);
+ }
}
else
{