Package org.drools.core.reteoo

Examples of org.drools.core.reteoo.Rete


        // create a RuleBase with a single ObjectTypeNode we attach a
        // MockObjectSink so we can detect assertions and retractions
        final RuleImpl rule1 = new RuleImpl( "test-rule1" );
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        final Rete rete = kBase.getRete();
        final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
                                                                  this.entryPoint,
                                                                  new ClassObjectType( String.class ),
                                                                  buildContext );
        objectTypeNode.attach( buildContext );
View Full Code Here


        // create a RuleBase with a single ObjectTypeNode we attach a
        // MockObjectSink so we can detect assertions and retractions
        final RuleImpl rule1 = new RuleImpl( "test-rule1" );
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        final Rete rete = kBase.getRete();
        final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
                                                                  this.entryPoint,
                                                                  new ClassObjectType( String.class ),
                                                                  buildContext );
        objectTypeNode.attach( buildContext );
View Full Code Here

    @Test
    public <M extends ModedAssertion<M>> void testMultipleLogicalRelationships() {
        final RuleImpl rule1 = new RuleImpl( "test-rule1" );
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        final Rete rete = kBase.getRete();

        // Create a RuleBase with a single ObjectTypeNode we attach a
        // MockObjectSink so we can detect assertions and retractions
        final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
                                                                  this.entryPoint,
View Full Code Here

        // create a RuleBase with a single ObjectTypeNode we attach a
        // MockObjectSink so we can detect assertions and retractions
        final RuleImpl rule1 = new RuleImpl( "test-rule1" );
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        final Rete rete = kBase.getRete();
        final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
                                                                  this.entryPoint,
                                                                  new ClassObjectType( String.class ),
                                                                  buildContext );
        objectTypeNode.attach( buildContext );
View Full Code Here

        // create a RuleBase with a single ObjectTypeNode we attach a
        // MockObjectSink so we can detect assertions and retractions
        final RuleImpl rule1 = new RuleImpl( "test-rule1" );
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        final Rete rete = kBase.getRete();
        final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
                                                                  this.entryPoint,
                                                                  new ClassObjectType( String.class ),
                                                                  buildContext );
        objectTypeNode.attach( buildContext );
View Full Code Here

    public void addGlobal(String identifier, Class clazz) {
        this.globals.put( identifier, clazz );
    }

    protected void setupRete() {
        this.rete = new Rete( this );
        this.reteooBuilder = new ReteooBuilder( this );

        // always add the default entry point
        EntryPointNode epn = kieComponentFactory.getNodeFactoryService().buildEntryPointNode( this.reteooBuilder.getIdGenerator().getNextId(),
                                                                                              RuleBasePartitionId.MAIN_PARTITION,
View Full Code Here

        ksession.insert(1L);
        FactHandle fh = ksession.insert(1);
        ksession.insert("1");

        Rete rete = ((KnowledgeBaseImpl)kbase).getRete();
        LeftInputAdapterNode lia = null;

        for (ObjectTypeNode otn : rete.getObjectTypeNodes()) {
            if ( Integer.class == otn.getObjectType().getValueType().getClassType() ) {
                lia = (LeftInputAdapterNode)otn.getSinkPropagator().getSinks()[0];
                break;
            }
        }
View Full Code Here

    public void addGlobal(String identifier, Class clazz) {
        this.globals.put( identifier, clazz );
    }

    protected void setupRete() {
        this.rete = new Rete( this );
        this.reteooBuilder = new ReteooBuilder( this );

        // always add the default entry point
        EntryPointNode epn = kieComponentFactory.getNodeFactoryService().buildEntryPointNode( this.reteooBuilder.getIdGenerator().getNextId(),
                                                                                              RuleBasePartitionId.MAIN_PARTITION,
View Full Code Here

            }
        }
    }

    protected void setupRete() {
        this.rete = new Rete( this );
        this.reteooBuilder = new ReteooBuilder( this );

        // always add the default entry point
        EntryPointNode epn = kieComponentFactory.getNodeFactoryService().buildEntryPointNode( this.reteooBuilder.getIdGenerator().getNextId(),
                                                                                              RuleBasePartitionId.MAIN_PARTITION,
View Full Code Here

        this.memoryEnabled = memoryEnabled;
    }
   
    public Collection<? extends NetworkNode> getSinkList() {
        if ( node instanceof Rete ) {
            Rete rete = (Rete) node;
            return  rete.getEntryPointNodes().values();
        } else if ( node instanceof EntryPointNode ) {
            EntryPointNode epn = (EntryPointNode) node;
            return epn.getObjectTypeNodes().values();
        } else if ( node instanceof ObjectSource ) {
            List<NetworkNode> result = new ArrayList<NetworkNode>();
View Full Code Here

TOP

Related Classes of org.drools.core.reteoo.Rete

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.