本文整理汇总了Java中org.neo4j.graphdb.traversal.Evaluation.EXCLUDE_AND_CONTINUE属性的典型用法代码示例。如果您正苦于以下问题:Java Evaluation.EXCLUDE_AND_CONTINUE属性的具体用法?Java Evaluation.EXCLUDE_AND_CONTINUE怎么用?Java Evaluation.EXCLUDE_AND_CONTINUE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.neo4j.graphdb.traversal.Evaluation
的用法示例。
在下文中一共展示了Evaluation.EXCLUDE_AND_CONTINUE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evaluate
@Override
public Evaluation evaluate(Path path) {
Node lastNode = path.endNode();
if (!lastNode.hasLabel(Labels.AirportDay)){
return Evaluation.EXCLUDE_AND_CONTINUE;
} else if (destinations.contains( ((String)lastNode.getProperty("key")).substring(0,3) )) {
return Evaluation.INCLUDE_AND_PRUNE;
}
return Evaluation.EXCLUDE_AND_CONTINUE;
}
示例2: evaluate
@Override
public Evaluation evaluate(Path path) {
if (path.length() < length) {
return Evaluation.EXCLUDE_AND_CONTINUE;
}
Node lastNode = path.endNode();
if (!lastNode.hasLabel(Labels.AirportDay)){
return Evaluation.EXCLUDE_AND_CONTINUE;
} else if (destinations.contains( ((String)lastNode.getProperty("key")).substring(0,3) )) {
return Evaluation.INCLUDE_AND_PRUNE;
}
return Evaluation.EXCLUDE_AND_PRUNE;
}
示例3: evaluate
@Override
public Evaluation evaluate(Path path) {
if (!path.endNode().hasRelationship(Direction.OUTGOING)) {
leaves++;
depthSum += path.length();
}
return Evaluation.EXCLUDE_AND_CONTINUE;
}
示例4: evaluate
@Override
public Evaluation evaluate( Path path, BranchState<StepState> state )
{
int currentStep = state.getState().step();
int stepStateState = state.getState().state();
while ( true )
{
StepEvaluationResult result = stepEvaluators[currentStep].evaluate( path, stepStateState );
switch ( result.stepEvaluation() )
{
case REJECT_STAY_EXCLUDE_PRUNE:
/*
* evaluator failed fatally
*/
return Evaluation.EXCLUDE_AND_PRUNE;
case REJECT_ADVANCE_EXCLUDE_CONTINUE:
/*
* evaluator failed & exhausted
* advance evaluator immediately (current step) & retry
*/
currentStep++;
stepStateState = result.stepState();
continue;
case ACCEPT_ADVANCE_EXCLUDE_CONTINUE:
/*
* evaluator succeeded & exhausted
* advance evaluator for next step
*/
currentStep++;
state.setState( new StepState( currentStep, result.stepState() ) );
return Evaluation.EXCLUDE_AND_CONTINUE;
case ACCEPT_STAY_EXCLUDE_CONTINUE:
/*
* evaluator succeeded but not exhausted
* reuse evaluator @ next step
*/
state.setState( new StepState( currentStep, result.stepState() ) );
return Evaluation.EXCLUDE_AND_CONTINUE;
case ACCEPT_STAY_INCLUDE_CONTINUE:
/*
* final evaluator succeeded but not exhausted
* return path & reuse evaluator @ next step
*/
state.setState( new StepState( currentStep, result.stepState() ) );
return Evaluation.INCLUDE_AND_CONTINUE;
case ACCEPT_ADVANCE_INCLUDE_PRUNE:
/*
* final evaluator succeeded & exhausted
* return path
*/
return Evaluation.INCLUDE_AND_PRUNE;
}
}
}
示例5: evaluate
public Evaluation evaluate( Path path )
{
return filter.accept( path ) ? Evaluation.INCLUDE_AND_CONTINUE : Evaluation.EXCLUDE_AND_CONTINUE;
}
示例6: evaluate
@Override
public Evaluation evaluate(Path path) {
Node end = path.endNode();
Rank r = Rank.values()[(int) end.getProperty(NeoProperties.RANK, Rank.UNRANKED.ordinal())];
return r.isLinnean() ? Evaluation.INCLUDE_AND_CONTINUE : Evaluation.EXCLUDE_AND_CONTINUE;
}
示例7: evaluate
@Override
public Evaluation evaluate(Path path) {
Node end = path.endNode();
return end.hasLabel(Labels.SYNONYM) ? Evaluation.EXCLUDE_AND_CONTINUE : Evaluation.INCLUDE_AND_CONTINUE;
}
示例8: evaluate
@Override
public Evaluation evaluate(Path path) {
return evaluateNode(path.endNode()) ? Evaluation.INCLUDE_AND_CONTINUE : Evaluation.EXCLUDE_AND_CONTINUE;
}
示例9: evaluate
/**
* note: we maybe can also utilise the qualified attribute __LITERAL__ here or the __LITERAL__ node label;
*
* @param path
* @return
*/
@Override
public Evaluation evaluate(final Path path) {
if(path.length() < 1) {
return Evaluation.EXCLUDE_AND_CONTINUE;
}
if(path.lastRelationship().getStartNode().getId() != subjectNodeId) {
return Evaluation.EXCLUDE_AND_CONTINUE;
}
if(path.endNode().hasRelationship(Direction.OUTGOING)) {
return Evaluation.EXCLUDE_AND_PRUNE;
}
if(path.lastRelationship().hasProperty(DeltaStatics.MATCHED_PROPERTY) && Boolean.TRUE.equals(path.lastRelationship().getProperty(DeltaStatics.MATCHED_PROPERTY, null))) {
// only non-matched statements
return Evaluation.EXCLUDE_AND_PRUNE;
}
return Evaluation.INCLUDE_AND_PRUNE;
}
示例10: evaluate
@Override
public Evaluation evaluate(final Path path) {
if (path.length() > relativeAttributePathSizeAttributePathSize) {
return Evaluation.EXCLUDE_AND_PRUNE;
}
if (path.length() > currentHierarchy) {
currentHierarchy++;
}
if (path.length() < currentHierarchy) {
return Evaluation.EXCLUDE_AND_CONTINUE;
}
final Relationship lastRelationship = path.lastRelationship();
final String attributeURI = relativeAttributePathAttributes.get(currentHierarchy - 1).getUri();
// TODO: this was for debugging, or?
//lastRelationship.getType().name();
//Paths.pathToString(path, new PathPrinter());
if (!lastRelationship.isType(DynamicRelationshipType.withName(attributeURI))) {
return Evaluation.EXCLUDE_AND_PRUNE;
}
if (currentHierarchy < relativeAttributePathSizeAttributePathSize) {
return Evaluation.EXCLUDE_AND_CONTINUE;
}
return Evaluation.INCLUDE_AND_PRUNE;
}