Examples of AttributeCol52


Examples of org.drools.guvnor.models.guided.dtable.shared.model.AttributeCol52

        //Find the Salience and Duration column indexes
        List<BaseColumn> allColumns = destination.getExpandedColumns();
        for ( int iCol = 0; iCol < allColumns.size(); iCol++ ) {
            final BaseColumn column = allColumns.get( iCol );
            if ( column instanceof AttributeCol52 ) {
                AttributeCol52 attributeCol = (AttributeCol52) column;
                final String attributeName = attributeCol.getAttribute();
                if ( GuidedDecisionTable52.SALIENCE_ATTR.equals( attributeName ) ) {
                    iSalienceColumnIndex = iCol;
                } else if ( GuidedDecisionTable52.DURATION_ATTR.equals( attributeName ) ) {
                    iDurationColumnIndex = iCol;
                }
View Full Code Here

Examples of org.drools.guvnor.models.guided.dtable.shared.model.AttributeCol52

        }

    }

    private AttributeCol52 makeNewColumn( AttributeCol c ) {
        AttributeCol52 nc = new AttributeCol52();
        nc.setAttribute( c.attr );
        nc.setDefaultValue( new DTCellValue52( c.defaultValue ) );
        nc.setHideColumn( c.hideColumn );
        nc.setReverseOrder( c.reverseOrder );
        nc.setUseRowNumber( c.useRowNumber );
        nc.setWidth( c.width );
        return nc;
    }
View Full Code Here

Examples of org.drools.guvnor.models.guided.dtable.shared.model.AttributeCol52

                    List<AttributeCol52> attributeCols,
                    List<DTCellValue52> row,
                    RuleModel rm ) {
        List<RuleAttribute> attribs = new ArrayList<RuleAttribute>();
        for ( int j = 0; j < attributeCols.size(); j++ ) {
            AttributeCol52 at = attributeCols.get( j );
            int index = allColumns.indexOf( at );

            String cell = GuidedDTDRLUtilities.convertDTCellValueToString( row.get( index ) );

            if ( validCell( cell ) ) {

                //If instance of "otherwise" column then flag RuleModel as being negated
                if ( at.getAttribute().equals( GuidedDecisionTable52.NEGATE_RULE_ATTR ) ) {
                    rm.setNegated( Boolean.valueOf( cell ) );
                } else {
                    attribs.add( new RuleAttribute( at.getAttribute(),
                                                    cell ) );
                }
            }
        }
        if ( attribs.size() > 0 ) {
View Full Code Here

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

        assertEquals( "two",
                      r[1] );
        assertEquals( "three",
                      r[2] );

        AttributeCol52 at = new AttributeCol52();
        at.setAttribute( "no-loop" );
        dt.getAttributeCols().add( at );

        r = dt.getValueList( at,
                             sce );
        assertEquals( 2,
                      r.length );
        assertEquals( "true",
                      r[0] );
        assertEquals( "false",
                      r[1] );

        at.setAttribute( "enabled" );
        assertEquals( 2,
                      dt.getValueList( at,
                                       sce ).length );

        at.setAttribute( "salience" );
        assertEquals( 0,
                      dt.getValueList( at,
                                       sce ).length );

    }
View Full Code Here

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

            }
        } );

        GuidedDecisionTable52 dt = new GuidedDecisionTable52();

        AttributeCol52 at = new AttributeCol52();
        at.setAttribute( "salience" );
        AttributeCol52 at_ = new AttributeCol52();
        at_.setAttribute( "enabled" );

        dt.getAttributeCols().add( at );
        dt.getAttributeCols().add( at_ );

        ConditionCol52 c1 = new ConditionCol52();
View Full Code Here

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

            }
        } );

        GuidedDecisionTable52 dt = new GuidedDecisionTable52();

        AttributeCol52 salienceAttribute = new AttributeCol52();
        salienceAttribute.setAttribute( "salience" );
        AttributeCol52 enabledAttribute = new AttributeCol52();
        enabledAttribute.setAttribute( "enabled" );

        dt.getAttributeCols().add( salienceAttribute );
        dt.getAttributeCols().add( enabledAttribute );

        Pattern52 p1 = new Pattern52();
View Full Code Here

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

        DescriptionCol52 dc = new DescriptionCol52();

        MetadataCol52 mdc = new MetadataCol52();
        mdc.setMetadata( "cheese" );

        AttributeCol52 ac = new AttributeCol52();
        ac.setAttribute( "salience" );

        ActionSetFieldCol52 asfc = new ActionSetFieldCol52();
        asfc.setBoundName( "d1" );
        asfc.setFactField( "age" );
View Full Code Here

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

    @Test
    public void testInterpolate() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableName( "michael" );

        AttributeCol52 attr = new AttributeCol52();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
        dt.getAttributeCols().add( attr );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "f1" );
        p1.setFactType( "Driver" );
View Full Code Here

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

    public void testLimitedEntryAttributes() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        AttributeCol52 attr = new AttributeCol52();
        attr.setAttribute( "salience" );
        dt.getAttributeCols().add( attr );

        dt.setData( upgrader.makeDataLists( new String[][]{
                                                           new String[]{"1", "desc", "100"},
                                                           new String[]{"2", "desc", "200"}
View Full Code Here

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

    public void test2Rules() throws Exception {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();

        dt.setTableName( "michael" );

        AttributeCol52 attr = new AttributeCol52();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
        dt.getAttributeCols().add( attr );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "f1" );
        p1.setFactType( "Driver" );
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.