}
@Override
public DebugContainerQuery<BasicOperatorByteArray, Node> compileQueryDebugByteArray(
final String query, final Prefix prefixInstance) throws ParseException {
final SimpleNode root = StreamSPARQL1_1Parser.parse(query);
if(root!=null){
for (int i = 0; i < root.jjtGetNumChildren(); ++i) {
final Node child = root.jjtGetChild(i); // get current child
if (child instanceof ASTPrefixDecl) {
// get prefix...
final String prefix = ((ASTPrefixDecl) child).getPrefix();
// get child of PrefixDecl to get the namespace...
final Node prefixDeclChild = child.jjtGetChild(0);
// if child of PrefixDecl is QuotedURIRef...
if (prefixDeclChild instanceof ASTQuotedURIRef) {
// get namespace...
final String namespace = ((ASTQuotedURIRef) prefixDeclChild).toQueryString();
// add namespace and prefix to predefined list
// of prefix instance...
prefixInstance.getPredefinedList().put(namespace, prefix);
}
}
}
}
SPARQL2CoreSPARQLParserVisitorImplementationDumper spvid;
try {
spvid = SPARQL2CoreSPARQLParserVisitorImplementationDumper.createInstance();
final String corequery = (root==null)?"":(String) spvid.visit(root);
final SimpleNode rootCoreSPARQL = StreamSPARQL1_1Parser.parse(corequery);
// checkForTimeFunc(rootCoreSPARQL);
final StreamOperatorGraphGenerator spvi = StreamOperatorGraphGenerator.createOperatorGraphGenerator(this);
spvi.visit((ASTQuery)rootCoreSPARQL);