updating checking of simplereasoner asynchronous mode

This commit is contained in:
stellamit 2011-07-14 15:15:02 +00:00
parent 5a03e842be
commit a978437a4d

View file

@ -35,13 +35,13 @@ public class SimpleReasonerRecomputeController extends FreemarkerHttpServlet {
Object simpleReasoner = vreq.getSession().getServletContext().getAttribute(SimpleReasoner.class.getName()); Object simpleReasoner = vreq.getSession().getServletContext().getAttribute(SimpleReasoner.class.getName());
if ((simpleReasoner instanceof SimpleReasoner) && !((SimpleReasoner)simpleReasoner).isABoxReasoningAsynchronous()) { if (!(simpleReasoner instanceof SimpleReasoner)) {
messageStr = "No SimpleReasoner has been set up."; messageStr = "No SimpleReasoner has been set up.";
} else if ( ((SimpleReasoner)simpleReasoner).isABoxReasoningAsynchronous() ) {
messageStr = "mostSpecificType annotations are currently being computed and so a recompute can not be started. Please try again later.";
} else { } else {
String signal = (String) vreq.getParameter("signal"); String signal = (String) vreq.getParameter("signal");
if (simpleReasoner instanceof SimpleReasoner) {
if (((SimpleReasoner)simpleReasoner).isRecomputing()) { if (((SimpleReasoner)simpleReasoner).isRecomputing()) {
messageStr = messageStr =
"The SimpleReasoner is currently in the process of " + "The SimpleReasoner is currently in the process of " +
@ -59,9 +59,6 @@ public class SimpleReasonerRecomputeController extends FreemarkerHttpServlet {
getServletContext().setAttribute("restart", "showButton"); getServletContext().setAttribute("restart", "showButton");
} }
} }
} else {
log.equals("The attribute with name " + SimpleReasoner.class.getName() + " is not an instance of SimpleReasoner");
}
} }
} catch (Exception e) { } catch (Exception e) {