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.TableSpecSpecification for aCSVSourceTable.- Since:
- 4.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCSVSourceTableSpec.CSVSourceTableSpecBuilderBuilder for creating an instance ofCSVSourceTableSpec.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCSVFilePath()Returns the path of either the individual CSV file or the CSV file inside the archive.java.lang.StringgetDecimalSymbol()Returns the decimal symbol.chargetDelimiter()Returns the delimiter character.chargetFieldSeparator()Returns the field separator character.java.io.FilegetFile()Returns either the CSV file or the archive file.java.lang.StringgetFileEncoding()Returns the CSV encoding.java.io.FilegetInvalidDataFile()Returns the file where invalid records are written.chargetListSeparator()Returns the list separator character.booleanisFirstRowHeader()Returnstrueif the first row is the header.static CSVSourceTableSpec.CSVSourceTableSpecBuildernewBuilder(java.io.File csvFile)Creates a builder instance.static CSVSourceTableSpec.CSVSourceTableSpecBuildernewBuilderForArchive(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()
Returnstrueif 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
nullby default.- Since:
- 4.5.0
-
-