Class IrPathTriple
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.IrNode
org.eclipse.rdf4j.queryrender.sparql.ir.IrTripleLike
org.eclipse.rdf4j.queryrender.sparql.ir.IrPathTriple
Textual IR node for a property path triple: subject, path expression, object.
Path expression is stored as pre-rendered text to allow local string-level rewrites (alternation/sequence grouping,
quantifiers) without needing a full AST here. Transforms are responsible for ensuring parentheses are added only when
required for correctness; printing strips redundant outermost parentheses for stable output.
-
Field Summary
Fields inherited from class IrNode
_className -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a set of pathVars from one or more IrStatementPattern by collecting any parser bridge variables (subject/object with names starting with _anon_path_ or _anon_path_inverse_) and anonymous predicate vars.Returns the set of variables that contributed to this path during fusing (e.g., anon _anon_path_* bridges).Render the predicate or path as compact textual IR suitable for inclusion in a property path.getVars()Collect variables referenced by this node and all of its children (if any).mergePathVars(IrPathTriple... pts) Merge pathVars from 2+ IrPathTriples into a new unmodifiable set.voidDefault no-op printing; concrete nodes override.voidsetPathVars(Set<Var> vars) Assign the set of variables that contributed to this path during fusing.toString()Methods inherited from class IrTripleLike
getObject, getObjectOverride, getSubject, getSubjectOverride, setObjectOverride, setSubjectOverrideModifier and TypeMethodDescriptionvoidsetObjectOverride(IrNode objectOverride) voidsetSubjectOverride(IrNode subjectOverride) Methods inherited from class IrNode
isNewScope, setNewScope, transformChildrenModifier and TypeMethodDescriptionbooleanvoidsetNewScope(boolean newScope) Function-style child transformation hook used by the transform pipeline to descend into nested structures.
-
Constructor Details
-
IrPathTriple
-
IrPathTriple
-
-
Method Details
-
getPathText
-
getPredicateOrPathText
Description copied from class:IrTripleLikeRender the predicate or path as compact textual IR suitable for inclusion in a property path. For simple statement patterns this typically returns a compact IRI (possibly prefixed); for path triples it returns the already-rendered path text. Implementations should return null when no safe textual representation exists (e.g., non-constant predicate in a statement pattern).- Specified by:
getPredicateOrPathTextin classIrTripleLike
-
getPathVars
-
setPathVars
-
mergePathVars
Merge pathVars from 2+ IrPathTriples into a new unmodifiable set. -
fromStatementPatterns
Create a set of pathVars from one or more IrStatementPattern by collecting any parser bridge variables (subject/object with names starting with _anon_path_ or _anon_path_inverse_) and anonymous predicate vars. -
print
-
toString
-
getVars
Description copied from class:IrNodeCollect 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:
getVarsin classIrTripleLike
-