Class OpRewriter
java.lang.Object
org.apache.jena.permissions.query.rewriter.OpRewriter
- All Implemented Interfaces:
OpVisitor
This class rewrites the query by examining each operation in the algebra
returned by the Jena SPARQL parser.
This implementation inserts security evaluator checks where necessary.
-
Constructor Summary
ConstructorsConstructorDescriptionOpRewriter
(SecurityEvaluator securityEvaluator, String graphIRI) ConstructorOpRewriter
(SecurityEvaluator securityEvaluator, Node graphIRI) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the result of the rewrite.reset()
Reset the rewriter to the initial state.void
rewrites the subop of assign.void
void
visit
(OpConditional opCondition) Rewrite left and rightvoid
visit
(OpDatasetNames dsNames) returns the dsNamesvoid
Rewrite left and rightvoid
visit
(OpDisjunction opDisjunction) Rewrite sequence elementsvoid
visit
(OpDistinct opDistinct) rewrites the subop of distinctvoid
Returns the Extvoid
rewrites the subop of extend.void
rewrites the subop of filter.void
rewrites the subop of graph.void
rewrites the subop of group.void
Parses the joins and recursively calls the left and right partsvoid
returns the labelvoid
void
visit
(OpLeftJoin opLeftJoin) Parses the joins and recursively calls the left and right partsvoid
rewrites the subop of list.void
Rewrite left and rightvoid
returns the nullvoid
rewrites the subop of order.void
Returns the pathvoid
visit
(OpProcedure opProc) rewrites the subop of proc.void
rewrites the subop of project.void
visit
(OpPropFunc opPropFunc) rewrites the subop of propFunc.void
Returns the quadvoid
visit
(OpQuadBlock quadBlock) void
visit
(OpQuadPattern quadPattern) Returns the quadpatternvoid
rewrites the subop of reduced.void
visit
(OpSequence opSequence) Rewrite sequence elementsvoid
returns the servicevoid
rewrites the subop of slice This also handles the limit casevoid
returns the tablevoid
rewrites the subop of top.void
Converts to BGPvoid
Rewrite left and right
-
Constructor Details
-
OpRewriter
Constructor- Parameters:
securityEvaluator
- The security evaluator to usegraphIRI
- The IRI for the default graph.
-
OpRewriter
Constructor- Parameters:
securityEvaluator
- The security evaluator to usegraphIRI
- The IRI for the default graph.
-
-
Method Details
-
getResult
Get the result of the rewrite.- Returns:
- the resulting operator
-
reset
Reset the rewriter to the initial state.- Returns:
- this rewriter for chaining.
-
visit
rewrites the subop of assign. -
visit
- Specified by:
visit
in interfaceOpVisitor
- Throws:
ReadDeniedException
AuthenticationRequiredException
-
visit
-
visit
Rewrite left and right -
visit
returns the dsNames -
visit
Rewrite left and right -
visit
Rewrite sequence elements -
visit
rewrites the subop of distinct -
visit
Returns the Ext -
visit
rewrites the subop of extend. -
visit
rewrites the subop of filter. -
visit
rewrites the subop of graph. -
visit
rewrites the subop of group. -
visit
Parses the joins and recursively calls the left and right parts -
visit
returns the label -
visit
Parses the joins and recursively calls the left and right parts -
visit
rewrites the subop of list. -
visit
Rewrite left and right -
visit
returns the null -
visit
rewrites the subop of order. -
visit
Returns the path -
visit
rewrites the subop of proc. -
visit
rewrites the subop of project. -
visit
rewrites the subop of propFunc. -
visit
Returns the quad -
visit
Returns the quadpattern -
visit
rewrites the subop of reduced. -
visit
Rewrite sequence elements -
visit
returns the service -
visit
rewrites the subop of slice This also handles the limit case -
visit
returns the table -
visit
rewrites the subop of top. -
visit
Converts to BGP -
visit
Rewrite left and right -
visit
-