Class QuantifiedPathPattern
java.lang.Object
org.evomaster.client.java.controller.neo4j.operations.QuantifiedPathPattern
A quantified path pattern (QPP), i.e. a sub-pattern repeated a number of times,
such as
Unlike a variable-length relationship (
The labels, relationship types, properties and inline
((a)-[:KNOWS]->(b)){1,3}.
Unlike a variable-length relationship (
*1..3), which repeats a single
edge, a QPP repeats an entire MatchPattern (multiple nodes and edges,
and possibly nested QPPs). The repetition bounds are [min, max], where a
null max means unbounded (+ or *).
The labels, relationship types, properties and inline
WHERE that constrain the
sub-pattern are kept in getConditions(), scoped to this QPP rather than mixed into
the outer operation's list — so when the calculator expands the repetition it can clone the
sub-pattern's conditions per hop.
getEntryVariable() and getExitVariable() are the outer pattern variables this
QPP splices between (e.g. a and b in (a) ((x)-[]->(y)){1,3} (b)), so the
calculator can bind the first/last repetition's boundary node to the surrounding pattern. Either
is null when there is no outer node on that side (the QPP opens or closes the pattern).
When two QPPs are directly adjacent with no node between them, the parser binds them to the same
synthesized variable, so this is never null because two QPPs happen to touch.-
Constructor Summary
ConstructorsConstructorDescriptionQuantifiedPathPattern(MatchPattern subPattern, int min, Integer max) QuantifiedPathPattern(MatchPattern subPattern, List<CypherCondition> conditions, int min, Integer max) QuantifiedPathPattern(MatchPattern subPattern, List<CypherCondition> conditions, int min, Integer max, String entryVariable, String exitVariable) -
Method Summary
Modifier and TypeMethodDescriptionReturns the conditions scoped to this sub-pattern (labels, relationship types, properties, inline WHERE), in source order.The outer variable immediately before this QPP, ornullif it opens the pattern.The outer variable immediately after this QPP, ornullif it closes the pattern.getMax()intgetMin()booleantoString()withBoundary(String newEntryVariable, String newExitVariable) Returns a copy of this QPP with its entry/exit variables replaced.
-
Constructor Details
-
QuantifiedPathPattern
-
QuantifiedPathPattern
public QuantifiedPathPattern(MatchPattern subPattern, List<CypherCondition> conditions, int min, Integer max) -
QuantifiedPathPattern
public QuantifiedPathPattern(MatchPattern subPattern, List<CypherCondition> conditions, int min, Integer max, String entryVariable, String exitVariable)
-
-
Method Details
-
getSubPattern
-
getConditions
Returns the conditions scoped to this sub-pattern (labels, relationship types, properties, inline WHERE), in source order. Empty when the sub-pattern is purely structural. -
getMin
public int getMin() -
getMax
-
isUnboundedMax
public boolean isUnboundedMax() -
getEntryVariable
The outer variable immediately before this QPP, ornullif it opens the pattern. -
getExitVariable
The outer variable immediately after this QPP, ornullif it closes the pattern. -
withBoundary
Returns a copy of this QPP with its entry/exit variables replaced. -
toString
-