Package org.drools.ide.common.client.modeldriven.dt

Examples of org.drools.ide.common.client.modeldriven.dt.ActionCol


        newDTModel.setData( makeDataLists( legacyDTModel.data ) );

        //Copy the boundName for ActionRetractFactCol into the data of the new Guided Decision Table model
        final int DATA_COLUMN_OFFSET = legacyDTModel.conditionCols.size() + legacyDTModel.getMetadataCols().size() + legacyDTModel.attributeCols.size() + GuidedDecisionTable.INTERNAL_ELEMENTS;
        for ( int iCol = 0; iCol < legacyDTModel.actionCols.size(); iCol++ ) {
            ActionCol lc = legacyDTModel.actionCols.get( iCol );
            if ( lc instanceof ActionRetractFactCol ) {
                String boundName = ((ActionRetractFactCol) lc).boundName;
                for ( List<DTCellValue52> row : newDTModel.getData() ) {
                    row.get( DATA_COLUMN_OFFSET + iCol ).setStringValue( boundName );
                }
View Full Code Here


        return c;
    }

    static ActionCol newActionCol(String header) {
        ActionCol a = new ActionCol();

        a.header = header;

        return a;
    }
View Full Code Here

        };
        colCount++;*/

        for ( int i = 0; i < dt.actionCols.size(); i++ ) {
            //here we could also deal with numeric type?
            final ActionCol c = dt.actionCols.get( i );
            fds[colCount] = new StringFieldDef( c.header );

            cols[colCount] = new ColumnConfig() {
                {
                    setHeader( c.header );
View Full Code Here

    private ListBox loadPatterns() {
        Set vars = new HashSet();
        ListBox patterns = new ListBox();

        for ( Object o : dt.actionCols ) {
            ActionCol col = (ActionCol) o;
            if ( col instanceof ActionInsertFactCol ) {
                ActionInsertFactCol c = (ActionInsertFactCol) col;
                if ( !vars.contains( c.boundName ) ) {
                    patterns.addItem( c.factType + " [" + c.boundName + "]",
                                      c.factType + " " + c.boundName );
View Full Code Here

    private ListBox loadPatterns() {
        Set vars = new HashSet();
        ListBox patterns = new ListBox();

        for ( Object o : dt.actionCols ) {
            ActionCol col = (ActionCol) o;
            if ( col instanceof ActionInsertFactCol ) {
                ActionInsertFactCol c = (ActionInsertFactCol) col;
                if ( !vars.contains( c.boundName ) ) {
                    patterns.addItem( c.factType + " [" + c.boundName + "]",
                                      c.factType + " " + c.boundName );
View Full Code Here

        };
        colCount++;*/

        for ( int i = 0; i < dt.actionCols.size(); i++ ) {
            //here we could also deal with numeric type?
            final ActionCol c = dt.actionCols.get( i );
            fds[colCount] = new StringFieldDef( c.header );

            cols[colCount] = new ColumnConfig() {
                {
                    setHeader( c.header );
View Full Code Here

  }

  void doActions(int condAndAttrs, List<ActionCol> actionCols, String[] row, RuleModel rm) {
    List<LabelledAction> actions = new ArrayList<LabelledAction>();
    for (int i = 0; i < actionCols.size(); i++) {
      ActionCol c = actionCols.get(i);
      String cell = row[condAndAttrs + i + GuidedDecisionTable.INTERNAL_ELEMENTS];
            if (!validCell(cell)) {
                cell = c.defaultValue;
            }
      if (validCell(cell)) {
View Full Code Here

  }

  void doActions(int condAndAttrs, List<ActionCol> actionCols, String[] row, RuleModel rm) {
    List<LabelledAction> actions = new ArrayList<LabelledAction>();
    for (int i = 0; i < actionCols.size(); i++) {
      ActionCol c = actionCols.get(i);
      String cell = row[condAndAttrs + i + GuidedDecisionTable.INTERNAL_ELEMENTS];
            if (!validCell(cell)) {
                cell = c.defaultValue;
            }
      if (validCell(cell)) {
View Full Code Here

    private ListBox loadPatterns() {
        Set<String> vars = new HashSet<String>();
        ListBox patterns = new ListBox();

        for ( Object o : dtable.getModel().getActionCols() ) {
            ActionCol col = (ActionCol) o;
            if ( col instanceof ActionInsertFactCol ) {
                ActionInsertFactCol c = (ActionInsertFactCol) col;
                if ( !vars.contains( c.getBoundName() ) ) {
                    patterns.addItem( c.getFactType() + " [" + c.getBoundName()
                                              + "]",
View Full Code Here

            } else if ( modelCol instanceof ConditionCol ) {
                ConditionCol tc = (ConditionCol) modelCol;
                model.getConditionCols().add( tc );

            } else if ( modelCol instanceof ActionCol ) {
                ActionCol tc = (ActionCol) modelCol;
                model.getActionCols().add( tc );

            }
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt.ActionCol

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.