BlankNodeVarProcessor.process(qc);
TupleExpr tupleExpr = buildQueryModel(qc);
ParsedQuery query;
ASTQuery queryNode = qc.getQuery();
if (queryNode instanceof ASTSelectQuery) {
query = new ParsedTupleQuery(tupleExpr);
}
else if (queryNode instanceof ASTConstructQuery) {
query = new ParsedGraphQuery(tupleExpr, prefixes);
}
else if (queryNode instanceof ASTAskQuery) {
query = new ParsedBooleanQuery(tupleExpr);
}
else if (queryNode instanceof ASTDescribeQuery) {
query = new ParsedGraphQuery(tupleExpr, prefixes);
}
else {
throw new RuntimeException("Unexpected query type: " + queryNode.getClass());
}
// Handle dataset declaration
Dataset dataset = DatasetDeclProcessor.process(qc);
if (dataset != null) {