Search in sources :

Example 1 with TraversalStepType

use of org.apache.atlas.groovy.TraversalStepType in project incubator-atlas by apache.

the class SplitPointFinder method isRequiredInResultExpression.

private boolean isRequiredInResultExpression(AbstractFunctionExpression expr) {
    TraversalStepType type = expr.getType();
    if (!TYPES_REQUIRED_IN_RESULT_EXPRESSION.contains(type)) {
        return false;
    }
    if (expr instanceof FunctionCallExpression) {
        FunctionCallExpression functionCall = (FunctionCallExpression) expr;
        //check if the white list permits this function call.  If there is
        //no white list, all expressions with the current step type must go in the
        //result expression.
        WhiteList whiteList = WHITE_LISTS.get(type);
        if (whiteList != null && whiteList.contains(functionCall.getFunctionName())) {
            return false;
        }
    }
    return true;
}
Also used : TraversalStepType(org.apache.atlas.groovy.TraversalStepType) FunctionCallExpression(org.apache.atlas.groovy.FunctionCallExpression)

Aggregations

FunctionCallExpression (org.apache.atlas.groovy.FunctionCallExpression)1 TraversalStepType (org.apache.atlas.groovy.TraversalStepType)1