Class BeanioDataFormat
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.DataFormatDefinition
org.apache.camel.model.dataformat.BeanioDataFormat
- All Implemented Interfaces:
CopyableDefinition<DataFormatDefinition>
@Metadata(firstVersion="2.10.0",
label="dataformat,transformation,csv",
title="BeanIO")
public class BeanioDataFormat
extends DataFormatDefinition
Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilderis a specific builder forBeanioDataFormat. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy of this definition.voidsetBeanReaderErrorHandlerType(String beanReaderErrorHandlerType) To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing.voidsetEncoding(String encoding) The charset to use.voidsetIgnoreInvalidRecords(String ignoreInvalidRecords) Whether to ignore invalid records.voidsetIgnoreUnexpectedRecords(String ignoreUnexpectedRecords) Whether to ignore unexpected records.voidsetIgnoreUnidentifiedRecords(String ignoreUnidentifiedRecords) Whether to ignore unidentified records.voidsetMapping(String mapping) The BeanIO mapping file.voidsetStreamName(String streamName) The name of the stream to use.voidsetUnmarshalSingleObject(String unmarshalSingleObject) This options controls whether to unmarshal as a list of objects or as a single object only.Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatNameMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
BeanioDataFormat
public BeanioDataFormat() -
BeanioDataFormat
-
-
Method Details
-
copyDefinition
Description copied from interface:CopyableDefinitionMakes a copy of this definition.- Specified by:
copyDefinitionin interfaceCopyableDefinition<DataFormatDefinition>- Overrides:
copyDefinitionin classDataFormatDefinition
-
getMapping
-
setMapping
The BeanIO mapping file. Is by default loaded from the classpath. You can prefix with file:, http:, or classpath: to denote from where to load the mapping file. -
getStreamName
-
setStreamName
The name of the stream to use. -
getIgnoreUnidentifiedRecords
-
setIgnoreUnidentifiedRecords
Whether to ignore unidentified records. -
getIgnoreUnexpectedRecords
-
setIgnoreUnexpectedRecords
Whether to ignore unexpected records. -
getIgnoreInvalidRecords
-
setIgnoreInvalidRecords
Whether to ignore invalid records. -
getEncoding
-
setEncoding
The charset to use. Is by default the JVM platform default charset. -
getBeanReaderErrorHandlerType
-
setBeanReaderErrorHandlerType
To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing. Configure the fully qualified class name of the error handler. Notice the options ignoreUnidentifiedRecords, ignoreUnexpectedRecords, and ignoreInvalidRecords may not be in use when you use a custom error handler. -
getUnmarshalSingleObject
-
setUnmarshalSingleObject
This options controls whether to unmarshal as a list of objects or as a single object only. The former is the default mode, and the latter is only intended in special use-cases where beanio maps the Camel message to a single POJO bean.
-