Class 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 Details

    • BeanioDataFormat

      public BeanioDataFormat()
  • Method Details

    • 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.