[
https://issues.apache.org/jira/browse/CSV-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252478#comment-15252478
]
Joey Pinto commented on CSV-174:
--------------------------------
Hello Emanuel,
I'm glad you liked the idea of better identification of parsing errors.
My team is currently building an ERP solution for a university. The ERP uses
postgresql as its database server. The faulty often needs to upload DSV data
and have it stored into the database. There may be avariety of issues when this
is done, For example changed headers, column order, blank cells, empty rows and
a lot more. I think Commons.CSV can really handle all this to make life easy
for our developers
> Adding methods to support JSON-CSV interchangeability and adding a
> class/methods to support direct cell modification
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CSV-174
> URL: https://issues.apache.org/jira/browse/CSV-174
> Project: Commons CSV
> Issue Type: Improvement
> Components: Build
> Reporter: Joey Pinto
> Labels: gsoc2016
>
> I wish to introduce some major features in the Commons CSV that I found
> really necessary while dealing with CSV file parsing requirements of an ERP
> for a University.
> 1.Custom Exceptions:
> Exceptions to be raised when incorrectly formatted CSVs are parsed
> specifying the row number mentioning reasons like incorrect number of columns.
> 2. Export to JSON:
> PostgreSQL Supports direct import of JSON Code. So to insert data from a CSV
> into the database I had to first convert it to JSON and then make the insert.
> If we could have an option to do this directly it would be a lot more time
> saving.
> 3.New Class CSVFile
> I wish to introduce a new class CSVFile which shall have the entire contents
> of the CSV stored in nested Array Lists.
> I shall have the following methods in the class:
> Constructors:
> void CSVFile(CSVParser);
> void CSVFile(Object [][],boolean has_headers);
> void CSVFile(JSON Array,boolean allow_blanks);
> void CSVFile(String text,String cell_delimiter,String line_delimiter,boolean
> force_headerSchema);
> Printers:
> String CSVFile.toString();
> JSONArray CSVFile.toJSONArray();
> Object[][] CSVFile.toArray();
> ResultSet CSVFile.toResultSet();
> ArrayList<Object[]> CSVFile.toArrayList();
> ArrayList<ArrayList<Object>> CSVFile.toNestedArrayList();
> String CSVFile.toString();
> Access:
> CSVFile.setColumnHeader(int col_number);
> String CSVFile.getCell(int row_number,String header);
> String CSVFile.getCell(int row_number,int col_number);
> CSVFile.setCell(int row_number,int col_number,String value);
> CSVFile.setCell(int row_number,String header,String value);
> CSVFile.getRowArray();
> JSONObject CSVFile.getRowJSON();
> Sorting:
> CSVFile.sort(Comparator());
> Extraction:
> CSVFile CSVFile.getColumns(Arraylist<String> headers);
> CSVFile CSVFile.getRows(extractor());
> @override
> public boolean include(CSVRecord record){
> //if satisfies Condition then include
> return true;
> //else return false
> }
> Delete:
> void CSVFile.removeRow(int row_number);
> void CSVFile.remove Section(int start_row,int end_row);
> void CSVFile.CSVFile.removeRows(extractor());
> void CSVFile.removeColumn(int col_number);
> void CSVFile.removeColumn(String header);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)