Skip to content
Snippets Groups Projects
Commit ac186617 authored by Richard Schmidt's avatar Richard Schmidt
Browse files

Add unfinished changes to csvparser package

parent 9b8d76dc
No related branches found
No related tags found
1 merge request!11Feat/csv data importer overhaul
......@@ -151,7 +151,7 @@ public final class App {
// Parse csv data
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
InputStream csvStream = classloader.getResourceAsStream("examples/csv/0_bar_chart_vertical.csv");
InputStream csvStream = classloader.getResourceAsStream("examples/csv/0_bar_chart_categorical.csv");
Reader csvReader = new BufferedReader(new InputStreamReader(csvStream));
CsvParser csvParser = new CsvParser(csvReader, ',', '\"');
......
......@@ -33,12 +33,6 @@ public class CsvXAlignedCategoriesParser extends CsvParseAlgorithm {
Iterator<String> lineIterator = rowIterator.next().iterator();
// Move the iterator to the first category name
/*if (!lineIterator.hasNext()) {
return container;
}
lineIterator.next();*/
if (!lineIterator.hasNext()) {
return container;
......@@ -61,10 +55,9 @@ public class CsvXAlignedCategoriesParser extends CsvParseAlgorithm {
}
if (!categoriesIt.hasNext()) {
System.out.print(categories);
System.out.print("fail");
return container;
continue;
}
String category = categoriesIt.next();
PointList pointList = new SimplePointListImpl(category);
container.pushBack(pointList);
......@@ -111,11 +104,11 @@ public class CsvXAlignedCategoriesParser extends CsvParseAlgorithm {
Iterator<String> lineIterator = rowIterator.next().iterator();
// Move the iterator to the first title
if (!lineIterator.hasNext()) {
/*if (!lineIterator.hasNext()) {
return container;
}
lineIterator.next();
lineIterator.next();*/
if (!lineIterator.hasNext()) {
return container;
......
,Reihe a,Reihe b,Reihe c,Reihe d
Reihe a,Reihe b,Reihe c,Reihe d
Kat.1,3,"2,5",1,3
Kat.2,4,3,2,5
Kat.3,"4,5",3,1,"0,2"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment