Class IrNode
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.IrNode
- Direct Known Subclasses:
IrBGP, IrBind, IrCollection, IrExists, IrFilter, IrGraph, IrInlineTriple, IrMinus, IrNot, IrOptional, IrSelect, IrService, IrSubSelect, IrText, IrTripleLike, IrUnion, IrValues
Base class for textual SPARQL Intermediate Representation (IR) nodes.
Design goals: - Keep IR nodes small and predictable; they are close to the final SPARQL surface form and
intentionally avoid carrying evaluation semantics. - Favour immutability from the perspective of transforms:
implementors should not mutate existing instances inside transforms but instead build new nodes as needed. - Provide
a single
print(IrPrinter) entry point so pretty-printing concerns are centralized in the IrPrinter
implementation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVars()Collect variables referenced by this node and all of its children (if any).booleanabstract voidDefault no-op printing; concrete nodes override.voidsetNewScope(boolean newScope) Function-style child transformation hook used by the transform pipeline to descend into nested structures.
-
Field Details
-
_className
-
-
Constructor Details
-
IrNode
public IrNode(boolean newScope)
-
-
Method Details
-
print
Default no-op printing; concrete nodes override. -
transformChildren
Function-style child transformation hook used by the transform pipeline to descend into nested structures. Contract: - Leaf nodes returnthisunchanged. - Container nodes return a new instance with their immediate children transformed using the provided operator. - Implementations must not mutatethisor its existing children. -
isNewScope
public boolean isNewScope() -
setNewScope
public void setNewScope(boolean newScope) -
getVars
-