예제 #1
0
파일: OpRewriter.java 프로젝트: apache/jena
 /** Rewrite left and right */
 @Override
 public void visit(final OpUnion opUnion) {
   if (LOG.isDebugEnabled()) {
     LOG.debug("Starting visiting OpUnion");
   }
   final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);
   addOp(OpUnion.create(rewriteOp2(opUnion, rewriter), rewriter.getResult()));
 }
예제 #2
0
파일: OpRewriter.java 프로젝트: apache/jena
 /**
  * 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;
 }
예제 #3
0
파일: OpRewriter.java 프로젝트: apache/jena
 /** rewrites the subop of graph. */
 @Override
 public void visit(final OpGraph opGraph) {
   if (LOG.isDebugEnabled()) {
     LOG.debug("Starting visiting OpGraph");
   }
   final OpRewriter rewriter = new OpRewriter(securityEvaluator, opGraph.getNode());
   opGraph.getSubOp().visit(rewriter);
   addOp(new OpGraph(opGraph.getNode(), rewriter.getResult()));
 }
예제 #4
0
파일: OpRewriter.java 프로젝트: apache/jena
 /**
  * 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;
 }
예제 #5
0
파일: OpRewriter.java 프로젝트: apache/jena
 /**
  * Rewrites the subop of op1 and returns the result.
  *
  * @param op1
  * @return the rewritten op.
  */
 private Op rewriteOp1(final Op1 op1) {
   final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);
   op1.getSubOp().visit(rewriter);
   return rewriter.getResult();
 }