work on NIHVIVO-205 ontology upgrade

This commit is contained in:
bjl23 2010-03-31 15:06:33 +00:00
parent d9e9088664
commit 0bb3e723c1
2 changed files with 17 additions and 5 deletions

View file

@ -53,7 +53,7 @@ public class OntologyUpdater {
}
}
private void performUpdate() {
private void performUpdate() throws IOException {
List<AtomicOntologyChange> changes = getAtomicOntologyChanges();
//updateTBox(changes);
@ -66,8 +66,9 @@ public class OntologyUpdater {
// perform additional additions and retractions
}
private List<AtomicOntologyChange> getAtomicOntologyChanges() {
return null; //Anup's code is called here
private List<AtomicOntologyChange> getAtomicOntologyChanges()
throws IOException {
return OntologyChangeParser.parseFile(settings.getDiffFile());
}
private void updateABox(List<AtomicOntologyChange> changes) {
@ -135,4 +136,10 @@ public class OntologyUpdater {
}
}
private void log(String log) {
}
}

View file

@ -60,8 +60,13 @@ public class UpdateKnowledgeBase implements ServletContextListener {
try {
(new OntologyUpdater(settings)).update();
} catch (IOException ioe) {
throw new RuntimeException("IOException updating knowledge base " +
"for ontology changes", ioe);
String errMsg = "IOException updating knowledge base " +
"for ontology changes: ";
// Tomcat doesn't always seem to print exceptions thrown from
// context listeners
System.out.println(errMsg);
ioe.printStackTrace();
throw new RuntimeException(errMsg, ioe);
}
}