Class UniVocityCsvDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.UniVocityCsvDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<UniVocityCsvDataFormat>
- Enclosing class:
- UniVocityCsvDataFormat
public static class UniVocityCsvDataFormat.Builder extends Object
Builder
is a specific builder forUniVocityCsvDataFormat
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
asMap(boolean asMap)
Whether the unmarshalling should produce maps for the lines values instead of lists.T
asMap(String asMap)
Whether the unmarshalling should produce maps for the lines values instead of lists.T
comment(String comment)
The comment symbol.UniVocityCsvDataFormat.Builder
delimiter(String delimiter)
The delimiter of valuesT
emptyValue(String emptyValue)
The String representation of an empty valueUniVocityCsvDataFormat
end()
Ends the build of the data format.T
headerExtractionEnabled(boolean headerExtractionEnabled)
Whether or not the header must be read in the first line of the test documentT
headerExtractionEnabled(String headerExtractionEnabled)
Whether or not the header must be read in the first line of the test documentT
headers(List<UniVocityHeader> headers)
The headers to use.T
headersDisabled(boolean headersDisabled)
Whether or not the headers are disabled.T
headersDisabled(String headersDisabled)
Whether or not the headers are disabled.T
ignoreLeadingWhitespaces(boolean ignoreLeadingWhitespaces)
Whether or not the leading white spaces must be ignored.T
ignoreLeadingWhitespaces(String ignoreLeadingWhitespaces)
Whether or not the leading white spaces must be ignored.T
ignoreTrailingWhitespaces(boolean ignoreTrailingWhitespaces)
Whether or not the trailing white spaces must be ignored.T
ignoreTrailingWhitespaces(String ignoreTrailingWhitespaces)
Whether or not the trailing white spaces must be ignored.T
lazyLoad(boolean lazyLoad)
Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one.T
lazyLoad(String lazyLoad)
Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one.T
lineSeparator(String lineSeparator)
The line separator of the filesT
normalizedLineSeparator(String normalizedLineSeparator)
The normalized line separator of the filesT
nullValue(String nullValue)
The string representation of a null value.T
numberOfRecordsToRead(int numberOfRecordsToRead)
The maximum number of record to read.T
numberOfRecordsToRead(String numberOfRecordsToRead)
The maximum number of record to read.UniVocityCsvDataFormat.Builder
quote(String quote)
The quote symbol.UniVocityCsvDataFormat.Builder
quoteAllFields(boolean quoteAllFields)
Whether or not all values must be quoted when writing them.UniVocityCsvDataFormat.Builder
quoteAllFields(String quoteAllFields)
Whether or not all values must be quoted when writing them.UniVocityCsvDataFormat.Builder
quoteEscape(String quoteEscape)
The quote escape symbolT
skipEmptyLines(boolean skipEmptyLines)
Whether or not the empty lines must be ignored.T
skipEmptyLines(String skipEmptyLines)
Whether or not the empty lines must be ignored.
-
-
-
Method Detail
-
quoteAllFields
public UniVocityCsvDataFormat.Builder quoteAllFields(String quoteAllFields)
Whether or not all values must be quoted when writing them.
-
quoteAllFields
public UniVocityCsvDataFormat.Builder quoteAllFields(boolean quoteAllFields)
Whether or not all values must be quoted when writing them.
-
quote
public UniVocityCsvDataFormat.Builder quote(String quote)
The quote symbol.
-
quoteEscape
public UniVocityCsvDataFormat.Builder quoteEscape(String quoteEscape)
The quote escape symbol
-
delimiter
public UniVocityCsvDataFormat.Builder delimiter(String delimiter)
The delimiter of values
-
end
public UniVocityCsvDataFormat end()
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Returns:
- the data format fully built.
-
nullValue
public T nullValue(String nullValue)
The string representation of a null value. The default value is null
-
skipEmptyLines
public T skipEmptyLines(String skipEmptyLines)
Whether or not the empty lines must be ignored. The default value is true
-
skipEmptyLines
public T skipEmptyLines(boolean skipEmptyLines)
Whether or not the empty lines must be ignored. The default value is true
-
ignoreTrailingWhitespaces
public T ignoreTrailingWhitespaces(String ignoreTrailingWhitespaces)
Whether or not the trailing white spaces must be ignored. The default value is true
-
ignoreTrailingWhitespaces
public T ignoreTrailingWhitespaces(boolean ignoreTrailingWhitespaces)
Whether or not the trailing white spaces must be ignored. The default value is true
-
ignoreLeadingWhitespaces
public T ignoreLeadingWhitespaces(String ignoreLeadingWhitespaces)
Whether or not the leading white spaces must be ignored. The default value is true
-
ignoreLeadingWhitespaces
public T ignoreLeadingWhitespaces(boolean ignoreLeadingWhitespaces)
Whether or not the leading white spaces must be ignored. The default value is true
-
headersDisabled
public T headersDisabled(String headersDisabled)
Whether or not the headers are disabled. When defined, this option explicitly sets the headers as null which indicates that there is no header. The default value is false
-
headersDisabled
public T headersDisabled(boolean headersDisabled)
Whether or not the headers are disabled. When defined, this option explicitly sets the headers as null which indicates that there is no header. The default value is false
-
headers
public T headers(List<UniVocityHeader> headers)
The headers to use.
-
headerExtractionEnabled
public T headerExtractionEnabled(String headerExtractionEnabled)
Whether or not the header must be read in the first line of the test document The default value is false
-
headerExtractionEnabled
public T headerExtractionEnabled(boolean headerExtractionEnabled)
Whether or not the header must be read in the first line of the test document The default value is false
-
numberOfRecordsToRead
public T numberOfRecordsToRead(String numberOfRecordsToRead)
The maximum number of record to read.
-
numberOfRecordsToRead
public T numberOfRecordsToRead(int numberOfRecordsToRead)
The maximum number of record to read.
-
emptyValue
public T emptyValue(String emptyValue)
The String representation of an empty value
-
lineSeparator
public T lineSeparator(String lineSeparator)
The line separator of the files The default value is to use the JVM platform line separator
-
normalizedLineSeparator
public T normalizedLineSeparator(String normalizedLineSeparator)
The normalized line separator of the files The default value is a new line character.
-
comment
public T comment(String comment)
The comment symbol. The default value is #
-
lazyLoad
public T lazyLoad(String lazyLoad)
Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one. The default value is false
-
lazyLoad
public T lazyLoad(boolean lazyLoad)
Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one. The default value is false
-
asMap
public T asMap(String asMap)
Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected). The default value is false
-
asMap
public T asMap(boolean asMap)
Whether the unmarshalling should produce maps for the lines values instead of lists. It requires to have header (either defined or collected). The default value is false
-
-