work on NIHVIVO-205 ontology upgrade
This commit is contained in:
parent
d9e9088664
commit
0bb3e723c1
2 changed files with 17 additions and 5 deletions
|
@ -53,7 +53,7 @@ public class OntologyUpdater {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performUpdate() {
|
private void performUpdate() throws IOException {
|
||||||
List<AtomicOntologyChange> changes = getAtomicOntologyChanges();
|
List<AtomicOntologyChange> changes = getAtomicOntologyChanges();
|
||||||
|
|
||||||
//updateTBox(changes);
|
//updateTBox(changes);
|
||||||
|
@ -66,8 +66,9 @@ public class OntologyUpdater {
|
||||||
// perform additional additions and retractions
|
// perform additional additions and retractions
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<AtomicOntologyChange> getAtomicOntologyChanges() {
|
private List<AtomicOntologyChange> getAtomicOntologyChanges()
|
||||||
return null; //Anup's code is called here
|
throws IOException {
|
||||||
|
return OntologyChangeParser.parseFile(settings.getDiffFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateABox(List<AtomicOntologyChange> changes) {
|
private void updateABox(List<AtomicOntologyChange> changes) {
|
||||||
|
@ -135,4 +136,10 @@ public class OntologyUpdater {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void log(String log) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,13 @@ public class UpdateKnowledgeBase implements ServletContextListener {
|
||||||
try {
|
try {
|
||||||
(new OntologyUpdater(settings)).update();
|
(new OntologyUpdater(settings)).update();
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw new RuntimeException("IOException updating knowledge base " +
|
String errMsg = "IOException updating knowledge base " +
|
||||||
"for ontology changes", ioe);
|
"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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue