incremental development for NIHVIVO-1286
This commit is contained in:
parent
46a17a9c46
commit
4c17c65019
2 changed files with 16 additions and 10 deletions
|
@ -421,11 +421,7 @@ public class ABoxUpdater {
|
|||
Statement newStmt = ResourceFactory.createStatement(stmt.getObject().asResource(), addedProperty, stmt.getSubject());
|
||||
additions.add(newStmt);
|
||||
} else {
|
||||
logger.log("WARNING: expected the object of this statement to be a Resource, and it's not. No inverse has been asserted: " +
|
||||
" subject = " + stmt.getSubject().getURI() +
|
||||
" property = " + stmt.getPredicate().getURI() +
|
||||
" object = " + (stmt.getObject().isLiteral() ? ((Literal)stmt.getObject()).getLexicalForm()
|
||||
: ((Resource)stmt.getObject()).getURI()));
|
||||
logger.log("WARNING: expected the object of this statement to be a Resource but it is not. No inverse has been asserted: " + stmtString(stmt));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +434,7 @@ public class ABoxUpdater {
|
|||
" with predicate " + addedProperty.getURI() + " " +
|
||||
((additions.size() > 1) ? "were" : "was")
|
||||
+ " added (as an inverse to existing " + inverseOfAddedProperty.getURI() +
|
||||
" assertions");
|
||||
" assertions)");
|
||||
}
|
||||
|
||||
} finally {
|
||||
|
|
|
@ -115,10 +115,15 @@ public class DateTimeMigration {
|
|||
aboxModel.add(additions);
|
||||
record.recordAdditions(additions);
|
||||
|
||||
if (additions.size() > 0) {
|
||||
long count = additions.size() / 2;
|
||||
logger.log(count + "Academic Term and/or Year statement" + ((count > 1) ? "s" : "") + " were updated to use dateTimeInterval instead");
|
||||
}
|
||||
} finally {
|
||||
aboxModel.leaveCriticalSection();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
@ -190,6 +195,11 @@ public class DateTimeMigration {
|
|||
aboxModel.add(additions);
|
||||
record.recordAdditions(additions);
|
||||
|
||||
if (additions.size() > 0) {
|
||||
logger.log(additions.size() + " date/time assertions" +
|
||||
((additions.size() > 1) ? "s" : "") +
|
||||
" were updated to the 1.2 representation.");
|
||||
}
|
||||
} finally {
|
||||
aboxModel.leaveCriticalSection();
|
||||
}
|
||||
|
@ -231,8 +241,8 @@ public class DateTimeMigration {
|
|||
|
||||
public static String stmtString(Statement statement) {
|
||||
return " subject = " + statement.getSubject().getURI() +
|
||||
" property = " + statement.getPredicate().getURI() +
|
||||
" object = " + (statement.getObject().isLiteral() ? ((Literal)statement.getObject()).getLexicalForm() + " (Literal)"
|
||||
" property = " + statement.getPredicate().getURI() +
|
||||
" object = " + (statement.getObject().isLiteral() ? ((Literal)statement.getObject()).getLexicalForm() + " (Literal)"
|
||||
: ((Resource)statement.getObject()).getURI() + " (Resource)");
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue