Examples of DynamicData


Examples of com.flaptor.indextank.index.scorer.DynamicDataManager.DynamicData

    public boolean matches(DocId documentId, double textualScore, int now, QueryVariables queryVars) {
      if (isNoneMatchingFilter) {
        return false;
      }
     
      DynamicData dynamicData = dynamicDataManager.getDynamicData(documentId);
     
      int[] data = dynamicData.getData();
     
      /*
       * For every category we checked that at least one of the
       * values matches.
       */
 
View Full Code Here

Examples of com.flaptor.indextank.index.scorer.DynamicDataManager.DynamicData

    this.ranges = ranges;
  }

  @Override
  public boolean matches(DocId documentId, double textualScore, int now, QueryVariables queryVars) {
    DynamicData dynamicData = dynamicDataManager.getDynamicData(documentId);
    for (Integer variable : ranges.keySet()) {
      if (!checkVariable(dynamicData.getBoost(variable), ranges.get(variable))) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.DynamicData

     * the Model with the UI when needed.
     */
    public void scrapeData() {

        // Copy data
        DynamicData data = widget.getData();
        List<DynamicColumn<DTColumnConfig>> columns = widget.getColumns();
        final int GRID_ROWS = data.size();
        String[][] grid = new String[GRID_ROWS][];
        for ( int iRow = 0; iRow < GRID_ROWS; iRow++ ) {
            DynamicDataRow dataRow = data.get( iRow );
            String[] row = new String[dataRow.size()];
            for ( int iCol = 0; iCol < columns.size(); iCol++ ) {
                CellValue< ? > cv = dataRow.get( iCol );
                DynamicColumn<DTColumnConfig> column = columns.get( iCol );
                String serialisedValue = cellValueFactory.serialiseValue( column.getModelColumn(),
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.DynamicData

    }

    public void updateSystemControlledColumnValues() {

        DynamicData data = widget.getData();
        List<DynamicColumn<DTColumnConfig>> columns = widget.getColumns();
        for ( DynamicColumn<DTColumnConfig> col : columns ) {

            DTColumnConfig modelColumn = col.getModelColumn();

            if ( modelColumn instanceof RowNumberCol ) {

                // Update Row Number column values
                for ( int iRow = 0; iRow < data.size(); iRow++ ) {
                    data.get( iRow ).get( col.getColumnIndex() ).setValue( iRow + 1 );
                }

            } else if ( modelColumn instanceof AttributeCol ) {

                // Update Salience values
                AttributeCol attrCol = (AttributeCol) modelColumn;
                if ( attrCol.getAttribute().equals( RuleAttributeWidget.SALIENCE_ATTR ) ) {
                    if ( attrCol.isUseRowNumber() ) {
                        col.setSortDirection( SortDirection.NONE );
                        final int MAX_ROWS = data.size();
                        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
                            int salience = iRow + 1;
                            if ( attrCol.isReverseOrder() ) {
                                salience = Math.abs( iRow
                                                     - MAX_ROWS );
                            }
                            data.get( iRow ).get( col.getColumnIndex() )
                                    .setValue( salience );
                        }
                    }
                    // Ensure Salience cells are rendered with the correct Cell
                    col.setCell( cellFactory.getCell( attrCol ) );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.DynamicData

                                                                                  index );
        column.setVisible( !modelColumn.isHideColumn() );
        DynamicColumn<DTColumnConfig> columnBefore = widget.getColumns().get( index );

        // Create column data
        DynamicData data = widget.getData();
        List<CellValue< ? >> columnData = new ArrayList<CellValue< ? >>();
        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            CellValue< ? > cell = cellValueFactory.getCellValue( modelColumn,
                                                                 iRow,
                                                                 index,
                                                                 modelColumn.getDefaultValue() );
            columnData.add( cell );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.DynamicData

    }

    // Ensure the Column cell type and corresponding values are correct
    private void updateCellsForDataType(final DTColumnConfig editColumn,
                                        final DynamicColumn<DTColumnConfig> column) {
        DynamicData data = widget.getData();
        column.setCell( cellFactory.getCell( editColumn ) );
        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            DynamicDataRow row = data.get( iRow );
            row.set( column.getColumnIndex(),
                     cellValueFactory.getCellValue( editColumn,
                                                    iRow,
                                                    column.getColumnIndex(),
                                                    null ) );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.DynamicData

    // Ensure the values in a column are within the Value List
    private boolean updateCellsForOptionValueList(final DTColumnConfig editColumn,
                                                  final DynamicColumn<DTColumnConfig> column) {
        boolean bRedrawRequired = false;
        DynamicData data = widget.getData();
        List<String> vals = Arrays.asList( model.getValueList( editColumn,
                                                               sce ) );
        column.setCell( cellFactory.getCell( editColumn ) );
        int iCol = column.getColumnIndex();
        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            DynamicDataRow row = data.get( iRow );
            if ( !vals.contains( row.get( iCol ).getValue() ) ) {
                row.get( iCol ).setValue( null );
                bRedrawRequired = true;
            }
        }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.data.DynamicData

     * the Model with the UI when needed.
     */
    public void scrapeData() {

        // Copy data
        final DynamicData data = widget.getGridWidget().getData().getFlattenedData();
        final List<DynamicColumn<DTColumnConfig52>> columns = widget.getGridWidget().getColumns();

        final int GRID_ROWS = data.size();
        List<List<DTCellValue52>> grid = new ArrayList<List<DTCellValue52>>();
        for ( int iRow = 0; iRow < GRID_ROWS; iRow++ ) {
            DynamicDataRow dataRow = data.get( iRow );
            List<DTCellValue52> row = new ArrayList<DTCellValue52>();
            for ( int iCol = 0; iCol < columns.size(); iCol++ ) {

                //Values put back into the Model are type-safe
                CellValue< ? > cv = dataRow.get( iCol );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.data.DynamicData

        widget.getGridWidget().getData().clear();
        widget.getGridWidget().getColumns().clear();

        // Dummy rows because the underlying DecoratedGridWidget expects there
        // to be enough rows to receive the columns data
        final DynamicData data = widget.getGridWidget().getData();
        for ( int iRow = 0; iRow < model.getData().size(); iRow++ ) {
            data.addRow();
        }

        // Static columns, Row#
        int colIndex = 0;
        DTColumnConfig52 colStatic;
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.data.DynamicData

                                editPattern.getFactType() )
                 && isEqualOrNull( origColumn.getFactField(),
                                   editColumn.getFactField() )
                 && origColumn.getConstraintValueType() == editColumn.getConstraintValueType() ) {

                final DynamicData data = widget.getGridWidget().getData();
                for ( int iRow = 0; iRow < data.size(); iRow++ ) {
                    DynamicDataRow row = data.get( iRow );
                    CellValue< ? > oldCell = row.get( origColIndex );
                    CellValue< ? > newCell = row.get( editColIndex );
                    newCell.setValue( oldCell.getValue() );
                }
            }
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.