-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#228] Skeleton code to implement unified tabular processing
Not complete -- tests are failing here.
- Loading branch information
Showing
5 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/CSVReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cz.cvut.spipes.modules.tabular; | ||
|
||
import org.supercsv.io.ICsvListReader; | ||
|
||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class CSVReader implements TabularReader { | ||
|
||
ICsvListReader listReader; | ||
|
||
public CSVReader(ICsvListReader listReader) { | ||
this.listReader = listReader; | ||
} | ||
|
||
@Override | ||
public List<String> getHeader() throws IOException { | ||
return Arrays.asList((listReader.getHeader(true))); // skip the header (can't be used with CsvListReader); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/ExcelReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package cz.cvut.spipes.modules.tabular; | ||
|
||
public class ExcelReader { | ||
} |
4 changes: 4 additions & 0 deletions
4
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package cz.cvut.spipes.modules.tabular; | ||
|
||
public class HtmlReader { | ||
} |
8 changes: 8 additions & 0 deletions
8
...es-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/TabularReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package cz.cvut.spipes.modules.tabular; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public interface TabularReader { | ||
List<String> getHeader() throws IOException; | ||
} |