}
@Override
public void caseAGroupOrUnionGraphPattern(AGroupOrUnionGraphPattern node) {
if (node.getUnionGraphPattern() != null) {
Expression lhs = getExpressionWithEmptyConstraint(
(org.jrdf.sparql.parser.node.Node) node.getGroupGraphPattern().clone());
LinkedList<PUnionGraphPattern> unionGraphPattern = node.getUnionGraphPattern();
List<Expression> expressions = new ArrayList<Expression>();
for (PUnionGraphPattern pUnionGraphPattern : unionGraphPattern) {
Expression rhs = getExpressionWithEmptyConstraint(
(org.jrdf.sparql.parser.node.Node) pUnionGraphPattern.clone());
expressions.add(rhs);
}
Expression lhsSide = lhs;
for (Expression currentExpression : expressions) {
lhsSide = new Union(lhsSide, currentExpression);
}
expression = lhsSide;
} else {