示例#1
0
 /**
  * rewrite source to dest and returns dest
  *
  * @param source
  * @param dest
  * @return the rewritten op.
  */
 private OpN rewriteOpN(final OpN source, final OpN dest) {
   final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);
   for (final Op o : source.getElements()) {
     o.visit(rewriter.reset());
     dest.add(rewriter.getResult());
   }
   return dest;
 }
示例#2
0
 /**
  * rewrites the left and right parts of the op2 the left part is returned the right part is placed
  * in the rewriter
  *
  * @param op2
  * @param rewriter
  * @return the rewritten op.
  */
 private Op rewriteOp2(final Op2 op2, final OpRewriter rewriter) {
   op2.getLeft().visit(rewriter.reset());
   final Op left = rewriter.getResult();
   op2.getRight().visit(rewriter.reset());
   return left;
 }