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

public class AbstractRewriter<T> extends Object
The base class for rewriters. Rewriters push and pop items on the stack during processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    final T
    Get the result from the rewriter.
    final List<org.apache.jena.graph.Triple>
    rewrite(List<org.apache.jena.graph.Triple> src)
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getResult

      public final T 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

      public final List<org.apache.jena.graph.Triple> rewrite(List<org.apache.jena.graph.Triple> src)
      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.