}
private Operator parseQuery(final String query) throws Throwable {
this.statusBar.setText("Parsing query ...");
SimpleNode root = SPARQL1_1Parser.parse(query); // get root node...
((VisualGraphOperatorWithPrefix) this.visualGraphs.get(0)).prefix
.registerElementsInPrefixInstance(root);
// get coreSPARQL query...
final boolean[] rules = { true, true, true, true, true, true, true,
true, true, true, true, true, true, true, false , true, true, true};
final SPARQL2CoreSPARQLParserVisitorImplementationDumper spvid = SPARQL2CoreSPARQLParserVisitorImplementationDumper.createInstance(rules);
final String corequery = spvid.visit(root);
// get root node of coreSPARQL query...
root = SPARQL1_1Parser.parse(corequery);
// generate VisualQuery and get root element of it...
final VisualQueryGenerator vqg = new VisualQueryGenerator(
((VisualGraphOperatorWithPrefix) this.visualGraphs.get(0)).prefix);
final Operator rootNode = (Operator) root.jjtAccept(
(SPARQL1_1ParserVisitor) vqg, null);
rootNode.setParents();
this.statusBar.clear();