kb migration logging tweaks

This commit is contained in:
sjm222 2011-01-27 20:52:12 +00:00
parent 710ad1aff4
commit 881c3ca4fa
2 changed files with 18 additions and 6 deletions

View file

@ -371,7 +371,7 @@ public class ABoxUpdater {
if (count > 0) {
//logger.log(count + " subject reference" + ((count > 1) ? "s" : "") + " to the " + deletedClass.getURI() + " class " + ((count > 1) ? "were" : "was") + " removed.");
logger.log("Removed " + count + " subject reference" + ((count > 1) ? "s" : "") + " to the " + deletedClass.getURI() + " class.");
logger.log("Removed " + count + " subject reference" + ((count > 1) ? "s" : "") + " to the " + deletedClass.getURI() + " class");
}
} finally {
aboxModel.leaveCriticalSection();
@ -397,7 +397,7 @@ public class ABoxUpdater {
//log summary of changes
if (count > 0) {
//logger.log(count + " instance" + ((count > 1) ? "s" : "") + " of the " + deletedClass.getURI() + " class " + ((count > 1) ? "were" : "was") + " removed.");
logger.log("Removed " + count + " instance" + ((count > 1) ? "s" : "") + " of the " + deletedClass.getURI() + " class.");
logger.log("Removed " + count + " instance" + ((count > 1) ? "s" : "") + " of the " + deletedClass.getURI() + " class");
}
aboxModel.remove(retractions);
@ -423,7 +423,7 @@ public class ABoxUpdater {
//log summary of changes
if (count > 0) {
//logger.log(count + " object reference" + ((count > 1) ? "s" : "") + " of the " + deletedClass.getURI() + " class " + ((count > 1) ? "were" : "was") + " removed.");
logger.log("Removed " + count + " object reference" + ((count > 1) ? "s" : "") + " to the " + deletedClass.getURI() + " class.");
logger.log("Removed " + count + " object reference" + ((count > 1) ? "s" : "") + " to the " + deletedClass.getURI() + " class");
}
aboxModel.remove(retractions);
@ -491,12 +491,19 @@ public class ABoxUpdater {
record.recordAdditions(additions);
if (additions.size() > 0) {
/*
logger.log(additions.size() + " statement" +
((additions.size() > 1) ? "s" : "") +
" with predicate " + addedProperty.getURI() + " " +
((additions.size() > 1) ? "were" : "was")
+ " added (as an inverse to existing " + inverseOfAddedProperty.getURI() +
" assertions)");
*/
logger.log("Added " + additions.size() + " statement" +
((additions.size() > 1) ? "s" : "") +
" with predicate " + addedProperty.getURI() +
" (as an inverse to existing " + inverseOfAddedProperty.getURI() +
" statements)");
}
} finally {
@ -573,7 +580,7 @@ public class ABoxUpdater {
//logger.log(deletePropModel.size() + " statement" + (plural ? "s" : "") + " with predicate " +
// propObj.getSourceURI() + " " + (plural ? "were" : "was") + " removed. ");
logger.log("Removed " + deletePropModel.size() + " statement" + (plural ? "s" : "") + " with predicate " +
propObj.getSourceURI() + ".");
propObj.getSourceURI());
}
} else {
AtomicOntologyChange chg = new AtomicOntologyChange(deletedProperty.getURI(), replacementProperty.getURI(), AtomicChangeType.RENAME, propObj.getNotes());
@ -634,7 +641,7 @@ public class ABoxUpdater {
logger.log("Changed " + renamePropRetractModel.size() + " statement" +
((renamePropRetractModel.size() > 1) ? "s" : "") +
" with predicate " + propObj.getSourceURI() + " to use " +
propObj.getDestinationURI() + " instead.");
propObj.getDestinationURI() + " instead");
}

View file

@ -135,7 +135,8 @@ public class DateTimeMigration {
if (additions.size() > 0) {
long count = additions.size() / 2;
logger.log(count + " Academic interval" + ((count > 1) ? "s were" : " was") + " updated to the new date/time format");
//logger.log(count + " Academic interval" + ((count > 1) ? "s were" : " was") + " updated to the new date/time format");
logger.log("Updated " + count + " Academic interval" + ((count > 1) ? "s" : "") + " to the new date/time format");
}
} finally {
aboxModel.leaveCriticalSection();
@ -219,9 +220,13 @@ public class DateTimeMigration {
record.recordAdditions(additions);
if (additions.size() > 0) {
/*
logger.log(additions.size() + " date/time literal" +
((additions.size() > 1) ? "s" : "") + ((additions.size() > 1) ? " were " : " was ") +
"updated to the xsd:dateTime representation.");
*/
logger.log("Updated " + additions.size() + " date/time literal" +
((additions.size() > 1) ? "s" : "") + " to the xsd:dateTime representation");
}
} finally {
aboxModel.leaveCriticalSection();