Class ApplyNegatedPropertySetTransform
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.ApplyNegatedPropertySetTransform
Form negated property sets (NPS) from simple shapes involving a predicate variable constrained by NOT IN or a chain
of
!= filters, optionally followed by a constant-predicate tail step that is fused. Also contains GRAPH-aware
variants so that common IR orders like GRAPH, FILTER, GRAPH can be handled.
Safety: - Requires the filtered predicate variable to be a parser-generated _anon_path_* var. - Only fuses
constant-predicate tails; complex tails are left to later passes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
Fields inherited from class BaseTransform
ANON_PATH_INVERSE_PREFIX, ANON_PATH_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionstatic IrBGPapply(IrBGP bgp, TupleExprIRRenderer r) findTripleWithPredicateVar(IrBGP w, String varName) static StringjoinIrisWithPreferredOrder(List<String> tokens, TupleExprIRRenderer r) parseNegatedSetText(String condText) Parse either "?static IrBGPMethods 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
-
rewriteSimpleNpsOnly
-
parseNegatedSetText
Parse either "?p NOT IN (a, b, ...)" or a conjunction of inequalities into a negated property set. -
findTripleWithConstPredicateReusingObject
public static ApplyNegatedPropertySetTransform.MatchTriple findTripleWithConstPredicateReusingObject(IrBGP w, Var obj) -
findTripleWithPredicateVar
public static ApplyNegatedPropertySetTransform.MatchTriple findTripleWithPredicateVar(IrBGP w, String varName) -
joinIrisWithPreferredOrder
-