Examples of RightInputAdapterNode


Examples of org.drools.core.reteoo.RightInputAdapterNode

             LeftTupleSource lts;
             LeftTupleSource startRianLts = null;
             if ( NodeTypeEnums.isTerminalNode(pmem.getNetworkNode())) {
                 lts = ((TerminalNode)pmem.getNetworkNode()).getLeftTupleSource();
             } else {
                 RightInputAdapterNode rian = (RightInputAdapterNode)pmem.getNetworkNode();
                 startRianLts = rian.getStartTupleSource();
                 lts = rian.getLeftTupleSource();
             }
             AbstractTerminalNode.initPathMemory(pmem, lts, startRianLts, wm, removingRule); // re-initialise the PathMemory
         }
         return previousSmems;
     }
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

            lts = ((LeftTupleSource) lts).getSinkPropagator().getFirstLeftTupleSink();
        }
    }

    private static void insertSubnetworkFacts(BetaNode bn, InternalWorkingMemory wm) {
        RightInputAdapterNode rian = ( RightInputAdapterNode ) bn.getRightInput();
        LeftTupleSource subLts =  rian.getLeftTupleSource();
        while ( subLts.getLeftTupleSource() != rian.getStartTupleSource() ) {
            subLts = subLts.getLeftTupleSource();
        }
        insertFacts( ( LeftTupleSink ) subLts, wm);
    }
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

            rt = next;
        }
    }

    private static void deleteSubnetworkFacts(BetaNode bn, InternalWorkingMemory wm) {
        RightInputAdapterNode rian = ( RightInputAdapterNode ) bn.getRightInput();
        LeftTupleSource subLts =  rian.getLeftTupleSource();
        while ( subLts.getLeftTupleSource() != rian.getStartTupleSource() ) {
            subLts = subLts.getLeftTupleSource();
        }
        deleteFacts((LeftTupleSink) subLts, wm);
    }
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

                           utils,
                           child );

            // if it is a subnetwork
            if ( context.getObjectSource() == null && context.getTupleSource() != null ) {
                RightInputAdapterNode riaNode = context.getComponentFactory().getNodeFactoryService().buildRightInputNode(context.getNextId(),
                                                                                                                          context.getTupleSource(),
                                                                                                                          tupleSource,
                                                                                                                          context);

                // attach right input adapter node to convert tuple source into an object source
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

                           utils,
                           child );

            // if it is a subnetwork
            if ( context.getObjectSource() == null && context.getTupleSource() != null ) {
                RightInputAdapterNode riaNode = context.getComponentFactory().getNodeFactoryService().buildRightInputNode( context.getNextId(),
                                                                                                                           context.getTupleSource(),
                                                                                                                           tupleSource,
                                                                                                                           context );

                // attach right input adapter node to convert tuple source into an object source
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

    private static ProtobufMessages.NodeMemory writeRIANodeMemory(final int nodeId,
                                                                  final MarshallerWriteContext context,
                                                                  final BaseNode node,
                                                                  final NodeMemories memories,
                                                                  final Memory memory) {
        RightInputAdapterNode riaNode = (RightInputAdapterNode) node;

        ObjectSink[] sinks = riaNode.getSinkPropagator().getSinks();
        BetaNode betaNode = (BetaNode) sinks[0];

        Memory betaMemory = memories.peekNodeMemory( betaNode.getId() );
        if ( betaMemory == null ) {
            return null;
View Full Code Here

Examples of org.drools.core.reteoo.RightInputAdapterNode

            pnode = Mockito.mock( LeftTupleSource.class );
        } else {
            pnode = (LeftTupleSource) context.get( source );
        }

        RightInputAdapterNode riaNode = new RightInputAdapterNode( buildContext.getNextId(),
                                                                   pnode,
                                                                   null,
                                                                   buildContext );
        riaNode.attach(buildContext);
        context.put( name,
                     riaNode );
    }
View Full Code Here

Examples of org.drools.reteoo.RightInputAdapterNode

        // if object source is null, then we need to adapt tuple source into a subnetwork
        if ( context.getObjectSource() == null ) {

            // attach right input adapter node to convert tuple source into an object source
            context.setObjectSource( (ObjectSource) utils.attachNode( context,
                                                                      new RightInputAdapterNode( context.getNextId(),
                                                                                                 context.getTupleSource(),
                                                                                                 tupleSource,
                                                                                                 context ) ) );

            // restore tuple source from before the start of the sub network
View Full Code Here

Examples of org.drools.reteoo.RightInputAdapterNode

       
        // if object source is null, then we need to adapt tuple source into a subnetwork
        if ( context.getObjectSource() == null ) {
            // attach right input adapter node to convert tuple source into an object source
            context.setObjectSource( (ObjectSource) utils.attachNode( context,
                                                                      new RightInputAdapterNode( context.getNextId(),
                                                                                                 context.getTupleSource(),
                                                                                                 tupleSource,
                                                                                                 context ) ) );
               
View Full Code Here

Examples of org.drools.reteoo.RightInputAdapterNode

            // if it is a subnetwork
            if ( context.getObjectSource() == null && context.getTupleSource() != null ) {

                // attach right input adapter node to convert tuple source into an object source
                context.setObjectSource( (ObjectSource) utils.attachNode( context,
                                                                          new RightInputAdapterNode( context.getNextId(),
                                                                                                     context.getTupleSource(),
                                                                                                     tupleSource,
                                                                                                     context ) ) );

                // restore tuple source from before the start of the sub network
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.