Package com.google.refine.exporters.TabularSerializer

Examples of com.google.refine.exporters.TabularSerializer.CellData


            public void start(Project project) {
                serializer.startFile(options);
                if (outputColumnHeaders) {
                    List<CellData> cells = new ArrayList<TabularSerializer.CellData>(columnNames.size());
                    for (String name : columnNames) {
                        cells.add(new CellData(name, name, name, null));
                    }
                    serializer.addRow(cells, true);
                }
            }

            @Override
            public boolean visit(Project project, int rowIndex, Row row) {
                List<CellData> cells = new ArrayList<TabularSerializer.CellData>(columnNames.size());
                int nonBlankCount = 0;
               
                for (String columnName : columnNames) {
                    Column column = project.columnModel.getColumnByName(columnName);
                    CellFormatter formatter = columnNameToFormatter.get(columnName);
                    CellData cellData = formatter.format(
                        project,
                        column,
                        row.getCell(column.getCellIndex()));
                   
                    cells.add(cellData);
View Full Code Here


                            text = dateFormatter.format((Date) value);
                        } else {
                            text = value.toString();
                        }
                    }
                    return new CellData(column.getName(), value, text, link);
                }
            }
            return null;
        }
View Full Code Here

TOP

Related Classes of com.google.refine.exporters.TabularSerializer.CellData

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.