当前位置: 首页>>代码示例>>Java>>正文


Java Evaluation.EXCLUDE_AND_CONTINUE属性代码示例

本文整理汇总了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;
}
 
开发者ID:maxdemarzi,项目名称:neo_airlines,代码行数:10,代码来源:ReachedDestinationEvaluator.java

示例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;
}
 
开发者ID:maxdemarzi,项目名称:neo_airlines,代码行数:14,代码来源:ReachedDestinationAtEvaluator.java

示例3: evaluate

@Override
public Evaluation evaluate(Path path) {
    if (!path.endNode().hasRelationship(Direction.OUTGOING)) {
        leaves++;
        depthSum += path.length();
    }

    return Evaluation.EXCLUDE_AND_CONTINUE;
}
 
开发者ID:Glamdring,项目名称:welshare,代码行数:9,代码来源:ViralLinkDaoNeo4j.java

示例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;
        }
    }
}
 
开发者ID:alexaverbuch,项目名称:steps,代码行数:54,代码来源:StepsEvaluator.java

示例5: evaluate

public Evaluation evaluate( Path path )
{
    return filter.accept( path ) ? Evaluation.INCLUDE_AND_CONTINUE : Evaluation.EXCLUDE_AND_CONTINUE;
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:4,代码来源:TraversalDescriptionImpl.java

示例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;
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:6,代码来源:LinneanRankEvaluator.java

示例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;
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:5,代码来源:AcceptedOnlyEvaluator.java

示例8: evaluate

@Override
public Evaluation evaluate(Path path) {
  return evaluateNode(path.endNode()) ? Evaluation.INCLUDE_AND_CONTINUE : Evaluation.EXCLUDE_AND_CONTINUE;
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:4,代码来源:RankEvaluator.java

示例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;
}
 
开发者ID:dswarm,项目名称:dswarm-graph-neo4j,代码行数:32,代码来源:StatementEvaluator.java

示例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;
}
 
开发者ID:dswarm,项目名称:dswarm-graph-neo4j,代码行数:37,代码来源:EntityEvaluator.java


注:本文中的org.neo4j.graphdb.traversal.Evaluation.EXCLUDE_AND_CONTINUE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。