}
List<SameTerm> sameTerms = new ArrayList<SameTerm>(2 * node.jjtGetNumChildren());
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
ValueExpr resource = (ValueExpr)node.jjtGetChild(i).jjtAccept(this, null);
sameTerms.add(new SameTerm(subjVar.clone(), resource));
sameTerms.add(new SameTerm(objVar.clone(), resource));
}
ValueExpr constraint = sameTerms.get(0);
for (int i = 0; i < sameTerms.size(); i++) {
constraint = new Or(constraint, sameTerms.get(i));
}
result = new Filter(result, constraint);