Class CsvDataFormat.Builder
java.lang.Object
org.apache.camel.model.dataformat.CsvDataFormat.Builder
- All Implemented Interfaces:
DataFormatBuilder<CsvDataFormat>
- Enclosing class:
- CsvDataFormat
public static class CsvDataFormat.Builder
extends Object
implements DataFormatBuilder<CsvDataFormat>
Builder
is a specific builder for CsvDataFormat
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowMissingColumnNames
(boolean allowMissingColumnNames) Whether to allow missing column names.allowMissingColumnNames
(String allowMissingColumnNames) Whether to allow missing column names.captureHeaderRecord
(boolean captureHeaderRecord) Whether the unmarshalling should capture the header record and store it in the message headercaptureHeaderRecord
(String captureHeaderRecord) Whether the unmarshalling should capture the header record and store it in the message headercommentMarker
(String commentMarker) Sets the comment marker of the reference format.commentMarkerDisabled
(boolean commentMarkerDisabled) Disables the comment marker of the reference format.commentMarkerDisabled
(String commentMarkerDisabled) Disables the comment marker of the reference format.Sets the delimiter to use.end()
Ends the build of the data format.Sets the escape character to useescapeDisabled
(boolean escapeDisabled) Use for disabling using escape characterescapeDisabled
(String escapeDisabled) Use for disabling using escape characterformatName
(String formatName) The name of the format to use, the default value is CSVFormat.DEFAULTThe reference format to use, it will be updated with the other format options, the default value is CSVFormat.DEFAULTTo configure the CSV headersheaderDisabled
(boolean headerDisabled) headerDisabled
(String headerDisabled) ignoreEmptyLines
(boolean ignoreEmptyLines) Whether to ignore empty lines.ignoreEmptyLines
(String ignoreEmptyLines) Whether to ignore empty lines.ignoreHeaderCase
(boolean ignoreHeaderCase) Sets whether or not to ignore case when accessing header names.ignoreHeaderCase
(String ignoreHeaderCase) Sets whether or not to ignore case when accessing header names.ignoreSurroundingSpaces
(boolean ignoreSurroundingSpaces) Whether to ignore surrounding spacesignoreSurroundingSpaces
(String ignoreSurroundingSpaces) Whether to ignore surrounding spaceslazyLoad
(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.Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all the lines must be read at one.marshallerFactoryRef
(String marshallerFactoryRef) Sets the implementation of the CsvMarshallerFactory interface which is able to customize marshalling/unmarshalling behavior by extending CsvMarshaller or creating it from scratch.nullString
(String nullString) Sets the null stringnullStringDisabled
(boolean nullStringDisabled) Used to disable null stringsnullStringDisabled
(String nullStringDisabled) Used to disable null stringsSets the quote which by default is "quoteDisabled
(boolean quoteDisabled) Used to disable quotesquoteDisabled
(String quoteDisabled) Used to disable quotesSets the quote moderecordConverterRef
(String recordConverterRef) Refers to a custom CsvRecordConverter to lookup from the registry to use.recordSeparator
(String recordSeparator) Sets the record separator (aka new line) which by default is new line characters (CRLF)recordSeparatorDisabled
(String recordSeparatorDisabled) Used for disabling record separatorskipHeaderRecord
(boolean skipHeaderRecord) Whether to skip the header record in the outputskipHeaderRecord
(String skipHeaderRecord) Whether to skip the header record in the outputtrailingDelimiter
(boolean trailingDelimiter) Sets whether or not to add a trailing delimiter.trailingDelimiter
(String trailingDelimiter) Sets whether or not to add a trailing delimiter.trim
(boolean trim) Sets whether or not to trim leading and trailing blanks.Sets whether or not to trim leading and trailing blanks.useMaps
(boolean useMaps) Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists.Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists.useOrderedMaps
(boolean useOrderedMaps) Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values instead of lists.useOrderedMaps
(String useOrderedMaps) Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values instead of lists.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
marshallerFactoryRef
Sets the implementation of the CsvMarshallerFactory interface which is able to customize marshalling/unmarshalling behavior by extending CsvMarshaller or creating it from scratch.- Parameters:
marshallerFactoryRef
- theCsvMarshallerFactory
reference.
-
formatRef
The reference format to use, it will be updated with the other format options, the default value is CSVFormat.DEFAULT -
formatName
The name of the format to use, the default value is CSVFormat.DEFAULT -
commentMarkerDisabled
Disables the comment marker of the reference format. -
commentMarkerDisabled
Disables the comment marker of the reference format. -
commentMarker
Sets the comment marker of the reference format. -
delimiter
Sets the delimiter to use. The default value is , (comma) -
escapeDisabled
Use for disabling using escape character -
escapeDisabled
Use for disabling using escape character -
escape
Sets the escape character to use -
headerDisabled
-
headerDisabled
-
header
To configure the CSV headers -
allowMissingColumnNames
Whether to allow missing column names. -
allowMissingColumnNames
Whether to allow missing column names. -
ignoreEmptyLines
Whether to ignore empty lines. -
ignoreEmptyLines
Whether to ignore empty lines. -
ignoreSurroundingSpaces
Whether to ignore surrounding spaces -
ignoreSurroundingSpaces
Whether to ignore surrounding spaces -
nullStringDisabled
Used to disable null strings -
nullStringDisabled
Used to disable null strings -
nullString
Sets the null string -
quoteDisabled
Used to disable quotes -
quoteDisabled
Used to disable quotes -
quote
Sets the quote which by default is " -
recordSeparatorDisabled
Used for disabling record separator -
recordSeparator
Sets the record separator (aka new line) which by default is new line characters (CRLF) -
skipHeaderRecord
Whether to skip the header record in the output -
skipHeaderRecord
Whether to skip the header record in the output -
quoteMode
Sets the quote mode -
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. -
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. -
useMaps
Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists. It requires to have header (either defined or collected). -
useMaps
Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists. It requires to have header (either defined or collected). -
useOrderedMaps
Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values instead of lists. It requires to have header (either defined or collected). -
useOrderedMaps
Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values instead of lists. It requires to have header (either defined or collected). -
recordConverterRef
Refers to a custom CsvRecordConverter to lookup from the registry to use. -
trim
Sets whether or not to trim leading and trailing blanks. -
trim
Sets whether or not to trim leading and trailing blanks. -
ignoreHeaderCase
Sets whether or not to ignore case when accessing header names. -
ignoreHeaderCase
Sets whether or not to ignore case when accessing header names. -
trailingDelimiter
Sets whether or not to add a trailing delimiter. -
trailingDelimiter
Sets whether or not to add a trailing delimiter. -
captureHeaderRecord
Whether the unmarshalling should capture the header record and store it in the message header -
captureHeaderRecord
Whether the unmarshalling should capture the header record and store it in the message header -
end
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<CsvDataFormat>
- Returns:
- the data format fully built.
-