Skip to content

Commit

Permalink
core: improve Ontology downloader, #TASK-5775, #TASK-5564
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Mar 7, 2024
1 parent fe05795 commit 50f7008
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public class EtlCommons {
public static final String HPO_VERSION_FILE = "hpoVersion.json";
public static final String GO_VERSION_FILE = "goVersion.json";
public static final String DO_VERSION_FILE = "doVersion.json";
public static final String MONDO_VERSION_FILE = "mondoVersion.json";
public static final String HGMD_FILE = "hgmd.vcf";
public static final String PUBMED_VERSION_FILENAME = "pubmedVersion.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@ public List<DownloadFile> download() throws IOException, InterruptedException {
Files.createDirectories(oboFolder);

String url = configuration.getDownload().getHpoObo().getHost();
logger.info("Downloading {} ...", url);
downloadFiles.add(downloadFile(url, oboFolder.resolve("hp.obo").toString()));
saveVersionData(EtlCommons.OBO_DATA, "HPO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.HPO_VERSION_FILE));
Collections.singletonList(url), oboFolder.resolve(EtlCommons.HPO_VERSION_FILE));

url = configuration.getDownload().getGoObo().getHost();
logger.info("Downloading {} ...", url);
downloadFiles.add(downloadFile(url, oboFolder.resolve("go-basic.obo").toString()));
saveVersionData(EtlCommons.OBO_DATA, "GO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.GO_VERSION_FILE));
Collections.singletonList(url), oboFolder.resolve(EtlCommons.GO_VERSION_FILE));

url = configuration.getDownload().getDoidObo().getHost();
logger.info("Downloading {} ...", url);
downloadFiles.add(downloadFile(url, oboFolder.resolve("doid.obo").toString()));
saveVersionData(EtlCommons.OBO_DATA, "DO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.DO_VERSION_FILE));
Collections.singletonList(url), oboFolder.resolve(EtlCommons.DO_VERSION_FILE));

url = configuration.getDownload().getMondoObo().getHost();
logger.info("Downloading {} ...", url);
downloadFiles.add(downloadFile(url, oboFolder.resolve("mondo.obo").toString()));
saveVersionData(EtlCommons.OBO_DATA, "MONDO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.DO_VERSION_FILE));
Collections.singletonList(url), oboFolder.resolve(EtlCommons.MONDO_VERSION_FILE));

return downloadFiles;
}
Expand Down

0 comments on commit 50f7008

Please sign in to comment.