use of org.eclipse.rdf4j.query.parser.serql.ast.ASTWhere in project rdf4j by eclipse.
the class QueryModelBuilder method visit.
@Override
public Object visit(ASTOptPathExprTail tailNode, Object data) throws VisitorException {
List<Var> subjVars = (List<Var>) data;
// Create new sub-graph pattern for optional path expressions
graphPattern = new GraphPattern(graphPattern);
// optional path expression tail
tailNode.getOptionalTail().jjtAccept(this, subjVars);
ASTWhere whereNode = tailNode.getWhereClause();
if (whereNode != null) {
// boolean contraint on optional path expression tail
whereNode.jjtAccept(this, null);
}
graphPattern.getParent().addOptionalTE(graphPattern);
graphPattern = graphPattern.getParent();
ASTPathExprTail nextTailNode = tailNode.getNextTail();
if (nextTailNode != null) {
// branch after optional path expression tail
nextTailNode.jjtAccept(this, subjVars);
}
return null;
}
Aggregations