diff --git a/src/main/java/cpath/service/ConsoleApplication.java b/src/main/java/cpath/service/ConsoleApplication.java index 5fa698a4..5523c13c 100644 --- a/src/main/java/cpath/service/ConsoleApplication.java +++ b/src/main/java/cpath/service/ConsoleApplication.java @@ -201,9 +201,10 @@ private void merge() { LOG.info("Found {}...", service.settings().mainModelFile()); } - service.init(); // reload the model, index, blacklist if exists... - if(service.getBlacklist() == null) { + if(service.getModel()==null) { + service.init(); + } LOG.info("Generating the list of ubiquitous small molecules, {}...", service.settings().blacklistFile()); //Generate the blacklist.txt to exclude/keep ubiquitous small molecules (e.g. ATP) //from graph query and output format converter results. @@ -321,7 +322,9 @@ private void postmerge() throws IOException { writer.close(); LOG.info("generated datasources.txt"); - service.init(); // load/reload the main model, index, etc. + if(service.getModel() == null) { + service.init(); // load/reload the main model, index, etc. + } //this was to integrate with UniProt portal/data - to add/update their external links to PathwayCommons apps... LOG.info("creating the list of primary uniprot ACs..."); diff --git a/src/main/java/cpath/service/IndexImpl.java b/src/main/java/cpath/service/IndexImpl.java index 576082fb..6f59ac86 100644 --- a/src/main/java/cpath/service/IndexImpl.java +++ b/src/main/java/cpath/service/IndexImpl.java @@ -477,6 +477,7 @@ public void save(Model model) { commit(); //force refreshing the index state (for new readers) refresh(); + setModel(model); LOG.info("build(), all done."); } diff --git a/src/main/java/cpath/service/Merger.java b/src/main/java/cpath/service/Merger.java index 043d7ffd..7fea893f 100644 --- a/src/main/java/cpath/service/Merger.java +++ b/src/main/java/cpath/service/Merger.java @@ -85,6 +85,7 @@ public void merge() { log.info("Merged, saved."); log.info("Indexing..."); service.index().save(m); // create or update all the biopax elements index + service.setModel(m); } //remove bad unification and relationship xrefs, if any;