Package com.google.refine.model.changes

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


            FilteredRows filteredRows = _engine.getAllFilteredRows();
            filteredRows.accept(_project, createRowVisitor(urls));
           
            List<CellAtRow> responseBodies = new ArrayList<CellAtRow>(urls.size());
            for (int i = 0; i < urls.size(); i++) {
                CellAtRow urlData = urls.get(i);
                CellAtRow cellAtRow = fetch(urlData);
                if (cellAtRow != null) {
                    responseBodies.add(cellAtRow);
                }
               
                _progress = i * 100 / urls.size();
View Full Code Here


                                if (c > 0) {
                                    encoding = contentType.substring(c + charsetEqual.length());
                                }
                            }
                        }
                        return new CellAtRow(
                                urlData.row,
                                new Cell(
                                        ParsingUtilities.inputStreamToString(
                                                is, encoding != null ? encoding : "UTF-8"),
                                                null));

                    } finally {
                        is.close();
                    }
                } catch (IOException e) {
                    String message;
                    if (urlConnection instanceof HttpURLConnection) {
                        int status = ((HttpURLConnection)urlConnection).getResponseCode();
                        String errorString = "";
                        InputStream errorStream = ((HttpURLConnection)urlConnection).getErrorStream();
                        if (errorStream != null) {
                            errorString = ParsingUtilities.inputStreamToString(errorStream);
                        }
                        message = String.format("HTTP error %d : %s | %s",status,
                                ((HttpURLConnection)urlConnection).getResponseMessage(),
                                errorString);
                    } else {
                        message = e.toString();
                    }
                    return _onError == OnError.StoreError ?
                            new CellAtRow(urlData.row, new Cell(new EvalError(message), null)) : null;
                }
            } catch (Exception e) {
                return _onError == OnError.StoreError ?
                        new CellAtRow(urlData.row, new Cell(new EvalError(e.getMessage()), null)) : null;
            }
        }
View Full Code Here

                            }
                        }
                    }
                   
                    if (newCell != null) {
                        cellsAtRows.add(new CellAtRow(rowIndex, newCell));
                    }
                   
                    return false;
                }
            }.init(cellsAtRows);
View Full Code Here

                        }
                    }
                }
               
                if (newCell != null) {
                    cellsAtRows.add(new CellAtRow(rowIndex, newCell));
                }
               
                return false;
            }
        }.init(column.getCellIndex(), bindings, cellsAtRows, eval);
View Full Code Here

TOP

Related Classes of com.google.refine.model.changes.CellAtRow

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.