use of org.eclipse.rdf4j.query.parser.serql.ast.ASTPathExpr in project rdf4j by eclipse.
the class QueryModelBuilder method visit.
@Override
public Object visit(ASTPathExprUnion node, Object data) throws VisitorException {
Iterator<ASTPathExpr> args = node.getPathExprList().iterator();
// Create new sub-graph pattern for optional path expressions
TupleExpr unionExpr = parseGraphPattern(args.next()).buildTupleExpr();
while (args.hasNext()) {
TupleExpr argExpr = parseGraphPattern(args.next()).buildTupleExpr();
unionExpr = new Union(unionExpr, argExpr);
}
graphPattern.addRequiredTE(unionExpr);
return null;
}
Aggregations