Class UniVocityFixedDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.UniVocityFixedDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<UniVocityFixedDataFormat>
- Enclosing class:
- UniVocityFixedDataFormat
public static class UniVocityFixedDataFormat.Builder extends Object
Builder
is a specific builder forUniVocityFixedDataFormat
.
-
-
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.T
emptyValue(String emptyValue)
The String representation of an empty valueUniVocityFixedDataFormat
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.UniVocityFixedDataFormat.Builder
padding(String padding)
The padding character.UniVocityFixedDataFormat.Builder
recordEndsOnNewline(boolean recordEndsOnNewline)
Whether or not the record ends on new line.UniVocityFixedDataFormat.Builder
recordEndsOnNewline(String recordEndsOnNewline)
Whether or not the record ends on new line.T
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.UniVocityFixedDataFormat.Builder
skipTrailingCharsUntilNewline(boolean skipTrailingCharsUntilNewline)
Whether or not the trailing characters until new line must be ignored.UniVocityFixedDataFormat.Builder
skipTrailingCharsUntilNewline(String skipTrailingCharsUntilNewline)
Whether or not the trailing characters until new line must be ignored.
-
-
-
Method Detail
-
skipTrailingCharsUntilNewline
public UniVocityFixedDataFormat.Builder skipTrailingCharsUntilNewline(String skipTrailingCharsUntilNewline)
Whether or not the trailing characters until new line must be ignored. The default value is false
-
skipTrailingCharsUntilNewline
public UniVocityFixedDataFormat.Builder skipTrailingCharsUntilNewline(boolean skipTrailingCharsUntilNewline)
Whether or not the trailing characters until new line must be ignored. The default value is false
-
recordEndsOnNewline
public UniVocityFixedDataFormat.Builder recordEndsOnNewline(String recordEndsOnNewline)
Whether or not the record ends on new line. The default value is false
-
recordEndsOnNewline
public UniVocityFixedDataFormat.Builder recordEndsOnNewline(boolean recordEndsOnNewline)
Whether or not the record ends on new line. The default value is false
-
padding
public UniVocityFixedDataFormat.Builder padding(String padding)
The padding character. The default value is a space
-
end
public UniVocityFixedDataFormat 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
-
-