Class IRTextPrinter

java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.IRTextPrinter
All Implemented Interfaces:
IrPrinter

public final class IRTextPrinter extends Object implements IrPrinter
Simple IR→text pretty‑printer using renderer helpers. Responsible only for layout/indentation and delegating term/IRI rendering back to the renderer; it does not perform structural rewrites (those happen in IR transforms).
  • Constructor Details

  • Method Details

    • printWhere

      public void printWhere(IrBGP w)
      Print only a WHERE block body.
    • printLines

      public void printLines(List<IrNode> lines)
      Print a sequence of IR lines (helper for containers).
      Specified by:
      printLines in interface IrPrinter
    • startLine

      public void startLine()
      Description copied from interface: IrPrinter
      Start a new logical line and prepare for inline appends. Applies indentation once.
      Specified by:
      startLine in interface IrPrinter
    • append

      public void append(String s)
      Description copied from interface: IrPrinter
      Append text to the current line (starting a new, indented line if none is active).
      Specified by:
      append in interface IrPrinter
    • endLine

      public void endLine()
      Description copied from interface: IrPrinter
      End the current line (no-op if none is active).
      Specified by:
      endLine in interface IrPrinter
    • line

      public void line(String s)
      Specified by:
      line in interface IrPrinter
    • openBlock

      public void openBlock()
      Specified by:
      openBlock in interface IrPrinter
    • closeBlock

      public void closeBlock()
      Specified by:
      closeBlock in interface IrPrinter
    • pushIndent

      public void pushIndent()
      Specified by:
      pushIndent in interface IrPrinter
    • popIndent

      public void popIndent()
      Specified by:
      popIndent in interface IrPrinter
    • convertVarToString

      public String convertVarToString(Var v)
      Specified by:
      convertVarToString in interface IrPrinter