OpRewriter implements OpVisitor { @Override public void visit(final OpAssign opAssign) { if (LOG.isDebugEnabled()) { LOG.debug("Starting visiting OpAssign"); } addOp(OpAssign.assign(rewriteOp1(opAssign), opAssign.getVarExprList())); } OpRewriter(final SecurityEvaluator securityEvaluator,
			final Node graphIRI);  OpRewriter(final SecurityEvaluator securityEvaluator,
			final String graphIRI); Op getResult(); OpRewriter reset(); @Override void visit(final OpAssign opAssign); @Override void visit(final OpBGP opBGP); @Override void visit(final OpConditional opCondition); @Override void visit(final OpDatasetNames dsNames); @Override void visit(final OpDiff opDiff); @Override void visit(final OpDisjunction opDisjunction); @Override void visit(final OpDistinct opDistinct); @Override void visit(final OpExt opExt); @Override void visit(final OpExtend opExtend); @Override void visit(final OpFind opFind); @Override void visit(final OpFilter opFilter); @Override void visit(final OpGraph opGraph); @Override void visit(final OpGroup opGroup); @Override void visit(final OpJoin opJoin); @Override void visit(final OpLabel opLabel); @Override void visit(final OpLeftJoin opLeftJoin); @Override void visit(final OpList opList); @Override void visit(final OpMinus opMinus); @Override void visit(final OpNull opNull); @Override void visit(final OpOrder opOrder); @Override void visit(final OpPath opPath); @Override void visit(final OpProcedure opProc); @Override void visit(final OpProject opProject); @Override void visit(final OpPropFunc opPropFunc); @Override void visit(final OpQuad opQuad); @Override void visit(final OpQuadPattern quadPattern); @Override void visit(final OpReduced opReduced); @Override void visit(final OpSequence opSequence); @Override void visit(final OpService opService); @Override void visit(final OpSlice opSlice); @Override void visit(final OpTable opTable); @Override void visit(final OpTopN opTop); @Override void visit(final OpTriple opTriple); @Override void visit(final OpUnion opUnion); @Override void visit(OpQuadBlock quadBlock);  }
@Test public void testBGPNoReadAccess() { SecurityEvaluator securityEvaluator = new MockSecurityEvaluator(true, true, false, true, true, true); rewriter = new OpRewriter(securityEvaluator, "http: Triple[] triples = { new Triple(NodeFactory.createVariable("foo"), RDF.type.asNode(), NodeFactory.createURI("http: new Triple(NodeFactory.createVariable("foo"), NodeFactory.createBlankNode(), NodeFactory.createVariable("bar")), new Triple(NodeFactory.createVariable("bar"), NodeFactory.createBlankNode(), NodeFactory.createVariable("baz")), }; try { rewriter.visit(new OpBGP(BasicPattern.wrap(Arrays.asList(triples)))); Assert.fail("Should have thrown AccessDeniedException"); } catch (ReadDeniedException e) { } }