Class IrTripleLike
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.IrNode
org.eclipse.rdf4j.queryrender.sparql.ir.IrTripleLike
- Direct Known Subclasses:
IrPathTriple, IrStatementPattern
Common abstraction for triple-like IR nodes that have subject/object variables and a textual predicate/path
representation suitable for alternation merging.
-
Field Summary
Fields inherited from class IrNode
_className -
Constructor Summary
ConstructorsConstructorDescriptionIrTripleLike(Var subject, Var object, boolean newScope) IrTripleLike(Var subject, IrNode subjectOverride, Var object, IrNode objectOverride, boolean newScope) -
Method Summary
Modifier and TypeMethodDescriptionabstract StringRender 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).voidsetObjectOverride(IrNode objectOverride) voidsetSubjectOverride(IrNode subjectOverride) Methods inherited from class IrNode
isNewScope, print, setNewScope, transformChildren
-
Constructor Details
-
IrTripleLike
-
IrTripleLike
-
-
Method Details
-
getSubject
-
getObject
-
getSubjectOverride
-
setSubjectOverride
-
getObjectOverride
-
setObjectOverride
-
getPredicateOrPathText
Render 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). -
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.
-