Class BeanioDataFormat
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.model.DataFormatDefinition
-
- org.apache.camel.model.dataformat.BeanioDataFormat
-
@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).
-
-
Constructor Summary
Constructors Constructor Description BeanioDataFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBeanReaderErrorHandlerType()
String
getEncoding()
String
getIgnoreInvalidRecords()
String
getIgnoreUnexpectedRecords()
String
getIgnoreUnidentifiedRecords()
String
getMapping()
String
getStreamName()
String
getUnmarshalSingleObject()
void
setBeanReaderErrorHandlerType(String beanReaderErrorHandlerType)
To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing.void
setEncoding(String encoding)
The charset to use.void
setIgnoreInvalidRecords(String ignoreInvalidRecords)
Whether to ignore invalid records.void
setIgnoreUnexpectedRecords(String ignoreUnexpectedRecords)
Whether to ignore unexpected records.void
setIgnoreUnidentifiedRecords(String ignoreUnidentifiedRecords)
Whether to ignore unidentified records.void
setMapping(String mapping)
The BeanIO mapping file.void
setStreamName(String streamName)
The name of the stream to use.void
setUnmarshalSingleObject(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, setDataFormatName
-
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
-
-
-
Method Detail
-
getMapping
public String getMapping()
-
setMapping
public void setMapping(String mapping)
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
public String getStreamName()
-
setStreamName
public void setStreamName(String streamName)
The name of the stream to use.
-
getIgnoreUnidentifiedRecords
public String getIgnoreUnidentifiedRecords()
-
setIgnoreUnidentifiedRecords
public void setIgnoreUnidentifiedRecords(String ignoreUnidentifiedRecords)
Whether to ignore unidentified records.
-
getIgnoreUnexpectedRecords
public String getIgnoreUnexpectedRecords()
-
setIgnoreUnexpectedRecords
public void setIgnoreUnexpectedRecords(String ignoreUnexpectedRecords)
Whether to ignore unexpected records.
-
getIgnoreInvalidRecords
public String getIgnoreInvalidRecords()
-
setIgnoreInvalidRecords
public void setIgnoreInvalidRecords(String ignoreInvalidRecords)
Whether to ignore invalid records.
-
getEncoding
public String getEncoding()
-
setEncoding
public void setEncoding(String encoding)
The charset to use. Is by default the JVM platform default charset.
-
getBeanReaderErrorHandlerType
public String getBeanReaderErrorHandlerType()
-
setBeanReaderErrorHandlerType
public void setBeanReaderErrorHandlerType(String beanReaderErrorHandlerType)
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
public String getUnmarshalSingleObject()
-
setUnmarshalSingleObject
public void setUnmarshalSingleObject(String unmarshalSingleObject)
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.
-
-