Class GroupUnionOfSameGraphBranchesTransform
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.GroupUnionOfSameGraphBranchesTransform
Rewrite a UNION whose multiple branches are each a single GRAPH block with the same graph reference into a single
GRAPH whose body contains a UNION of the inner branch bodies. This preserves user-intended grouping like "GRAPH ?g {
{ A } UNION { B } }" instead of rendering as "{ GRAPH ?g { A } } UNION { GRAPH ?g { B } }".
Safety: - Only rewrites when two or more UNION branches are single GRAPHs with identical graph refs. - Preserves
branch order by collapsing the first encountered group into a single GRAPH and skipping subsequent branches belonging
to the same group.
-
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
-