|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.graphdb.traversal.Evaluators
public abstract class Evaluators
Common Evaluator
s useful during common traversals.
Evaluator
,
TraversalDescription
Constructor Summary | |
---|---|
Evaluators()
|
Method Summary | |
---|---|
static PathEvaluator |
all()
|
static PathEvaluator |
atDepth(int depth)
Returns an Evaluator which only includes positions at depth
and prunes everything deeper than that. |
static PathEvaluator |
endNodeIs(Evaluation evaluationIfMatch,
Evaluation evaluationIfNoMatch,
Node... possibleEndNodes)
An Evaluator which will return evaluationIfMatch if Path.endNode()
for a given path is any of nodes , else evaluationIfNoMatch . |
static PathEvaluator |
excludeStartPosition()
|
static PathEvaluator |
fromDepth(int depth)
Returns an Evaluator which only includes positions from depth
and deeper and never prunes anything. |
static PathEvaluator |
includeIfAcceptedByAny(Evaluator... evaluators)
Whereas adding Evaluator s to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode . |
static PathEvaluator |
includeIfAcceptedByAny(PathEvaluator... evaluators)
Whereas adding Evaluator s to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode . |
static PathEvaluator |
includeIfContainsAll(Node... nodes)
Evaluator which decides to include a Path if all the
nodes exist in it. |
static PathEvaluator |
includeWhereEndNodeIs(Node... nodes)
|
static PathEvaluator |
includeWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
|
static PathEvaluator |
includingDepths(int minDepth,
int maxDepth)
Returns an Evaluator which only includes positions between
depths minDepth and maxDepth . |
static PathEvaluator |
lastRelationshipTypeIs(Evaluation evaluationIfMatch,
Evaluation evaluationIfNoMatch,
RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
Returns an Evaluator which compares the type of the last relationship
in a Path to a given set of relationship types (one or more).If the type of
the last relationship in a path is of one of the given types then
evaluationIfMatch will be returned, otherwise
evaluationIfNoMatch will be returned. |
static PathEvaluator |
pruneWhereEndNodeIs(Node... nodes)
|
static PathEvaluator |
pruneWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
|
static Evaluator |
returnWhereEndNodeIs(Node... nodes)
Deprecated. use includeWhereEndNodeIs(Node...) |
static Evaluator |
returnWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
Deprecated. use includeWhereLastRelationshipTypeIs(RelationshipType, RelationshipType...) |
static PathEvaluator |
toDepth(int depth)
Returns an Evaluator which includes positions down to depth
and prunes everything deeper than that. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Evaluators()
Method Detail |
---|
public static PathEvaluator all()
public static PathEvaluator excludeStartPosition()
public static PathEvaluator toDepth(int depth)
Evaluator
which includes positions down to depth
and prunes everything deeper than that.
depth
- the max depth to traverse to.
Evaluator
which includes positions down to
depth
and prunes everything deeper than that.public static PathEvaluator fromDepth(int depth)
Evaluator
which only includes positions from depth
and deeper and never prunes anything.
depth
- the depth to start include positions from.
Evaluator
which only includes positions from
depth
and deeper and never prunes anything.public static PathEvaluator atDepth(int depth)
Evaluator
which only includes positions at depth
and prunes everything deeper than that.
depth
- the depth to start include positions from.
Evaluator
which only includes positions at
depth
and prunes everything deeper than that.public static PathEvaluator includingDepths(int minDepth, int maxDepth)
Evaluator
which only includes positions between
depths minDepth
and maxDepth
. It prunes everything deeper
than maxDepth
.
minDepth
- minimum depth a position must have to be included.maxDepth
- maximum depth a position must have to be included.
Evaluator
which only includes positions between
depths minDepth
and maxDepth
. It prunes everything deeper
than maxDepth
.public static PathEvaluator lastRelationshipTypeIs(Evaluation evaluationIfMatch, Evaluation evaluationIfNoMatch, RelationshipType type, RelationshipType... orAnyOfTheseTypes)
Evaluator
which compares the type of the last relationship
in a Path
to a given set of relationship types (one or more).If the type of
the last relationship in a path is of one of the given types then
evaluationIfMatch
will be returned, otherwise
evaluationIfNoMatch
will be returned.
evaluationIfMatch
- the Evaluation
to return if the type of the
last relationship in the path matches any of the given types.evaluationIfNoMatch
- the Evaluation
to return if the type of the
last relationship in the path doesn't match any of the given types.type
- the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes
- additional types to match the last relationship in
paths with.
Evaluator
which compares the type of the last relationship
in a Path
to a given set of relationship types.public static Evaluator returnWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
includeWhereLastRelationshipTypeIs(RelationshipType, RelationshipType...)
public static PathEvaluator includeWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
type
- the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes
- types to match the last relationship in paths with. If any matches
it's considered a match.
Evaluator
which compares the type of the last relationship
in a Path
to a given set of relationship types.Uses {@link Evaluation#INCLUDE_AND_CONTINUE} for {@code evaluationIfMatch}
and {@link Evaluation#EXCLUDE_AND_CONTINUE} for {@code evaluationIfNoMatch}.
public static PathEvaluator pruneWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
type
- the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes
- types to match the last relationship in paths with. If any matches
it's considered a match.
Evaluator
which compares the type of the last relationship
in a Path
to a given set of relationship types.Uses {@link Evaluation#INCLUDE_AND_PRUNE} for {@code evaluationIfMatch}
and {@link Evaluation#INCLUDE_AND_CONTINUE} for {@code evaluationIfNoMatch}.
public static PathEvaluator endNodeIs(Evaluation evaluationIfMatch, Evaluation evaluationIfNoMatch, Node... possibleEndNodes)
Evaluator
which will return evaluationIfMatch
if Path.endNode()
for a given path is any of nodes
, else evaluationIfNoMatch
.
evaluationIfMatch
- the Evaluation
to return if the Path.endNode()
is any of the nodes in nodes
.evaluationIfNoMatch
- the Evaluation
to return if the Path.endNode()
doesn't match any of the nodes in nodes
.possibleEndNodes
- a set of nodes to match to end nodes in paths.
Evaluator
which will return evaluationIfMatch
if
Path.endNode()
for a given path is any of nodes
,
else evaluationIfNoMatch
.public static Evaluator returnWhereEndNodeIs(Node... nodes)
includeWhereEndNodeIs(Node...)
public static PathEvaluator includeWhereEndNodeIs(Node... nodes)
nodes
- end nodes for paths to be included in the result.this#endNodeIs(Evaluation, Evaluation, Node...), uses
{@link Evaluation#INCLUDE_AND_CONTINUE} for
{@code evaluationIfMatch} and
{@link Evaluation#EXCLUDE_AND_CONTINUE} for
{@code evaluationIfNoMatch}.
public static PathEvaluator pruneWhereEndNodeIs(Node... nodes)
public static PathEvaluator includeIfContainsAll(Node... nodes)
Path
if all the
nodes
exist in it.
nodes
- Node
s that must exist in a Path
for it
to be included.
Evaluation.INCLUDE_AND_CONTINUE
if all nodes
exist in a given Path
, otherwise
Evaluation.EXCLUDE_AND_CONTINUE
.public static PathEvaluator includeIfAcceptedByAny(PathEvaluator... evaluators)
Evaluator
s to a TraversalDescription
puts those
evaluators in AND-mode
this can group many evaluators in OR-mode
.
evaluators
- represented as one evaluators. If any of the evaluators decides
to include a path it will be included.
Evaluator
which decides to include a path if any of the supplied
evaluators wants to include it.public static PathEvaluator includeIfAcceptedByAny(Evaluator... evaluators)
Evaluator
s to a TraversalDescription
puts those
evaluators in AND-mode
this can group many evaluators in OR-mode
.
evaluators
- represented as one evaluators. If any of the evaluators decides
to include a path it will be included.
Evaluator
which decides to include a path if any of the supplied
evaluators wants to include it.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |