improvements and bugfix for NIHVIVO-205 ontology upgrade

This commit is contained in:
bjl23 2010-04-02 18:50:03 +00:00
parent 8ffd6776ab
commit 2a60a9c0e8
2 changed files with 11 additions and 7 deletions

View file

@ -291,8 +291,8 @@ public class ABoxUpdater {
} }
//log summary of changes //log summary of changes
logger.log("Class " + deletedClass.getURI() + " has been deleted. Any references to it in the knowledge base will be changed to " + //logger.log("Class " + deletedClass.getURI() + " has been deleted. Any references to it in the knowledge base will be changed to " +
replacementClass.getURI()); // replacementClass.getURI());
AtomicOntologyChange chg = new AtomicOntologyChange(deletedClass.getURI(), replacementClass.getURI(), AtomicChangeType.RENAME); AtomicOntologyChange chg = new AtomicOntologyChange(deletedClass.getURI(), replacementClass.getURI(), AtomicChangeType.RENAME);
renameClass(chg); renameClass(chg);

View file

@ -140,7 +140,7 @@ public class TBoxUpdater {
continue; continue;
} }
if (!siteObject.equals(oldObject)) { if (siteObject.equals(oldObject)) {
try { try {
StmtIterator it = siteModel.listStatements(subject, predicate, (RDFNode)null); StmtIterator it = siteModel.listStatements(subject, predicate, (RDFNode)null);
while (it.hasNext()) { while (it.hasNext()) {
@ -178,12 +178,16 @@ public class TBoxUpdater {
record.recordRetractions(actualRetractions); record.recordRetractions(actualRetractions);
// log summary of changes // log summary of changes
logger.log("Updated the default vitro annotation value for " + if (actualAdditions.size() > 0) {
actualAdditions.size() + " statments in the knowledge base."); logger.log("Updated the default vitro annotation value for " +
actualAdditions.size() + " statments in the knowledge base.");
}
long numRemoved = actualRetractions.size() - actualAdditions.size(); long numRemoved = actualRetractions.size() - actualAdditions.size();
logger.log("Removed " + numRemoved + if (numRemoved > 0) {
" superfluous vitro annotation property settings from the knowledge base."); logger.log("Removed " + numRemoved +
" superfluous vitro annotation property settings from the knowledge base.");
}
// Copy annotation property settings that were introduced in the new ontology // Copy annotation property settings that were introduced in the new ontology
// into the site model. // into the site model.