Skip to content

Commit

Permalink
Merge pull request #66 from monarch-initiative/fix_URI_download_command
Browse files Browse the repository at this point in the history
fixed download command, solves #65

Issue present on MacOS as well, solved through this.
  • Loading branch information
leokim-l authored Sep 27, 2024
2 parents fd62d21 + 4901b88 commit 40a5ff2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand All @@ -35,13 +37,13 @@ public class DownloadCommand implements Callable<Integer>{
public boolean overwrite;

@Override
public Integer call() throws FileDownloadException, MalformedURLException {
public Integer call() throws FileDownloadException, MalformedURLException, URISyntaxException {
logger.info(String.format("Download analysis to %s", datadir));
Path destination = Paths.get(datadir);
BioDownloaderBuilder builder = BioDownloader.builder(destination);
builder.hpoJson();
String hpoInternational = "https://github.com/obophenotype/human-phenotype-ontology/releases/latest/download/hp-international.obo";
URL hpoInternationalUrl = Paths.get(hpoInternational).toUri().toURL() ;
URL hpoInternationalUrl = new URI(hpoInternational).toURL() ;
builder.custom("hp-international.obo", hpoInternationalUrl);
BioDownloader downloader = builder.build();
List<File> files = downloader.download();
Expand Down

0 comments on commit 40a5ff2

Please sign in to comment.