Class FuseUnionOfSimpleTriplesTransform
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.FuseUnionOfSimpleTriplesTransform
Fuse a UNION whose branches are each a single simple triple (optionally inside the same GRAPH) into a single path
alternation: ?s (p1|^p2|...) ?o . If branches are GRAPH-wrapped with identical graph var/IRI, the alternation is
produced inside that GRAPH block.
Scope/safety: - This transform only merges UNIONs that are NOT marked as introducing a new scope. We do not apply the
new-scope special case here because these are not NPS branches, and there is no guarantee that the scope originates
from parser-generated path bridges; being conservative avoids collapsing user-visible variables. - Each branch must
be a single IrStatementPattern (or GRAPH with a single IrStatementPattern), endpoints must align (forward or
inverse), and graph refs must match.
-
Field Summary
Fields inherited from class BaseTransform
ANON_PATH_INVERSE_PREFIX, ANON_PATH_PREFIX -
Method Summary
Methods inherited from class BaseTransform
bgpWithLines, branchHasAnonPathBridge, copyAllExcept, fuseAdjacentPtThenPt, fuseAdjacentSpThenPt, fuseAltInverseTailBGP, fusePtSpPtSequence, invertNegatedPropertySet, iri, isAnonPathInverseVar, isAnonPathVar, isConstantIriPredicate, joinPathWithLaterSp, mergeNpsMembers, normalizeCompactNps, orientBareNpsForNext, rewriteContainers, sameVar, sameVarOrValue, unionBranchesAllHaveAnonPathBridge, unionBranchesShareAnonPathVarWithAllowedRoleMapping, unionBranchesShareCommonAnonPathVarName, unionIsExplicitAndAllBranchesScoped, varOrValue
-
Method Details
-
apply
-