Merge commit 'a83c1e5e4f
' into feature/TDBfromRDB2
This commit is contained in:
commit
66fbf81034
15 changed files with 35 additions and 517 deletions
|
@ -67,8 +67,10 @@ public class KnowledgeBaseUpdater {
|
|||
log.info("Performing any necessary data migration");
|
||||
logger.log("Started knowledge base migration");
|
||||
|
||||
boolean changesPerformed = false;
|
||||
|
||||
try {
|
||||
performUpdate(servletContext);
|
||||
changesPerformed = performUpdate(servletContext);
|
||||
} catch (Exception e) {
|
||||
logger.logError(e.getMessage());
|
||||
log.error(e,e);
|
||||
|
@ -85,10 +87,15 @@ public class KnowledgeBaseUpdater {
|
|||
long elapsedSecs = (System.currentTimeMillis() - startTime)/1000;
|
||||
log.info("Finished checking knowledge base in " + elapsedSecs + " second" + (elapsedSecs != 1 ? "s" : ""));
|
||||
|
||||
return record.hasRecordedChanges();
|
||||
// The following was removed because it forced a recompute even if only
|
||||
// annotation values changed:
|
||||
// return record.hasRecordedChanges();
|
||||
|
||||
return changesPerformed;
|
||||
}
|
||||
|
||||
private void performUpdate(ServletContext servletContext) throws Exception {
|
||||
// returns true if ontology changes were found
|
||||
private boolean performUpdate(ServletContext servletContext) throws Exception {
|
||||
|
||||
List<AtomicOntologyChange> rawChanges = getAtomicOntologyChanges();
|
||||
|
||||
|
@ -121,9 +128,10 @@ public class KnowledgeBaseUpdater {
|
|||
updateTBoxAnnotations();
|
||||
} catch (Exception e) {
|
||||
log.error(e,e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return !rawChanges.isEmpty();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue