Class MergeOptionalIntoPrecedingGraphTransform

java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.MergeOptionalIntoPrecedingGraphTransform

public final class MergeOptionalIntoPrecedingGraphTransform extends BaseTransform
Merge a simple OPTIONAL body that explicitly targets the same GRAPH as the preceding GRAPH block into that block, i.e., GRAPH ?g { ... } OPTIONAL { GRAPH ?g { simple } } → GRAPH ?g { ... OPTIONAL { simple } } Only applies to "simple" OPTIONAL bodies to avoid changing intended scoping or reordering more complex shapes.
  • Method Details

    • apply

      public static IrBGP apply(IrBGP bgp)
    • isSimpleOptionalBody

      public static boolean isSimpleOptionalBody(IrBGP ow)