From 2d6d876267941e53a92197d4d05075740e1afe73 Mon Sep 17 00:00:00 2001 From: sjm222 Date: Tue, 8 Feb 2011 14:52:51 +0000 Subject: [PATCH] missing date logging info --- .../webapp/ontology/update/DateTimeMigration.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/ontology/update/DateTimeMigration.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/ontology/update/DateTimeMigration.java index b995609e0..f9f701fed 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/ontology/update/DateTimeMigration.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/ontology/update/DateTimeMigration.java @@ -101,6 +101,7 @@ public class DateTimeMigration { StmtIterator iter = aboxModel.listStatements((Resource) null, hasTimeIntervalProp, (RDFNode) null); + int datelessCount = 0; while (iter.hasNext()) { Statement stmt1 = iter.next(); @@ -113,7 +114,7 @@ public class DateTimeMigration { Statement stmt2 = aboxModel.getProperty(stmt1.getObject().asResource(), dateTimeIntervalProp); if (stmt2 == null) { - logger.log("Info: Found an Academic Term or Year without dates attached"); + datelessCount++; additions.add(stmt1.getSubject(), dateTimeIntervalProp, stmt1.getObject()); additions.add(stmt1.getObject().asResource(), dateTimeIntervalForProp, stmt1.getSubject()); continue; @@ -146,6 +147,13 @@ public class DateTimeMigration { aboxModel.add(additions); record.recordAdditions(additions); + if (datelessCount > 0) { + logger.log("INFO: Found " + datelessCount + " Academic Term and/or Year individual" + ((datelessCount > 1) ? "s" : "") + + " that " + ((datelessCount > 1) ? "don't have" : "doesn't have an") + " associated date" + + ((datelessCount > 1) ? "s" : "") + ". Such an individual will be displayed as an incomplete Date/Time" + + " interval on any Course page that refers to it."); + } + if (additions.size() > 0) { long count = additions.size() / 2; logger.log("Updated " + count + " Academic interval" + ((count > 1) ? "s" : "") + " to the new date/time format");