Examples of CellChange


Examples of com.google.refine.model.changes.CellChange

                    stats.newTopics + newChange,
                    stats.matchedTopics + matchChange);
            }

            Change change = new ReconChange(
                new CellChange(rowIndex, cellIndex, cell, newCell),
                column.getName(),
                column.getReconConfig(),
                stats
            );
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                "Clear recon data for single cell on row " + (rowIndex + 1) +
                ", column " + column.getName() +
                ", containing \"" + cell.value + "\"";

            Change change = new ReconChange(
                new CellChange(rowIndex, cellIndex, cell, newCell),
                column.getName(),
                column.getReconConfig(),
                stats
            );
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                    Cell newCell = new Cell(
                        cell.value,
                        newRecon
                    );
                   
                    CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell);
                    cellChanges.add(cellChange);
                }
                return false;
            }
        }.init(column.getCellIndex(), cellChanges, historyEntryID);
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                ExpressionUtils.bind(bindings, row, rowIndex, _columnName, cell);

                Object o = eval.evaluate(bindings);
                if (o == null) {
                    if (oldValue != null) {
                        CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, null);
                        cellChanges.add(cellChange);
                    }
                } else {
                    if (o instanceof Cell) {
                        newCell = (Cell) o;
                    } else if (o instanceof WrappedCell) {
                        newCell = ((WrappedCell) o).cell;
                    } else {
                        Serializable newValue = ExpressionUtils.wrapStorable(o);
                        if (ExpressionUtils.isError(newValue)) {
                            if (_onError == OnError.KeepOriginal) {
                                return false;
                            } else if (_onError == OnError.SetToBlank) {
                                newValue = null;
                            }
                        }
                       
                        if (!ExpressionUtils.sameValue(oldValue, newValue)) {
                            newCell = new Cell(newValue, (cell != null) ? cell.recon : null);
                           
                            if (_repeat) {
                                for (int i = 0; i < _repeatCount; i++) {
                                    ExpressionUtils.bind(bindings, row, rowIndex, _columnName, newCell);
                                   
                                    newValue = ExpressionUtils.wrapStorable(eval.evaluate(bindings));
                                    if (ExpressionUtils.isError(newValue)) {
                                        break;
                                    } else if (ExpressionUtils.sameValue(newCell.value, newValue)) {
                                        break;
                                    }
                                   
                                    newCell = new Cell(newValue, newCell.recon);
                                }
                            }
                        }
                    }
                   
                    if (newCell != null) {
                        CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell);
                        cellChanges.add(cellChange);
                    }
                }
               
                return false;
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                            }
                        }
                       
                        Cell newCell = new Cell(cell.value, recon);
                       
                        CellChange cellChange = new CellChange(rowIndex, _cellIndex, cell, newCell);
                        _cellChanges.add(cellChange);
                    }
                }
                return false;
            }
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                   
                    for (ReconEntry entry : entries) {
                        Cell oldCell = entry.cell;
                        Cell newCell = new Cell(oldCell.value, recon);
                       
                        CellChange cellChange = new CellChange(
                            entry.rowIndex,
                            _cellIndex,
                            oldCell,
                            newCell
                        );
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                        }
                    }
                   
                    Cell newCell = new Cell(cell.value, newRecon);
                   
                    CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell);
                    cellChanges.add(cellChange);
                }
                return false;
            }
        }.init(column.getCellIndex(), cellChanges, historyEntryID);
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

            public boolean visit(Project project, int rowIndex, Row row) {
                Object value = row.getCellValue(cellIndex);
                if (ExpressionUtils.isNonBlankData(value)) {
                    previousCell = row.getCell(cellIndex);
                } else if (previousCell != null) {
                    CellChange cellChange = new CellChange(rowIndex, cellIndex, row.getCell(cellIndex), previousCell);
                    cellChanges.add(cellChange);
                }
                return false;
            }
        }.init(column.getCellIndex(), cellChanges);
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

                        recon.judgmentAction = "mass";
                    }
                   
                    Cell newCell = new Cell(cell.value, recon);
                   
                    CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell);
                    cellChanges.add(cellChange);
                }
                return false;
            }
        }.init(column.getCellIndex(), cellChanges, historyEntryID);
View Full Code Here

Examples of com.google.refine.model.changes.CellChange

            String description =
                "Edit single cell on row " + (rowIndex + 1) +
                ", column " + column.getName();

            Change change = new CellChange(rowIndex, cellIndex, cell, newCell);

            return new HistoryEntry(
                historyEntryID, _project, description, null, change);
        }
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.