Examples of AttributeCol52


Examples of org.drools.workbench.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.workbench.models.guided.dtable.shared.model.AttributeCol52

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

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

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

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

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

    }
View Full Code Here

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

        final PackageDataModelOracle oracle = PackageDataModelOracleBuilder.newPackageOracleBuilder().setProjectOracle( pd ).build();

        final GuidedDecisionTableUtils utils = new GuidedDecisionTableUtils( oracle,
                                                                             dt );

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

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

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

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

        final PackageDataModelOracle oracle = PackageDataModelOracleBuilder.newPackageOracleBuilder().setProjectOracle( pd ).build();

        final GuidedDecisionTableUtils utils = new GuidedDecisionTableUtils( oracle,
                                                                             dt );

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

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

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

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

        final DescriptionCol52 dc = new DescriptionCol52();

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

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

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

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

        final GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setPackageName( packageName );
        dt.getImports().getImports().addAll( imports );
        dt.setTableName( tableName );

        AttributeCol52 attr = new AttributeCol52();
        attr.setAttribute( "ruleflow-group" );
        dt.getAttributeCols().add( attr );

        dt.setData( DataUtilities.makeDataLists( new String[][]{
                new String[]{ "1", "desc", "myRuleFlowGroup" }
        } ) );
View Full Code Here

Examples of org.drools.workbench.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.workbench.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.workbench.models.guided.dtable.shared.model.AttributeCol52

        assertTrue( columns.get( 10 ) instanceof AttributeCol52 );
        assertTrue( columns.get( 11 ) instanceof AttributeCol52 );
        assertTrue( columns.get( 12 ) instanceof AnalysisCol52 );

        //Check individual attributes
        AttributeCol52 attrCol2 = ( (AttributeCol52) columns.get( 2 ) );
        assertEquals( GuidedDecisionTable52.SALIENCE_ATTR,
                      attrCol2.getAttribute() );
        assertFalse( attrCol2.isUseRowNumber() );
        assertFalse( attrCol2.isReverseOrder() );

        AttributeCol52 attrCol3 = ( (AttributeCol52) columns.get( 3 ) );
        assertEquals( GuidedDecisionTable52.ACTIVATION_GROUP_ATTR,
                      attrCol3.getAttribute() );

        AttributeCol52 attrCol4 = ( (AttributeCol52) columns.get( 4 ) );
        assertEquals( GuidedDecisionTable52.DURATION_ATTR,
                      attrCol4.getAttribute() );

        AttributeCol52 attrCol5 = ( (AttributeCol52) columns.get( 5 ) );
        assertEquals( GuidedDecisionTable52.TIMER_ATTR,
                      attrCol5.getAttribute() );

        AttributeCol52 attrCol6 = ( (AttributeCol52) columns.get( 6 ) );
        assertEquals( GuidedDecisionTable52.CALENDARS_ATTR,
                      attrCol6.getAttribute() );

        AttributeCol52 attrCol7 = ( (AttributeCol52) columns.get( 7 ) );
        assertEquals( GuidedDecisionTable52.NO_LOOP_ATTR,
                      attrCol7.getAttribute() );

        AttributeCol52 attrCol8 = ( (AttributeCol52) columns.get( 8 ) );
        assertEquals( GuidedDecisionTable52.LOCK_ON_ACTIVE_ATTR,
                      attrCol8.getAttribute() );

        AttributeCol52 attrCol9 = ( (AttributeCol52) columns.get( 9 ) );
        assertEquals( GuidedDecisionTable52.AUTO_FOCUS_ATTR,
                      attrCol9.getAttribute() );

        AttributeCol52 attrCol10 = ( (AttributeCol52) columns.get( 10 ) );
        assertEquals( GuidedDecisionTable52.AGENDA_GROUP_ATTR,
                      attrCol10.getAttribute() );

        AttributeCol52 attrCol11 = ( (AttributeCol52) columns.get( 11 ) );
        assertEquals( GuidedDecisionTable52.RULEFLOW_GROUP_ATTR,
                      attrCol11.getAttribute() );

        //Check data
        assertEquals( 2,
                      dtable.getData().size() );
        assertTrue( isRowEquivalent( new String[]{ "1", "Specific rule 1", "1", "g1", "100", "T1", "CAL1", "TRUE", "TRUE", "TRUE", "AG1", "RFG1" },
View Full Code Here

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

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

        dt.setTableName( "michael" );

        AttributeCol52 attr = new AttributeCol52();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( new DTCellValue52( "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.