Package com.espertech.esper.pattern

Examples of com.espertech.esper.pattern.EvalFactoryNode


        String objectNamespace = node.getChild(0).getText();
        String objectName = node.getChild(1).getText();
        List<ExprNode> obsParameters = ASTExprHelper.getExprNodes(node, 2, astExprNodeMap);

        PatternObserverSpec observerSpec = new PatternObserverSpec(objectNamespace, objectName, obsParameters);
        EvalFactoryNode observerNode = this.patternNodeFactory.makeObserverNode(observerSpec);
        addEvalNodeExpression(observerNode, node);
    }
View Full Code Here


        if ((node.getChildCount() == 2) && (hasRange) && (!tightlyBound))
        {
            throw new ASTWalkException("Variable bounds repeat operator requires an until-expression");
        }

        EvalFactoryNode fbNode = this.patternNodeFactory.makeMatchUntilNode(low, high);
        addEvalNodeExpression(fbNode, node);
    }
View Full Code Here

                }
                return new ContextDetailMatchPair(filter, matchEventSpec, allTags);
            }

            // compile as pattern if there are prior matches to consider, since this is a type of followed-by relationship
            EvalFactoryNode factoryNode = services.getPatternNodeFactory().makeFilterNode(filter.getFilterSpecRaw(), filter.getOptionalFilterAsName(), 0);
            ContextDetailConditionPattern pattern = new ContextDetailConditionPattern(factoryNode, true);
            Pair<MatchEventSpec, Set<String>> matches = validatePatternContextConditionPattern(pattern, eventTypesReferenced, priorMatches, priorAllTags);
            return new ContextDetailMatchPair(pattern, matches.getFirst(), matches.getSecond());
        }
        else {
View Full Code Here

        return StatementSpecMapper.unmap(node);
    }

    public PatternExpr compilePatternToSODA(String expression) throws EPException
    {
        EvalFactoryNode node = compilePatternToNode(expression);
        return StatementSpecMapper.unmap(node);
    }
View Full Code Here

        return StatementSpecMapper.unmap(node);
    }

    public PatternExpr compilePatternToSODA(String expression) throws EPException
    {
        EvalFactoryNode node = compilePatternToNode(expression);
        return StatementSpecMapper.unmap(node);
    }
View Full Code Here

                }
                return new ContextDetailMatchPair(filter, matchEventSpec);
            }

            // compile as pattern if there are prior matches to consider, since this is a type of followed-by relationship
            EvalFactoryNode factoryNode = services.getPatternNodeFactory().makeFilterNode(filter.getFilterSpecRaw(), filter.getOptionalFilterAsName(), 0);
            ContextDetailConditionPattern pattern = new ContextDetailConditionPattern(factoryNode, true);
            MatchEventSpec matches = validatePatternContextConditionPattern(pattern, eventTypesReferenced, priorMatches);
            return new ContextDetailMatchPair(pattern, matches);
        }
        else {
View Full Code Here

        if (parent.getType() == EsperEPL2Ast.CRONTAB_LIMIT_EXPR_PARAM) {
            List<ExprNode> crontab = ASTExprHelper.getRemoveAllChildExpr(parent, astExprNodeMap);
            return new ContextDetailConditionCrontab(crontab);
        }
        else if (parent.getType() == EsperEPL2Ast.CREATE_CTX_PATTERN) {
            EvalFactoryNode evalNode = astPatternNodeMap.remove(parent.getChild(0).getChild(0));
            boolean inclusive = false;
            if (parent.getChildCount() > 1) {
                String ident = parent.getChild(1).getText();
                if (ident != null && !ident.toLowerCase().equals("inclusive")) {
                    throw new ASTWalkException("Expected 'inclusive' keyword after '@', found '" + ident + "' instead");
View Full Code Here

        }

        // For each AST child node of this AST node that generated an EvalNode add the EvalNode as a child
        if (!astPatternNodeMap.isEmpty())
        {
            EvalFactoryNode thisPatternNode = astPatternNodeMap.get(node);
            for (int i = 0; i < node.getChildCount(); i++)
            {
                Tree childNode = node.getChild(i);
                EvalFactoryNode childEvalNode = astPatternNodeMap.get(childNode);
                if (childEvalNode != null)
                {
                    thisPatternNode.addChildNode(childEvalNode);
                    astPatternNodeMap.remove(childNode);
                }
View Full Code Here

            if ((astPatternNodeMap.size() > 1) || ((astPatternNodeMap.isEmpty())))
            {
                throw new ASTWalkException("Unexpected AST tree contains zero or more then 1 child elements for root");
            }
            // Get expression node sub-tree from the AST nodes placed so far
            EvalFactoryNode evalNode = astPatternNodeMap.values().iterator().next();
            streamSpec = new PatternStreamSpecRaw(evalNode, evalNodeExpressions, viewSpecs, streamAsName, new StreamSpecOptions());
            if (evalNodeExpressions != null) {
                evalNodeExpressions = new HashMap<EvalFactoryNode, String>();
            }
            astPatternNodeMap.clear();
View Full Code Here

        {
            throw new ASTWalkException("Unexpected AST tree contains zero or more then 1 child elements for root");
        }

        // Get expression node sub-tree from the AST nodes placed so far
        EvalFactoryNode evalNode = astPatternNodeMap.values().iterator().next();

        PatternStreamSpecRaw streamSpec = new PatternStreamSpecRaw(evalNode, evalNodeExpressions, new LinkedList<ViewSpec>(), null, new StreamSpecOptions());
        if (evalNodeExpressions != null) {
            evalNodeExpressions = new HashMap<EvalFactoryNode, String>();
        }
View Full Code Here

TOP

Related Classes of com.espertech.esper.pattern.EvalFactoryNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.