public static boolean isPrimaryCandidate(String ucversion)
{
+ if (ucversion==null)
+ {
+ // Null/empty version is not a real reference ?
+ return false;
+ }
// tricky - this test really needs to search the sequence's set of dbrefs to
// see if there is a primary reference that derived this reference.
for (int i = allSources.length; --i >= 0;)
SiftsSettings.setCacheThresholdInDays("2");
SiftsSettings.setFailSafePIDThreshold("70");
PDBfile pdbFile;
+
pdbFile = new PDBfile(false, false, false,
"test/jalview/io/" + testPDBId + ".pdb", DataSourceType.FILE);
+ // TODO: this uses a network connection - we should mock the sifts testPDBId.xml.gz
siftsClient = new SiftsClient(pdbFile);
}
long t1 = siftsFile.lastModified();
// re-read file should be returned from cache
- siftsFile = SiftsClient.downloadSiftsFile(testPDBId);
+ siftsFile = SiftsClient.getSiftsFile(testPDBId);
FileAssert.assertFile(siftsFile);
long t2 = siftsFile.lastModified();
assertEquals(t1, t2);
{
SequenceI invalidTestSeq = new Sequence("testSeq", "ABCDEFGH");
DBRefEntry invalidDBRef = new DBRefEntry();
- invalidDBRef.setAccessionId("BLAR");
+ invalidDBRef.setAccessionId("BLAR"); // note no version is set, so also invalid
invalidTestSeq.addDBRef(invalidDBRef);
siftsClient.getValidSourceDBRef(invalidTestSeq);
}