Package org.drools.reteoo

Examples of org.drools.reteoo.ExistsNode


            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        context ) ) );
            context.setBetaconstraints( null );


                                                              buildContext.getRuleBase().getConfiguration() );                   
                    break;                                       
                       
            }

            ExistsNode existsNode = new ExistsNode( buildContext.getNextId(),
                                                    leftTupleSource,
                                                    rightObjectSource,
                                                    constraints,
                                                    BehaviorManager.NO_BEHAVIORS,
                                                    buildContext );
            existsNode.attach();
            context.put( name,
                         existsNode );

        } else {
            throw new IllegalArgumentException( "Cannot arguments " + args );

            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        behaviors,
                                                                                        context ) ) );

            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        context ) ) );
            context.setBetaconstraints( null );

            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        behaviors,
                                                                                        context ) ) );

            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        behaviors,
                                                                                        context ) ) );

            // then attach the EXISTS node. It will work both as a simple exists node
            // or as subnetwork join node as the context was set appropriatelly
            // in each case
            context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                        new ExistsNode( context.getNextId(),
                                                                                        context.getTupleSource(),
                                                                                        context.getObjectSource(),
                                                                                        betaConstraints,
                                                                                        behaviors,
                                                                                        context ) ) );

        RightInputAdapterNode riaNode1 = (RightInputAdapterNode) queryElementNode1.getSinkPropagator().getSinks()[0];
        AccumulateNode accNode = (AccumulateNode) riaNode1.getSinkPropagator().getSinks()[0];

        QueryElementNode queryElementNode2 = (QueryElementNode) accNode.getSinkPropagator().getSinks()[0];
        RightInputAdapterNode riaNode2 = (RightInputAdapterNode) queryElementNode2.getSinkPropagator().getSinks()[0];
        ExistsNode existsNode = (ExistsNode) riaNode2.getSinkPropagator().getSinks()[0];

        QueryElementNode queryElementNode3 = (QueryElementNode) existsNode.getSinkPropagator().getSinks()[0];
        FromNode fromNode = (FromNode) queryElementNode3.getSinkPropagator().getSinks()[0];
        RightInputAdapterNode riaNode3 = (RightInputAdapterNode) fromNode.getSinkPropagator().getSinks()[0];
        NotNode notNode = (NotNode) riaNode3.getSinkPropagator().getSinks()[0];

        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

            }

            SingleBetaConstraints constraints = new SingleBetaConstraints( betaConstraint,
                                                                           buildContext.getRuleBase().getConfiguration() );

            ExistsNode existsNode = new ExistsNode( buildContext.getNextId(),
                                                    leftTupleSource,
                                                    rightObjectSource,
                                                    constraints,
                                                    BehaviorManager.NO_BEHAVIORS,
                                                    buildContext );
            existsNode.attach();
            context.put( name,
                         existsNode );

        } else {
            throw new IllegalArgumentException( "Cannot arguments " + args );

                                                              buildContext.getRuleBase().getConfiguration() );                   
                    break;                                       
                       
            }

            ExistsNode existsNode = new ExistsNode( buildContext.getNextId(),
                                                    leftTupleSource,
                                                    rightObjectSource,
                                                    constraints,
                                                    buildContext );
            existsNode.attach();
            context.put( name,
                         existsNode );

        } else {
            throw new IllegalArgumentException( "Cannot arguments " + args );

TOP

Related Classes of org.drools.reteoo.ExistsNode

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.