Package com.espertech.esper.pattern

Examples of com.espertech.esper.pattern.PatternLevelAnnotationFlags


            {
                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
        {
            throw new IllegalStateException("Invalid AST type node, cannot map to stream specification");
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();
            PatternLevelAnnotationFlags flags = getPatternFlags(node.getChild(0));
            streamSpec = new PatternStreamSpecRaw(evalNode, ViewSpec.toArray(viewSpecs), streamName, options, flags.isSuppressSameEventMatches(), flags.isDiscardPartialsOnMatch());
            astPatternNodeMap.clear();
        }
        else if (node.getChild(0).getType() == DATABASE_JOIN_EXPR)
        {
            Tree dbrootNode = node.getChild(0);
View Full Code Here

        viewSpecs.clear();
        statementSpec.getStreamSpecs().add(streamSpec);
    }

    private PatternLevelAnnotationFlags getPatternFlags(Tree node) {
        PatternLevelAnnotationFlags flags = new PatternLevelAnnotationFlags();
        if (node.getChildCount() > 1) {
            for (int i = 1; i < node.getChildCount(); i++) {
                AnnotationDesc desc = ASTAnnotationHelper.walk(node.getChild(i), engineImportService);
                PatternLevelAnnotationUtil.validateSetFlags(flags, desc.getName());
            }
View Full Code Here

            if ((astPatternNodeMap.size() > 1) || ((astPatternNodeMap.isEmpty()))) {
                throw ASTWalkException.from("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(ctx.patternInclusionExpression().annotationEnum());
            streamSpec = new PatternStreamSpecRaw(evalNode, ViewSpec.toArray(viewSpecs), streamAsName, new StreamSpecOptions(), flags.isSuppressSameEventMatches(), flags.isDiscardPartialsOnMatch());
            astPatternNodeMap.clear();
        }
        else {
            throw new IllegalStateException("Invalid AST type node, cannot map to stream specification");
        }
View Full Code Here

            }
            EsperEPL2GrammarParser.PatternInclusionExpressionContext pctx = (EsperEPL2GrammarParser.PatternInclusionExpressionContext) ctx.getChild(0);

            // Get expression node sub-tree from the AST nodes placed so far
            EvalFactoryNode evalNode = astPatternNodeMap.values().iterator().next();
            PatternLevelAnnotationFlags flags = getPatternFlags(pctx.annotationEnum());
            streamSpec = new PatternStreamSpecRaw(evalNode, ViewSpec.toArray(viewSpecs), streamName, options, flags.isSuppressSameEventMatches(), flags.isDiscardPartialsOnMatch());
            astPatternNodeMap.clear();
        }
        else if (ctx.databaseJoinExpression() != null) {
            EsperEPL2GrammarParser.DatabaseJoinExpressionContext dbctx = ctx.databaseJoinExpression();
            String dbName = dbctx.i.getText();
View Full Code Here

            ASTExprHelper.exprCollectAddSubNodesAddParentNode(previousNode, ctx, astExprNodeMap);
        }
    }

    private PatternLevelAnnotationFlags getPatternFlags(List<EsperEPL2GrammarParser.AnnotationEnumContext> ctxList) {
        PatternLevelAnnotationFlags flags = new PatternLevelAnnotationFlags();
        if (ctxList != null) {
            for (EsperEPL2GrammarParser.AnnotationEnumContext ctx : ctxList) {
                AnnotationDesc desc = ASTAnnotationHelper.walk(ctx, engineImportService);
                PatternLevelAnnotationUtil.validateSetFlags(flags, desc.getName());
            }
View Full Code Here

TOP

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

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.