Class IrUnion

java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.IrNode
org.eclipse.rdf4j.queryrender.sparql.ir.IrUnion

public class IrUnion extends IrNode
Textual IR node representing a UNION with multiple branches. Notes: - Each branch is an IrBGP printed as its own braced group. The printer will insert a centered UNION line between groups to match canonical style. - newScope can be used by transforms as a hint that this UNION represents an explicit user UNION that introduced a new variable scope; some fusions avoid re-association across such boundaries.
  • Constructor Details

    • IrUnion

      public IrUnion(boolean newScope)
  • Method Details

    • getBranches

      public List<IrBGP> getBranches()
    • addBranch

      public void addBranch(IrBGP w)
    • print

      public void print(IrPrinter p)
      Description copied from class: IrNode
      Default no-op printing; concrete nodes override.
      Specified by:
      print in class IrNode
    • transformChildren

      public IrNode transformChildren(UnaryOperator<IrNode> op)
      Description copied from class: IrNode
      Function-style child transformation hook used by the transform pipeline to descend into nested structures. Contract: - Leaf nodes return this unchanged. - Container nodes return a new instance with their immediate children transformed using the provided operator. - Implementations must not mutate this or its existing children.
      Overrides:
      transformChildren in class IrNode
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getVars

      public Set<Var> getVars()
      Description copied from class: IrNode
      Collect variables referenced by this node and all of its children (if any). Default implementation returns an empty set; container and triple-like nodes override to include their own Vars and recurse into child nodes.
      Overrides:
      getVars in class IrNode