System.out.println("Physical optimization...");
final long physicalOptimization = evaluator.physicalOptimization();
if (mode == EvaluationMode.DEMO) {
final EvaluationDemoToolBar bottomToolBar = new EvaluationDemoToolBar(this.webdemo != DEMO_ENUM.ECLIPSE);
final Result result = (evaluator instanceof BasicIndexRuleEvaluator)? ((BasicIndexRuleEvaluator)evaluator).getResultOperator() : ((CommonCoreQueryEvaluator<Node>)evaluator).getResultOperator();
final ShowResult sr = new ShowResult(bottomToolBar, result);
evaluator.prepareForQueryDebugSteps(bottomToolBar);
System.out.println("Evaluate query ...");
final Thread thread = new Thread() {
@Override
public void run() {
try {
evaluator.evaluateQueryDebugSteps(bottomToolBar, sr);
bottomToolBar.endOfEvaluation();
Demo_Applet.this.enableOrDisableButtons(evaluation instanceof SPARQLEvaluation);
} catch (final Exception e) {
System.err
.println(e);
e.printStackTrace();
}
}
};
bottomToolBar.setEvaluationThread(thread);
thread.start();
final BasicOperator root = (evaluator instanceof BasicIndexRuleEvaluator)? ((BasicIndexRuleEvaluator)evaluator).getRootNode() :((CommonCoreQueryEvaluator<Node>) evaluator).getRootNode();
this.operatorGraphViewer = new Viewer(
new GraphWrapperBasicOperator(
root),
this.prefixInstance,
"Evaluation Demo",
false,
this.webdemo != DEMO_ENUM.ECLIPSE,
bottomToolBar);
bottomToolBar.setOperatorGraphViewer(this.operatorGraphViewer);
} else {
final JTextArea ta_prefixes = new JTextArea();
ta_prefixes.setEditable(false);
ta_prefixes.setFont(new Font("Courier New", Font.PLAIN, 12));