Package org.nuiton.csv
package org.nuiton.csv
This package contains a framework to import and export data from a
csv file using a model which permits us to validate what to do.
Exporter API (since 3.0)
Steps to export
- create an exporter (and configure it)
- perform export using the exporter
Example from a legacy model (with default configuration values)
ExportModel<O> model = ...;
Exporter<O> exporter = Exporter.of(model);
Iterable<O> data = ...;
String csv = exporter.writeToString(data);
Example from scratch
ExportModel<O> model = ...;
Exporter<O> exporter = Exporter
.<O>builder()
.addColum("propertyName")
.addColum("headerName", "propertyName")
.setCellSeparator(",")
.build();
Iterable<O> data = ...;
String csv = exporter.writeToString(data);
- Since:
- 2.4
- Author:
- Tony Chemit - chemit@codelutin.com
-
ClassDescriptionAbstract import esxception which contains the
ImportRowobject.Column<E,T> TODOTODOCommon.BeanProperty<E,T> Common.EnumByNameParserFormatter<E extends Enum<E>>Common.EnumByOrdinalParserFormatter<E extends Enum<E>>Be able to deal with a list value.Common.ValueSaver<E,T> CsvModel<E>Export<E>Object to realize a export from aExportModeland some datas.ExportableColumn<E,T> TODOExporter<O>Exporter contains a configuration and is ready to export some data.To build anExporter.Configuration of anExporter.ExportModel<E>TODOImport<E>Import engine for a given import model.Import2<E>ImportableColumn<E,T> TODOTo configure an import using theImport2.TODOImportModel<E>TODOException to be thrown when a parse error occurs at import time.Exception to be thrown when a read error occurs at import time.ImportRow<E>Object to box a row to import.TODOException to be thrown when a set error occurs at import time.A extendedImportto read csv lines into a single map.ModelBuilder<E>TODOTODOValueGetter<E,T> TODOValueGetterSetter<E,T> TODOValueParser<T>ValueSetter<E,T>