Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.CEPWindow


        this.window = window;
    }

    public CEPWindow getWindow() {
        if ( this.window == null ) {
            this.window = new CEPWindow();
        }
        return this.window;
    }
View Full Code Here


                         boundParams,
                         dmo );

        for ( BehaviorDescr behavior : pattern.getBehaviors() ) {
            if ( behavior.getText().equals( "window" ) ) {
                CEPWindow window = new CEPWindow();
                window.setOperator( "over window:" + behavior.getSubType() );
                window.setParameter( "org.drools.workbench.models.commons.backend.rule.operatorParameterGenerator",
                                     "org.drools.workbench.models.commons.backend.rule.CEPWindowOperatorParameterDRLBuilder" );
                List<String> params = behavior.getParameters();
                if ( params != null ) {
                    int i = 1;
                    for ( String param : params ) {
                        window.setParameter( "" + i++, param );
                    }
                }
                factPattern.setWindow( window );
            }
        }
View Full Code Here

                generateConstraints( pattern );
            }
            buf.append( ")" );

            //Add CEP window definition
            CEPWindow window = pattern.getWindow();
            if ( window.isDefined() ) {
                buf.append( " " );
                buf.append( window.getOperator() );
                buf.append( buildOperatorParameterDRL( window.getParameters() ) );
            }
        }
View Full Code Here

                         boundParams,
                         dmo );

        for ( BehaviorDescr behavior : pattern.getBehaviors() ) {
            if ( behavior.getText().equals( "window" ) ) {
                CEPWindow window = new CEPWindow();
                window.setOperator( "over window:" + behavior.getSubType() );
                window.setParameter( "org.drools.workbench.models.commons.backend.rule.operatorParameterGenerator",
                                     "org.drools.workbench.models.commons.backend.rule.CEPWindowOperatorParameterDRLBuilder" );
                List<String> params = behavior.getParameters();
                if ( params != null ) {
                    int i = 1;
                    for ( String param : params ) {
                        window.setParameter( "" + i++, param );
                    }
                }
                factPattern.setWindow( window );
            }
        }
View Full Code Here

                         boundParams,
                         dmo );

        for ( BehaviorDescr behavior : pattern.getBehaviors() ) {
            if ( behavior.getText().equals( "window" ) ) {
                CEPWindow window = new CEPWindow();
                window.setOperator( "over window:" + behavior.getSubType() );
                window.setParameter( "org.drools.workbench.models.commons.backend.rule.operatorParameterGenerator",
                                     "org.drools.workbench.models.commons.backend.rule.CEPWindowOperatorParameterDRLBuilder" );
                List<String> params = behavior.getParameters();
                if ( params != null ) {
                    int i = 1;
                    for ( String param : params ) {
                        window.setParameter( "" + i++, param );
                    }
                }
                factPattern.setWindow( window );
            }
        }
View Full Code Here

                generateConstraints( pattern );
            }
            buf.append( ")" );

            //Add CEP window definition
            CEPWindow window = pattern.getWindow();
            if ( window.isDefined() ) {
                buf.append( " " );
                buf.append( window.getOperator() );
                buf.append( buildOperatorParameterDRL( window.getParameters() ) );
            }
        }
View Full Code Here

                         boundParams,
                         dmo );

        for ( BehaviorDescr behavior : pattern.getBehaviors() ) {
            if ( behavior.getText().equals( "window" ) ) {
                CEPWindow window = new CEPWindow();
                window.setOperator( "over window:" + behavior.getSubType() );
                window.setParameter( "org.drools.workbench.models.commons.backend.rule.operatorParameterGenerator",
                                     "org.drools.workbench.models.commons.backend.rule.CEPWindowOperatorParameterDRLBuilder" );
                List<String> params = behavior.getParameters();
                if ( params != null ) {
                    int i = 1;
                    for ( String param : params ) {
                        window.setParameter( "" + i++, param );
                    }
                }
                factPattern.setWindow( window );
            }
        }
View Full Code Here

                                     gctx );
            }
            buf.append( ")" );

            //Add CEP window definition
            CEPWindow window = pattern.getWindow();
            if ( window.isDefined() ) {
                buf.append( " " );
                buf.append( window.getOperator() );
                buf.append( buildOperatorParameterDRL( window.getParameters() ) );
            }
        }
View Full Code Here

                                     gctx );
            }
            buf.append( ")" );

            //Add CEP window definition
            CEPWindow window = pattern.getWindow();
            if ( window.isDefined() ) {
                buf.append( " " );
                buf.append( window.getOperator() );
                buf.append( buildOperatorParameterDRL( window.getParameters() ) );
            }
        }
View Full Code Here

        assertNull( fp1.getBoundName() );
        assertEquals( 0,
                      fp1.getNumberOfConstraints() );

        assertNotNull( fp1.getWindow() );
        CEPWindow window = fp1.getWindow();
        assertEquals( "over window:time",
                      window.getOperator() );
        assertEquals( 2,
                      window.getParameters().size() );
        assertEquals( "1d",
                      window.getParameter( "1" ) );
        assertEquals( "org.drools.workbench.models.commons.backend.rule.CEPWindowOperatorParameterDRLBuilder",
                      window.getParameter( "org.drools.workbench.models.commons.backend.rule.operatorParameterGenerator" ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.CEPWindow

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.