Package org.drools.reteoo

Examples of org.drools.reteoo.FromNode


    public QueryElementNode buildQueryElementNode( int id, LeftTupleSource tupleSource, QueryElement qe, boolean tupleMemoryEnabled, boolean openQuery, BuildContext context ) {
        return new QueryElementNode( id, tupleSource, qe, tupleMemoryEnabled, openQuery, context );
    }

    public BaseNode buildFromNode(int id, DataProvider dataProvider, LeftTupleSource tupleSource, AlphaNodeFieldConstraint[] alphaNodeFieldConstraints, BetaConstraints betaConstraints, boolean tupleMemoryEnabled, BuildContext context, From from) {
        return new FromNode( id, dataProvider, tupleSource, alphaNodeFieldConstraints, betaConstraints, tupleMemoryEnabled, context, from );
    }
View Full Code Here


        final From from = (From) rce;

        BetaConstraints betaConstraints = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), true );
       
        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                new FromNode( context.getNextId(),
                                                                              from.getDataProvider(),
                                                                              context.getTupleSource(),
                                                                              (AlphaNodeFieldConstraint[]) context.getAlphaConstraints().toArray( new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()] ),
                                                                              betaConstraints,
                                                                              context.isTupleMemoryEnabled(),
View Full Code Here

    public QueryElementNode buildQueryElementNode( int id, LeftTupleSource tupleSource, QueryElement qe, boolean tupleMemoryEnabled, boolean openQuery, BuildContext context ) {
        return new QueryElementNode( id, tupleSource, qe, tupleMemoryEnabled, openQuery, context );
    }

    public BaseNode buildFromNode(int id, DataProvider dataProvider, LeftTupleSource tupleSource, AlphaNodeFieldConstraint[] alphaNodeFieldConstraints, BetaConstraints betaConstraints, boolean tupleMemoryEnabled, BuildContext context, From from) {
        return new FromNode( id, dataProvider, tupleSource, alphaNodeFieldConstraints, betaConstraints, tupleMemoryEnabled, context, from );
    }
View Full Code Here

        context.pushRuleComponent( from );

        BetaConstraints betaConstraints = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), true );
       
        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                new FromNode( context.getNextId(),
                                                                              from.getDataProvider(),
                                                                              context.getTupleSource(),
                                                                              (AlphaNodeFieldConstraint[]) context.getAlphaConstraints().toArray( new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()] ),
                                                                              betaConstraints,
                                                                              context.isTupleMemoryEnabled(),
View Full Code Here

        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();
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl) ksession).session;
        AccumulateMemory accMemory = (AccumulateMemory) wm.getNodeMemory( accNode );
View Full Code Here

    @Override
    protected void doVisit(NetworkNode node,
                           Stack<NetworkNode> nodeStack,
                           StatefulKnowledgeSessionInfo info) {
        FromNode fn = (FromNode) node;
        DefaultNodeInfo ni = (DefaultNodeInfo) info.getNodeInfo( node );
        final FromMemory memory = (FromMemory) info.getSession().getNodeMemory( fn );
       
        ni.setMemoryEnabled( true );
       
        if( fn.isLeftTupleMemoryEnabled() ) {
            ni.setTupleMemorySize( memory.betaMemory.getLeftTupleMemory().size() );

            long handles = 0;
            org.drools.core.util.Iterator it = memory.betaMemory.getLeftTupleMemory().iterator();
            for ( LeftTuple leftTuple = (LeftTuple) it.next(); leftTuple != null; leftTuple = (LeftTuple) it.next() ) {
View Full Code Here

        final From from = (From) rce;

        BetaConstraints betaConstraints = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), true );
       
        context.setTupleSource( (TupleSource) utils.attachNode( context,
                                                                new FromNode( context.getNextId(),
                                                                              from.getDataProvider(),
                                                                              context.getTupleSource(),
                                                                              (AlphaNodeFieldConstraint[]) context.getAlphaConstraints().toArray( new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()] ),
                                                                              betaConstraints ) ) );
        context.setAlphaConstraints( null );
View Full Code Here

        @SuppressWarnings("unchecked")
        BetaConstraints betaConstraints = utils.createBetaNodeConstraint( context, (List<BetaNodeFieldConstraint>) context.getBetaconstraints(), true );
       
        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                new FromNode( context.getNextId(),
                                                                              from.getDataProvider(),
                                                                              context.getTupleSource(),
                                                                              (AlphaNodeFieldConstraint[]) context.getAlphaConstraints().toArray( new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()] ),
                                                                              betaConstraints,
                                                                              context.isTupleMemoryEnabled(),
View Full Code Here

    @Override
    protected void doVisit(NetworkNode node,
                           Stack<NetworkNode> nodeStack,
                           StatefulKnowledgeSessionInfo info) {
        FromNode fn = (FromNode) node;
        DefaultNodeInfo ni = (DefaultNodeInfo) info.getNodeInfo( node );
        final FromMemory memory = (FromMemory) info.getSession().getNodeMemory( fn );
       
        ni.setMemoryEnabled( true );
       
        if( fn.isLeftTupleMemoryEnabled() ) {
            ni.setTupleMemorySize( memory.betaMemory.getLeftTupleMemory().size() );

            long handles = 0;
            org.drools.core.util.Iterator it = memory.betaMemory.getLeftTupleMemory().iterator();
            for ( LeftTuple leftTuple = (LeftTuple) it.next(); leftTuple != null; leftTuple = (LeftTuple) it.next() ) {
View Full Code Here

        context.pushRuleComponent( from );

        BetaConstraints betaConstraints = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), true );
       
        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                new FromNode( context.getNextId(),
                                                                              from.getDataProvider(),
                                                                              context.getTupleSource(),
                                                                              (AlphaNodeFieldConstraint[]) context.getAlphaConstraints().toArray( new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()] ),
                                                                              betaConstraints,
                                                                              context.isTupleMemoryEnabled(),
View Full Code Here

TOP

Related Classes of org.drools.reteoo.FromNode

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.