Skip to content

Commit

Permalink
require golr server specification for command line run
Browse files Browse the repository at this point in the history
defaulting to hammering the public golr endpoint not a great idea.
  • Loading branch information
goodb committed Feb 28, 2020
1 parent b9cb927 commit 83e2827
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ public static void main(String[] args) {
String golr_server = null;
if(cmd.hasOption("golr")) {
golr_server = cmd.getOptionValue("golr");
}
}
if(golr_server==null) {
System.err.println("Need to specify a golr server - should be a local instance for any large batch run. e.g. -golr http://127.0.0.1:8080/solr/");
System.exit(-1);
}
validateGoCams(input, basicOutputFile, explanationOutputFile, ontologyIRI, catalog, modelIdPrefix, modelIdcurie, shexpath, shapemappath, travisMode, shouldFail, checkShex, golr_server, gorules_json_output_file);
}else if(cmd.hasOption("update-gene-product-types")) {
Options options = new Options();
Expand Down Expand Up @@ -680,9 +684,13 @@ public static void validateGoCams(String input, String basicOutputFile, String e
org.apache.commons.io.FileUtils.copyURLToFile(shex_map_url, shex_map_file);
System.err.println("-m .No shape map file provided, using: "+goshapemapFileUrl);
}
String golr_url = "http://noctua-golr.berkeleybop.org/";
//don't want to hammer the public golr server..
//String golr_url = "http://noctua-golr.berkeleybop.org/";
String golr_url = null;
if(golr_server!=null) {
golr_url = golr_server;
}else {
System.err.println("Need to specify a golr server - should be a local instance for any large batch run. e.g. -golr http://127.0.0.1:8080/solr/");
}
ExternalLookupService externalLookupService = new GolrExternalLookupService(golr_url, curieHandler, false);
LOGGER.info("making shex validator: "+shexpath+" "+shapemappath+" "+curieHandler+" ");
Expand Down

0 comments on commit 83e2827

Please sign in to comment.