Examples of BRLConditionVariableColumn


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

        brl1Definition.add( brl1DefinitionFactPattern1 );

        brl1.setDefinition( brl1Definition );

        //Setup BRL column bindings
        BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "$name",
                                                                                   DataType.TYPE_STRING,
                                                                                   "Person",
                                                                                   "name" );
        brl1.getChildColumns().add( brl1Variable1 );
        BRLConditionVariableColumn brl1Variable2 = new BRLConditionVariableColumn( "$age",
                                                                                   DataType.TYPE_NUMERIC_INTEGER,
                                                                                   "Person",
                                                                                   "age" );
        brl1.getChildColumns().add( brl1Variable2 );
View Full Code Here

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

        brl1Definition.add( brl1DefinitionFactPattern2 );

        brl1.setDefinition( brl1Definition );

        //Setup BRL column bindings
        BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "$name",
                                                                                   DataType.TYPE_STRING,
                                                                                   "Person",
                                                                                   "name" );
        brl1.getChildColumns().add( brl1Variable1 );
        BRLConditionVariableColumn brl1Variable2 = new BRLConditionVariableColumn( "$age",
                                                                                   DataType.TYPE_NUMERIC_INTEGER,
                                                                                   "Person",
                                                                                   "age" );
        brl1.getChildColumns().add( brl1Variable2 );
View Full Code Here

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

        brl1Definition.add( brl1DefinitionFactPattern1 );

        brl1.setDefinition( brl1Definition );

        //Setup BRL column bindings
        BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "",
                                                                                   DataType.TYPE_BOOLEAN );
        brl1.getChildColumns().add( brl1Variable1 );

        dtable.getConditions().add( brl1 );
        dtable.setData( DataUtilities.makeDataLists( data ) );
View Full Code Here

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

        brl1Definition.add( brl1DefinitionFactPattern1 );

        brl1.setDefinition( brl1Definition );

        //Setup BRL column bindings
        BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "$name",
                                                                                   DataType.TYPE_STRING,
                                                                                   "Person",
                                                                                   "name" );
        brl1.getChildColumns().add( brl1Variable1 );
        BRLConditionVariableColumn brl1Variable2 = new BRLConditionVariableColumn( "$age",
                                                                                   DataType.TYPE_NUMERIC_INTEGER,
                                                                                   "Person",
                                                                                   "age" );
        brl1.getChildColumns().add( brl1Variable2 );
View Full Code Here

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

        brl1Definition.add( brl1DefinitionFactPattern1 );

        brl1.setDefinition( brl1Definition );

        //Setup BRL column bindings
        BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "$name",
                                                                                   DataType.TYPE_STRING,
                                                                                   "Person",
                                                                                   "name" );
        brl1.getChildColumns().add( brl1Variable1 );
        BRLConditionVariableColumn brl1Variable2 = new BRLConditionVariableColumn( "$age",
                                                                                   DataType.TYPE_NUMERIC_INTEGER,
                                                                                   "Person",
                                                                                   "age" );
        brl1.getChildColumns().add( brl1Variable2 );
View Full Code Here

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

     */
    public void deleteColumn( BRLConditionColumn modelColumn ) {
        if ( modelColumn == null ) {
            throw new IllegalArgumentException( "modelColumn cannot be null." );
        }
        BRLConditionVariableColumn firstColumn = modelColumn.getChildColumns().get( 0 );
        int firstColumnIndex = model.getExpandedColumns().indexOf( firstColumn );
        int numberOfColumns = modelColumn.getChildColumns().size();
        deleteColumns( firstColumnIndex,
                       numberOfColumns,
                       true );
View Full Code Here

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

        final int index = model.getExpandedColumns().indexOf( editColumn.getChildColumns().get( 0 ) );
        final List<BaseColumn> columns = new ArrayList<BaseColumn>();
        final List<List<DTCellValue52>> columnsData = new ArrayList<List<DTCellValue52>>();
        columns.addAll( editColumn.getChildColumns() );
        for ( BaseColumn column : columns ) {
            final BRLConditionVariableColumn variable = (BRLConditionVariableColumn) column;
            String key = getUpdateBRLConditionColumnKey( variable );
            List<DTCellValue52> columnData = origColumnVariables.get( key );
            if ( columnData == null ) {
                columnData = cellValueFactory.makeColumnData( variable );
            }
            columnsData.add( columnData );
        }
        InsertDecisionTableColumnEvent dce = new InsertDecisionTableColumnEvent( columns,
                                                                                 columnsData,
                                                                                 index,
                                                                                 true );
        eventBus.fireEvent( dce );

        //Delete columns for the original definition
        BRLConditionVariableColumn firstColumn = origColumn.getChildColumns().get( 0 );
        int firstColumnIndex = model.getExpandedColumns().indexOf( firstColumn );
        int numberOfColumns = origColumn.getChildColumns().size();
        deleteColumns( firstColumnIndex,
                       numberOfColumns,
                       true );
View Full Code Here

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

    @Override
    protected List<BRLConditionVariableColumn> convertInterpolationVariables( Map<InterpolationVariable, Integer> ivs ) {

        //If there are no variables add a boolean column to specify whether the fragment should apply
        if ( ivs.size() == 0 ) {
            BRLConditionVariableColumn variable = new BRLConditionVariableColumn( "",
                                                                                  DataType.TYPE_BOOLEAN );
            variable.setHeader( editingCol.getHeader() );
            variable.setHideColumn( editingCol.isHideColumn() );
            List<BRLConditionVariableColumn> variables = new ArrayList<BRLConditionVariableColumn>();
            variables.add( variable );
            return variables;
        }

        //Convert to columns for use in the Decision Table
        BRLConditionVariableColumn[] variables = new BRLConditionVariableColumn[ ivs.size() ];
        for ( Map.Entry<InterpolationVariable, Integer> me : ivs.entrySet() ) {
            InterpolationVariable iv = me.getKey();
            int index = me.getValue();
            BRLConditionVariableColumn variable = new BRLConditionVariableColumn( iv.getVarName(),
                                                                                  iv.getDataType(),
                                                                                  iv.getFactType(),
                                                                                  iv.getFactField() );
            variable.setHeader( editingCol.getHeader() );
            variable.setHideColumn( editingCol.isHideColumn() );
            variables[ index ] = variable;
        }

        //Convert the array into a mutable list (Arrays.toList provides an immutable list)
        List<BRLConditionVariableColumn> variableList = new ArrayList<BRLConditionVariableColumn>();
View Full Code Here

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

        }
        return clone;
    }

    private BRLConditionVariableColumn cloneVariable( BRLConditionVariableColumn variable ) {
        BRLConditionVariableColumn clone = new BRLConditionVariableColumn( variable.getVarName(),
                                                                           variable.getFieldType(),
                                                                           variable.getFactType(),
                                                                           variable.getFactField() );
        clone.setHeader( variable.getHeader() );
        clone.setHideColumn( variable.isHideColumn() );
        clone.setWidth( variable.getWidth() );
        return clone;
    }
View Full Code Here

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

     */
    public void deleteColumn( BRLConditionColumn modelColumn ) {
        if ( modelColumn == null ) {
            throw new IllegalArgumentException( "modelColumn cannot be null." );
        }
        BRLConditionVariableColumn firstColumn = modelColumn.getChildColumns().get( 0 );
        int firstColumnIndex = model.getExpandedColumns().indexOf( firstColumn );
        if ( firstColumnIndex >= 0 ) {
            int numberOfColumns = modelColumn.getChildColumns().size();
            deleteColumns( firstColumnIndex,
                           numberOfColumns,
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.