NIHVIVO-1834 - a method to say whether ABox reasoning is asynchronous

This commit is contained in:
sjm222 2011-01-25 15:42:18 +00:00
parent 24d7c25fc7
commit bd9a3e41a5

View file

@ -609,9 +609,9 @@ public class SimpleReasoner extends StatementListener {
} }
} }
public static SimpleReasoner getSimpleReasonerFromServletContext( public static SimpleReasoner getSimpleReasonerFromServletContext(ServletContext ctx) {
ServletContext ctx) {
Object simpleReasoner = ctx.getAttribute("simpleReasoner"); Object simpleReasoner = ctx.getAttribute("simpleReasoner");
if (simpleReasoner instanceof SimpleReasoner) { if (simpleReasoner instanceof SimpleReasoner) {
return (SimpleReasoner) simpleReasoner; return (SimpleReasoner) simpleReasoner;
} else { } else {
@ -619,4 +619,7 @@ public class SimpleReasoner extends StatementListener {
} }
} }
public static boolean isABoxReasoningAsynchronous(ServletContext ctx) {
return (getSimpleReasonerFromServletContext(ctx) == null);
}
} }