private static final String NOT_OBSERVED = "Not_Observed";
- private static final String SIFTS_FTP_BASE_URL = "http://ftp.ebi.ac.uk/pub/databases/msd/sifts/xml/";
+ private static final String SIFTS_SPLIT_FTP_BASE_URL = "https://ftp.ebi.ac.uk/pub/databases/msd/sifts/split_xml/";
private final static String NEWLINE = System.lineSeparator();
pdbId = pdbId.replace(".cif", "");
}
String siftFile = pdbId + ".xml.gz";
- String siftsFileFTPURL = SIFTS_FTP_BASE_URL + siftFile;
+ String siftsFileFTPURL = getDownloadUrlFor(siftFile);
/*
* Download the file from URL to either
return downloadTo;
}
+ public static String getDownloadUrlFor(String siftFile)
+ {
+ return SIFTS_SPLIT_FTP_BASE_URL +siftFile.substring(1, 3)+"/"+siftFile;
+ }
+
/**
* Delete the SIFTs file for the given PDB Id in the local SIFTs download
* directory
{
siftsClient = null;
}
+
+ @Test(groups= {"Functional"})
+ public void testSIFTsDownloadURL() {
+ String expectedUrl = "https://ftp.ebi.ac.uk/pub/databases/msd/sifts/split_xml/xy/1xyz.sifts.xml.gz";
+ Assert.assertEquals(SiftsClient.getDownloadUrlFor("1xyz.sifts.xml.gz"), expectedUrl);
+ }
@Test(groups = { "Network" })
public void getSIFTsFileTest() throws SiftsException, IOException