Module org.apache.jena.querybuilder
Class AbstractRewriter<T>
java.lang.Object
org.apache.jena.arq.querybuilder.rewriters.AbstractRewriter<T>
- Type Parameters:
T
- The type of object being rewritten.
- Direct Known Subclasses:
ElementRewriter
,ExprRewriter
,PathRewriter
The base class for rewriters.
Rewriters push and pop items on the stack during processing.
-
Method Summary
Modifier and TypeMethodDescriptionfinal T
Get the result from the rewriter.final List<org.apache.jena.graph.Triple>
Rewrite a list of triples.final org.apache.jena.graph.Triple
rewrite
(org.apache.jena.graph.Triple t) Rewrite a triple.org.apache.jena.sparql.core.TriplePath
rewrite
(org.apache.jena.sparql.core.TriplePath t) Rewrite a triple path.final org.apache.jena.sparql.core.VarExprList
rewrite
(org.apache.jena.sparql.core.VarExprList lst) Rewrite a variable expression list.
-
Method Details
-
getResult
Get the result from the rewriter. Returns the top of the stack.- Returns:
- The final result or null if there is no answer.
-
rewrite
public org.apache.jena.sparql.core.TriplePath rewrite(org.apache.jena.sparql.core.TriplePath t) Rewrite a triple path.- Parameters:
t
- The triple path to rewrite.- Returns:
- the triple path after rewriting.
-
rewrite
public final org.apache.jena.graph.Triple rewrite(org.apache.jena.graph.Triple t) Rewrite a triple.- Parameters:
t
- The triple to rewrite.- Returns:
- The rewritten triple.
-
rewrite
Rewrite a list of triples.- Parameters:
src
- The list of triples to rewrite.- Returns:
- The list of rewritten triples.
-
rewrite
public final org.apache.jena.sparql.core.VarExprList rewrite(org.apache.jena.sparql.core.VarExprList lst) Rewrite a variable expression list.- Parameters:
lst
- The variable expression list.- Returns:
- the rewritten variable expression list.
-