Examples of BRLRuleModel


Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

            origPattern.getChildColumns().remove( origColumn );
            if ( origPattern.getChildColumns().size() == 0 ) {
                model.getConditions().remove( origPattern );

                //Signal patterns changed event to Decision Table Widget
                BRLRuleModel rm = new BRLRuleModel( model );
                BoundFactsChangedEvent pce = new BoundFactsChangedEvent( rm.getLHSBoundFacts() );
                eventBus.fireEvent( pce );
            }
            deleteColumn( origColumnIndex,
                          true );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

        }
        return true;
    }

    public BRLRuleModel getRuleModel(BRLColumn<IPattern, BRLConditionVariableColumn> column) {
        BRLRuleModel ruleModel = new BRLRuleModel( model );
        List<IPattern> definition = column.getDefinition();
        ruleModel.lhs = definition.toArray( new IPattern[definition.size()] );
        return ruleModel;
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

        }
        return true;
    }

    protected BRLRuleModel getRuleModel(BRLColumn<IAction, BRLActionVariableColumn> column) {
        BRLRuleModel ruleModel = new BRLRuleModel( model );
        List<IAction> definition = column.getDefinition();
        ruleModel.rhs = definition.toArray( new IAction[definition.size()] );
        return ruleModel;
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

        this.packageName = asset.getMetaData().getModuleName();
        this.packageUUID = asset.getMetaData().getModuleUUID();
        this.guidedDecisionTable.setTableName( asset.getName() );
        this.globalEventBus = globalEventBus;
        this.clientFactory = clientFactory;
        this.rm = new BRLRuleModel( guidedDecisionTable );
        this.isReadOnly = asset.isReadonly();

        layout = new VerticalPanel();

        setupDecisionTable();
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

                               final GuidedDecisionTable52 model,
                               final GenericColumnCommand refreshGrid,
                               final ActionSetFieldCol52 col,
                               final boolean isNew,
                               final boolean isReadOnly) {
        this.rm = new BRLRuleModel( model );
        this.editingCol = cloneActionSetColumn( col );
        this.model = model;
        this.sce = sce;
        this.isReadOnly = isReadOnly;
        this.utilities = new DTCellValueUtilities( model,
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BRLRuleModel

        }
        return true;
    }

    public BRLRuleModel getRuleModel(BRLColumn<IPattern, BRLConditionVariableColumn> column) {
        BRLRuleModel ruleModel = new BRLRuleModel( model );
        List<IPattern> definition = column.getDefinition();
        ruleModel.lhs = definition.toArray( new IPattern[definition.size()] );
        return ruleModel;
    }
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.BRLRuleModel

                                                                                     row );

            Integer num = (Integer) row.get( 0 ).getNumericValue();
            String desc = row.get( 1 ).getStringValue();

            BRLRuleModel rm = new BRLRuleModel( dt );
            rm.name = getName( dt.getTableName(),
                               num );

            doMetadata( allColumns,
                        dt.getMetadataCols(),
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.BRLRuleModel

                                                                                     row );

            Integer num = (Integer) row.get( 0 ).getNumericValue();
            String desc = row.get( 1 ).getStringValue();

            BRLRuleModel rm = new BRLRuleModel( dt );
            rm.name = getName( dt.getTableName(),
                               num );

            doMetadata( allColumns,
                        dt.getMetadataCols(),
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.BRLRuleModel

                                                                                     row );

            Integer num = (Integer) row.get( 0 ).getNumericValue();
            String desc = row.get( 1 ).getStringValue();

            BRLRuleModel rm = new BRLRuleModel( dt );
            rm.name = getName( dt.getTableName(),
                               num );

            doMetadata( allColumns,
                        dt.getMetadataCols(),
View Full Code Here

Examples of org.drools.workbench.models.guided.dtable.shared.model.BRLRuleModel

        fp1.addConstraint( sfc1 );
        brlCondition.getDefinition().add( fp1 );
        dt.getConditions().add( brlCondition );

        //Setup RuleModel columns (existing BRLConditionColumn being edited)
        BRLRuleModel model = new BRLRuleModel( dt );
        FactPattern fp2 = new FactPattern( "Driver" );
        fp2.setBoundName( "$brl1" );

        SingleFieldConstraint sfc2 = new SingleFieldConstraint();
        sfc2.setFieldBinding( "$sfc1" );
        sfc2.setOperator( "==" );
        sfc2.setFactType( "Driver" );
        sfc2.setFieldName( "name" );
        sfc2.setFieldType( DataType.TYPE_STRING );

        fp2.addConstraint( sfc2 );
        model.addLhsItem( fp2 );

        //Checks
        assertNotNull( model.getLHSBoundFacts() );
        assertEquals( 2,
                      model.getLHSBoundFacts().size() );
        assertTrue( model.getLHSBoundFacts().contains( "$p1" ) );
        assertTrue( model.getLHSBoundFacts().contains( "$brl1" ) );

        assertNotNull( model.getLHSBindingType( "$p1" ) );
        assertEquals( "Driver",
                      model.getLHSBindingType( "$p1" ) );
        assertNotNull( model.getLHSBindingType( "$brl1" ) );
        assertEquals( "Driver",
                      model.getLHSBindingType( "$brl1" ) );

        FactPattern r1 = model.getLHSBoundFact( "$p1" );
        assertNotNull( r1 );
        assertTrue( r1 instanceof Pattern52FactPatternAdaptor );
        Pattern52FactPatternAdaptor raif1 = (Pattern52FactPatternAdaptor) r1;
        assertEquals( "Driver",
                      raif1.getFactType() );

        FactPattern r2 = model.getLHSBoundFact( "$brl1" );
        assertNotNull( r2 );
        assertEquals( "Driver",
                      r2.getFactType() );
    }
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.