Package com.google.refine.browsing

Examples of com.google.refine.browsing.RowVisitor


            new MassChange(changes, false)
        );
    }

    protected RowVisitor createRowVisitor(Project project, List<Change> changes) throws Exception {
        return new RowVisitor() {
            List<Change> changes;
           
            public RowVisitor init(List<Change> changes) {
                this.changes = changes;
                return this;
View Full Code Here


        Engine engine = new Engine(project);
        engine.setMode(_mode);

        List<Integer> rowIndices = new ArrayList<Integer>();
        if (_mode == Mode.RowBased) {
            RowVisitor visitor = new IndexingVisitor(rowIndices);
            if (_sorting != null) {
                SortingRowVisitor srv = new SortingRowVisitor(visitor);

                srv.initializeFromJSON(project, _sorting);
                if (srv.hasCriteria()) {
View Full Code Here

    @Override
    protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges, long historyEntryID) throws Exception {
        Column column = project.columnModel.getColumnByName(_columnName);
       
        return new RowVisitor() {
            int cellIndex;
            List<CellChange> cellChanges;
            Map<Long, Recon> dupReconMap = new HashMap<Long, Recon>();
            long historyEntryID;
           
View Full Code Here

    @Override
    protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges, long historyEntryID) throws Exception {
        Column column = project.columnModel.getColumnByName(_columnName);
       
        return new RowVisitor() {
            int                 cellIndex;
            List<CellChange>    cellChanges;
            Cell                previousCell;
           
            public RowVisitor init(int cellIndex, List<CellChange> cellChanges) {
View Full Code Here

    @Override
    protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges, long historyEntryID) throws Exception {
        Column column = project.columnModel.getColumnByName(_columnName);
       
        return new RowVisitor() {
            int                 cellIndex;
            List<CellChange>    cellChanges;
            Map<String, Recon>  sharedRecons = new HashMap<String, Recon>();
            long                historyEntryID;
           
View Full Code Here

                        new CellAtRow(urlData.row, new Cell(new EvalError(e.getMessage()), null)) : null;
            }
        }

        RowVisitor createRowVisitor(List<CellAtRow> cellsAtRows) {
            return new RowVisitor() {
                int              cellIndex;
                Properties       bindings;
                List<CellAtRow>  cellsAtRows;
               
                public RowVisitor init(List<CellAtRow> cellsAtRows) {
View Full Code Here

        Column column = project.columnModel.getColumnByName(_baseColumnName);
       
        Evaluable eval = MetaParser.parse(_expression);
        Properties bindings = ExpressionUtils.createBindings(project);
       
        return new RowVisitor() {
            int              cellIndex;
            Properties       bindings;
            List<CellAtRow>  cellsAtRows;
            Evaluable        eval;
           
View Full Code Here

    @Override
    protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges, long historyEntryID) throws Exception {
        Column column = project.columnModel.getColumnByName(_columnName);
       
        return new RowVisitor() {
            int                 cellIndex;
            List<CellChange>    cellChanges;
            Map<Long, Recon>    dupReconMap = new HashMap<Long, Recon>();
            long                historyEntryID;
           
View Full Code Here

            if (edit.fromError) {
                fromErrorTo = edit.to;
            }
        }
       
        return new RowVisitor() {
            int                         cellIndex;
            Properties                  bindings;
            List<CellChange>            cellChanges;
            Evaluable                   eval;
           
View Full Code Here

        if (fromColumn != null && toColumns.size() > 0) {
            final Map<Object, Recon> cellValueToRecon = new HashMap<Object, Recon>();
           
            FilteredRows filteredRows = engine.getAllFilteredRows();
            try {
                filteredRows.accept(project, new RowVisitor() {
                    @Override
                    public void start(Project project) {
                        // nothing to do
                    }
                   
                    @Override
                    public void end(Project project) {
                        // nothing to do
                    }
                   
                    @Override
                    public boolean visit(Project project, int rowIndex, Row row) {
                        Cell cell = row.getCell(fromColumn.getCellIndex());
                        if (cell != null && cell.value != null && cell.recon != null) {
                            if (judgments.contains(cell.recon.judgment)) {
                                cellValueToRecon.put(cell.value, cell.recon);
                            }
                        }
                        return false;
                    }
                });
               
                filteredRows.accept(project, new RowVisitor() {
                    @Override
                    public void start(Project project) {
                        // nothing to do
                    }
                   
View Full Code Here

TOP

Related Classes of com.google.refine.browsing.RowVisitor

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.