Examples of QueryElement


Examples of org.drools.rule.QueryElement

     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {

        final QueryElement qe = (QueryElement) rce;
        context.pushRuleComponent( qe );
       
        final int currentOffset = context.getCurrentPatternOffset();
       
        qe.getResultPattern().setOffset( currentOffset );
       
        utils.checkUnboundDeclarations( context,
                                        qe.getRequiredDeclarations() );

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                    new QueryElementNode( context.getNextId(),
                                                                                          context.getTupleSource(),
                                                                                          qe,
View Full Code Here

Examples of org.drools.rule.QueryElement

        int[] varIndexesArray = new int[varIndexes.size()];
        for ( int i = 0; i < varIndexesArray.length; i++ ) {
            varIndexesArray[i] = varIndexes.get( i );
        }

        return new QueryElement( pattern,
                                 query.getName(),
                                 arguments.toArray( new Object[arguments.size()] ),
                                 declrsArray,
                                 declrIndexArray,
                                 varIndexesArray,
View Full Code Here

Examples of org.drools.rule.QueryElement

     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {

        final QueryElement qe = (QueryElement) rce;
        context.pushRuleComponent( qe );
       
        qe.getResultPattern().setOffset( context.getCurrentPatternOffset() );
       
        utils.checkUnboundDeclarations( context,
                                        qe.getRequiredDeclarations() );

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                    new QueryElementNode( context.getNextId(),
                                                                                          context.getTupleSource(),
                                                                                          qe,
View Full Code Here

Examples of org.drools.rule.QueryElement

    }

    @Test
    public void test1() {
        Pattern p = new Pattern();
        QueryElement qe = new QueryElement( p,
                                            "queryName1",
                                            new Object[]{Variable.variable, "x1", Variable.variable, "x3", "x4",Variable.variable,"x6",},
                                            new Declaration[0],
                                            new int[0],
                                            new int[] { 0, 2, 5 } );
View Full Code Here

Examples of org.drools.rule.QueryElement

     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {

        final QueryElement qe = (QueryElement) rce;
        context.pushRuleComponent( qe );
       
        final int currentOffset = context.getCurrentPatternOffset();
       
        qe.getResultPattern().setOffset( currentOffset );
       
        utils.checkUnboundDeclarations( context,
                                        qe.getRequiredDeclarations() );

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                    new QueryElementNode( context.getNextId(),
                                                                                          context.getTupleSource(),
                                                                                          qe,
                                                                                          context.isTerminalNodeMemoryEnabled(),
                                                                                          qe.isOpenQuery(),
                                                                                          context ) ) );
        context.popRuleComponent();
        context.incrementCurrentPatternOffset();
    }
View Full Code Here

Examples of org.drools.rule.QueryElement

        int[] varIndexesArray = new int[varIndexes.size()];
        for ( int i = 0; i < varIndexesArray.length; i++ ) {
            varIndexesArray[i] = varIndexes.get( i );
        }

        return new QueryElement( pattern,
                                 query.getName(),
                                 arguments.toArray( new Object[arguments.size()] ),
                                 declrsArray,
                                 declrIndexArray,
                                 varIndexesArray,
View Full Code Here

Examples of org.drools.rule.QueryElement

        int[] varIndexesArray = new int[varIndexes.size()];
        for( int i = 0; i < varIndexesArray.length; i++ ) {
            varIndexesArray[i] = varIndexes.get( i );
        }
       
        return new QueryElement( pattern,
                                 query.getName(),
                                 arguments.toArray( new Object[arguments.size()] ),
                                 declrsArray,
                                 declrIndexArray,
                                 varIndexesArray );
View Full Code Here

Examples of org.drools.rule.QueryElement

     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {

        final QueryElement qe = (QueryElement) rce;
        context.pushRuleComponent( qe );
       
        qe.getResultPattern().setOffset( context.getCurrentPatternOffset() );
       
        utils.checkUnboundDeclarations( context,
                                        qe.getRequiredDeclarations() );

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                    new QueryElementNode( context.getNextId(),
                                                                                          context.getTupleSource(),
                                                                                          qe,
View Full Code Here

Examples of org.drools.rule.QueryElement

     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {

        final QueryElement qe = (QueryElement) rce;
        context.pushRuleComponent( qe );
       
        final int currentOffset = context.getCurrentPatternOffset();
       
        qe.getResultPattern().setOffset( currentOffset );
       
        utils.checkUnboundDeclarations( context,
                                        qe.getRequiredDeclarations() );

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                    new QueryElementNode( context.getNextId(),
                                                                                          context.getTupleSource(),
                                                                                          qe,
                                                                                          context.isTupleMemoryEnabled(),
                                                                                          qe.isOpenQuery(),
                                                                                          context ) ) );
        context.popRuleComponent();
        context.incrementCurrentPatternOffset();
    }
View Full Code Here

Examples of org.drools.rule.QueryElement

        int[] varIndexesArray = new int[varIndexes.size()];
        for ( int i = 0; i < varIndexesArray.length; i++ ) {
            varIndexesArray[i] = varIndexes.get( i );
        }

        return new QueryElement( pattern,
                                 query.getName(),
                                 arguments.toArray( new Object[arguments.size()] ),
                                 declrsArray,
                                 declrIndexArray,
                                 varIndexesArray,
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.