Class OpAsQuery


public class OpAsQuery extends Object
Convert an Op expression in SPARQL syntax, that is, the reverse of algebra generation.

The contract is to return an "equivalent query" - generates the same answers - to the original query that generated the algebra. That may be the same query (the code aims for this, assuming the original query didn't have additional, unnecessary {}), different queries with the same alegra forms, or different equivalent queries - same answers, different algebra - usually where extra {} are added in and not easiely cleaned out.

Some attempt is made to handle algebra expressions with operators from the optimizer.

It is possible to build algrebra expressions directly for which there is no SPARQL query that generates that algebra. This code may produce an equivalent query but that is not guaranteed.

  • Constructor Details

    • OpAsQuery

      public OpAsQuery()
  • Method Details

    • asQuery

      public static Query asQuery(Op op)