NIHVIVO-3765 strange interaction between add type and recompute inferences
This commit is contained in:
parent
e5509654d2
commit
1ec9a67db3
2 changed files with 13 additions and 6 deletions
|
@ -41,10 +41,10 @@ public class SimpleReasonerRecomputeController extends FreemarkerHttpServlet {
|
||||||
} else {
|
} else {
|
||||||
SimpleReasoner simpleReasoner = (SimpleReasoner) sr;
|
SimpleReasoner simpleReasoner = (SimpleReasoner) sr;
|
||||||
if (simpleReasoner.isABoxReasoningAsynchronous()) {
|
if (simpleReasoner.isABoxReasoningAsynchronous()) {
|
||||||
messageStr = "SimpleReasoner is currently in asynchronous mode so a recompute cannot be started. Please try again later.";
|
messageStr = "Reasoning is currently in asynchronous mode so a recompute cannot be started. Please try again later.";
|
||||||
} else if (simpleReasoner.isRecomputing()) {
|
} else if (simpleReasoner.isRecomputing()) {
|
||||||
messageStr =
|
messageStr =
|
||||||
"The SimpleReasoner is currently in the process of " +
|
"The system is currently in the process of " +
|
||||||
"recomputing inferences.";
|
"recomputing inferences.";
|
||||||
} else {
|
} else {
|
||||||
String submit = (String)vreq.getParameter("submit");
|
String submit = (String)vreq.getParameter("submit");
|
||||||
|
|
|
@ -1560,7 +1560,7 @@ public class SimpleReasoner extends StatementListener {
|
||||||
/*
|
/*
|
||||||
* reconcile a set of inferences into the application inference model
|
* reconcile a set of inferences into the application inference model
|
||||||
*/
|
*/
|
||||||
protected synchronized boolean updateInferenceModel(Model inferenceRebuildModel) {
|
protected boolean updateInferenceModel(Model inferenceRebuildModel) {
|
||||||
|
|
||||||
log.info("Updating ABox inference model");
|
log.info("Updating ABox inference model");
|
||||||
StmtIterator iter = null;
|
StmtIterator iter = null;
|
||||||
|
@ -1684,7 +1684,7 @@ public class SimpleReasoner extends StatementListener {
|
||||||
/*
|
/*
|
||||||
* Asynchronous reasoning mode (DeltaComputer) is used in the case of batch removals.
|
* Asynchronous reasoning mode (DeltaComputer) is used in the case of batch removals.
|
||||||
*/
|
*/
|
||||||
public synchronized boolean isABoxReasoningAsynchronous() {
|
public boolean isABoxReasoningAsynchronous() {
|
||||||
if (batchMode1 || batchMode2) {
|
if (batchMode1 || batchMode2) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1696,7 +1696,14 @@ public class SimpleReasoner extends StatementListener {
|
||||||
private int eventCount = 0;
|
private int eventCount = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void notifyEvent(Model model, Object event) {
|
public void notifyEvent(Model model, Object event) {
|
||||||
|
|
||||||
|
if (event instanceof BulkUpdateEvent) {
|
||||||
|
handleBulkUpdateEvent(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void handleBulkUpdateEvent(Object event) {
|
||||||
|
|
||||||
if (event instanceof BulkUpdateEvent) {
|
if (event instanceof BulkUpdateEvent) {
|
||||||
if (((BulkUpdateEvent) event).getBegin()) {
|
if (((BulkUpdateEvent) event).getBegin()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue