Package org.apache.jena.security.query.rewriter

Examples of org.apache.jena.security.query.rewriter.OpRewriter


  }

  @Override
  protected Op modifyOp( final Op op )
  {
    final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);
    SecuredQueryEngine.LOG.debug("Before: {}", op);
    op.visit(rewriter);
    Op result = rewriter.getResult();
    result = result == null ? op : result;
    SecuredQueryEngine.LOG.debug("After: {}", result);
    result = super.modifyOp(result);
    SecuredQueryEngine.LOG.debug("After Optimize: {}", result);
    return result;
View Full Code Here


 
  @Test
  public void testBGP()
  {
    SecurityEvaluator securityEvaluator =  new MockSecurityEvaluator( true, true, true, true, true, true );
    rewriter = new OpRewriter( securityEvaluator, "http://example.com/dummy");
   
    rewriter.visit( new OpBGP( BasicPattern.wrap(Arrays.asList(triples))));
    Op op = rewriter.getResult();
    Assert.assertTrue( "Should have been an OpFilter", op instanceof OpFilter );
    OpFilter filter = (OpFilter) op;
View Full Code Here

 
  @Test
  public void testBGPNoReadAccess()
  {
    SecurityEvaluator securityEvaluator =  new MockSecurityEvaluator( true, true, false, true, true, true );
    rewriter = new OpRewriter( securityEvaluator, "http://example.com/dummy");
    Triple[] triples = {
        new Triple( NodeFactory.createVariable("foo"), RDF.type.asNode(), NodeFactory.createURI( "http://example.com/class")),
        new Triple( NodeFactory.createVariable("foo"), NodeFactory.createAnon(), NodeFactory.createVariable("bar")),
        new Triple( NodeFactory.createVariable("bar"), NodeFactory.createAnon(), NodeFactory.createVariable("baz")),
    };
View Full Code Here

TOP

Related Classes of org.apache.jena.security.query.rewriter.OpRewriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.