Examples of EvalFactoryNode


Examples of com.espertech.esper.pattern.EvalFactoryNode

    }

    private void leavePatternNot(Tree node)
    {
        log.debug(".leavePatternNot");
        EvalFactoryNode notNode = this.patternNodeFactory.makeNotNode();
        addEvalNodeExpression(notNode, node);
    }
View Full Code Here

Examples of com.espertech.esper.pattern.EvalFactoryNode

            objectName = GuardEnum.WHILE_GUARD.getName();
            obsParameters = ASTExprHelper.getExprNodes(node, 1, astExprNodeMap);
        }

        PatternGuardSpec guardSpec = new PatternGuardSpec(objectNamespace, objectName, obsParameters);
        EvalFactoryNode guardNode = patternNodeFactory.makeGuardNode(guardSpec);
        addEvalNodeExpression(guardNode, node);
    }
View Full Code Here

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

Examples of com.espertech.esper.pattern.EvalFactoryNode

        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

Examples of com.espertech.esper.pattern.EvalFactoryNode

                }
                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 = servicesContext.getPatternNodeFactory().makeFilterNode(filter.getFilterSpecRaw(), filter.getOptionalFilterAsName(), 0);
            ContextDetailConditionPattern pattern = new ContextDetailConditionPattern(factoryNode, true);
            Pair<MatchEventSpec, Set<String>> matches = validatePatternContextConditionPattern(statementContext, pattern, eventTypesReferenced, priorMatches, priorAllTags);
            return new ContextDetailMatchPair(pattern, matches.getFirst(), matches.getSecond());
        }
        else {
View Full Code Here

Examples of com.espertech.esper.pattern.EvalFactoryNode

        return StatementSpecMapper.unmap(node);
    }

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

Examples of com.espertech.esper.pattern.EvalFactoryNode

                }
                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 = servicesContext.getPatternNodeFactory().makeFilterNode(filter.getFilterSpecRaw(), filter.getOptionalFilterAsName(), 0);
            ContextDetailConditionPattern pattern = new ContextDetailConditionPattern(factoryNode, true, false);
            Pair<MatchEventSpec, Set<String>> matches = validatePatternContextConditionPattern(statementContext, pattern, eventTypesReferenced, priorMatches, priorAllTags);
            return new ContextDetailMatchPair(pattern, matches.getFirst(), matches.getSecond());
        }
        else if (endpoint instanceof ContextDetailConditionImmediate) {
View Full Code Here

Examples of com.espertech.esper.pattern.EvalFactoryNode

        if (parent.getType() == EsperEPL2Ast.CRONTAB_LIMIT_EXPR_PARAM) {
            List<ExprNode> crontab = ASTExprHelper.getRemoveAllChildExpr(parent, astExprNodeMap);
            return new ContextDetailConditionCrontab(crontab, immediate);
        }
        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

Examples of com.espertech.esper.pattern.EvalFactoryNode

        }

        // 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

Examples of com.espertech.esper.pattern.EvalFactoryNode

            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();
            PatternLevelAnnotationFlags flags = getPatternFlags(node.getChild(0));
            streamSpec = new PatternStreamSpecRaw(evalNode, ViewSpec.toArray(viewSpecs), streamAsName, new StreamSpecOptions(), flags.isSuppressSameEventMatches(), flags.isDiscardPartialsOnMatch());
            astPatternNodeMap.clear();
        }
        else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.