java.lang.Object
org.apache.jena.sparql.service.enhancer.impl.BatchQueryRewriter

public class BatchQueryRewriter extends Object
Rewriter for instantiating a query such that a list of initial bindings are injected. In general, there are several rewriting strategies for that purpose and their applicability depends on the operations used in of the query:
  • Union/Substitution strategy: The is perhaps the most reliable (and also most verbose) strategy: It creates a union query where for every input binding a union member is obtained by substituting the original query with it
  • Join strategy: The input bindings are collected into a VALUES block and placed on the left hand size of a join with an adjusted version of the original query - not yet supported
  • Filter strategy: Input bindings are turned into a disjunctive filter expression - not yet supported
  • Constructor Details

    • BatchQueryRewriter

      public BatchQueryRewriter(OpServiceInfo serviceInfo, org.apache.jena.sparql.core.Var idxVar, boolean sequentialUnion, boolean orderRetainingUnion, boolean omitEndMarker)
  • Method Details

    • isRemoteEndMarker

      public static boolean isRemoteEndMarker(int id)
    • isRemoteEndMarker

      public static boolean isRemoteEndMarker(Integer id)
    • getIdxVar

      public org.apache.jena.sparql.core.Var getIdxVar()
      The index var used by this rewriter
    • seenVars

      public static Set<org.apache.jena.sparql.core.Var> seenVars(Collection<PartitionRequest<org.apache.jena.sparql.engine.binding.Binding>> batchRequest)
    • rewrite

      public BatchQueryRewriteResult rewrite(org.apache.jena.sparql.service.enhancer.impl.Batch<Integer,PartitionRequest<org.apache.jena.sparql.engine.binding.Binding>> batchRequest)