Class CSVSourceTableSpec
- java.lang.Object
-
- com.orchestranetworks.addon.dint.dataconnector.spec.TableSpec
-
- com.orchestranetworks.addon.dint.dataconnector.spec.CSVSourceTableSpec
-
public final class CSVSourceTableSpec extends com.orchestranetworks.addon.dint.dataconnector.spec.TableSpec
Specification for aCSVSourceTable
.- Since:
- 4.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CSVSourceTableSpec.CSVSourceTableSpecBuilder
Builder for creating an instance ofCSVSourceTableSpec
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCSVFilePath()
Returns the path of either the individual CSV file or the CSV file inside the archive.java.lang.String
getDecimalSymbol()
Returns the decimal symbol.char
getDelimiter()
Returns the delimiter character.char
getFieldSeparator()
Returns the field separator character.java.io.File
getFile()
Returns either the CSV file or the archive file.java.lang.String
getFileEncoding()
Returns the CSV encoding.java.io.File
getInvalidDataFile()
Returns the file where invalid records are written.char
getListSeparator()
Returns the list separator character.boolean
isFirstRowHeader()
Returnstrue
if the first row is the header.static CSVSourceTableSpec.CSVSourceTableSpecBuilder
newBuilder(java.io.File csvFile)
Creates a builder instance.static CSVSourceTableSpec.CSVSourceTableSpecBuilder
newBuilderForArchive(java.io.File archiveFile, java.lang.String csvFilePathInArchive)
Creates a builder instance for a CSV file in an archive file.
-
-
-
Method Detail
-
newBuilder
public static CSVSourceTableSpec.CSVSourceTableSpecBuilder newBuilder(java.io.File csvFile)
Creates a builder instance.- Parameters:
csvFile
- The CSV source file.
-
newBuilderForArchive
public static CSVSourceTableSpec.CSVSourceTableSpecBuilder newBuilderForArchive(java.io.File archiveFile, java.lang.String csvFilePathInArchive)
Creates a builder instance for a CSV file in an archive file.- Parameters:
archiveFile
- The archive file. Supported formats:.zip
,.7z
,.tar
, .tar.gz
.csvFilePathInArchive
- The path of CSV source file in the archive file.- Throws:
java.lang.IllegalArgumentException
- If the input file is not supported.- Since:
- 4.2.0
-
getFile
public java.io.File getFile()
Returns either the CSV file or the archive file.
-
getCSVFilePath
public java.lang.String getCSVFilePath()
Returns the path of either the individual CSV file or the CSV file inside the archive.- Since:
- 4.2.0
-
getFileEncoding
public java.lang.String getFileEncoding()
Returns the CSV encoding.
-
isFirstRowHeader
public boolean isFirstRowHeader()
Returnstrue
if the first row is the header.
-
getFieldSeparator
public char getFieldSeparator()
Returns the field separator character.Returns semicolon (
;
) by default.
-
getListSeparator
public char getListSeparator()
Returns the list separator character.Returns line-break by default.
-
getDelimiter
public char getDelimiter()
Returns the delimiter character.Returns double-quote (
"
) by default.
-
getDecimalSymbol
public java.lang.String getDecimalSymbol()
Returns the decimal symbol.Returns no decimal symbol by default.
-
getInvalidDataFile
public java.io.File getInvalidDataFile()
Returns the file where invalid records are written.Returns
null
by default.- Since:
- 4.5.0
-
-