Class CsvDataFormat


@Metadata(firstVersion="1.3.0", label="dataformat,transformation,csv", title="CSV") public class CsvDataFormat extends DataFormatDefinition
Handle CSV (Comma Separated Values) payloads.
  • Constructor Details

    • CsvDataFormat

      public CsvDataFormat()
    • CsvDataFormat

      public CsvDataFormat(String delimiter)
    • CsvDataFormat

      public CsvDataFormat(boolean lazyLoad)
  • Method Details

    • setMarshallerFactoryRef

      public void setMarshallerFactoryRef(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.
      Parameters:
      marshallerFactoryRef - the CsvMarshallerFactory reference.
    • getMarshallerFactoryRef

      public String getMarshallerFactoryRef()
      Returns the CsvMarshallerFactory reference.
      Returns:
      the CsvMarshallerFactory or null if none has been specified.
    • getFormatRef

      public String getFormatRef()
    • setFormatRef

      public void setFormatRef(String formatRef)
      The reference format to use, it will be updated with the other format options, the default value is CSVFormat.DEFAULT
    • getFormatName

      public String getFormatName()
    • setFormatName

      public void setFormatName(String formatName)
      The name of the format to use, the default value is CSVFormat.DEFAULT
    • getCommentMarkerDisabled

      public String getCommentMarkerDisabled()
    • setCommentMarkerDisabled

      public void setCommentMarkerDisabled(String commentMarkerDisabled)
      Disables the comment marker of the reference format.
    • getCommentMarker

      public String getCommentMarker()
    • setCommentMarker

      public void setCommentMarker(String commentMarker)
      Sets the comment marker of the reference format.
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)
      Sets the delimiter to use.

      The default value is , (comma)

    • getEscapeDisabled

      public String getEscapeDisabled()
    • setEscapeDisabled

      public void setEscapeDisabled(String escapeDisabled)
      Use for disabling using escape character
    • getEscape

      public String getEscape()
    • setEscape

      public void setEscape(String escape)
      Sets the escape character to use
    • getHeaderDisabled

      public String getHeaderDisabled()
      Use for disabling headers
    • setHeaderDisabled

      public void setHeaderDisabled(String headerDisabled)
    • getHeader

      public List<String> getHeader()
    • setHeader

      public void setHeader(List<String> header)
      To configure the CSV headers
    • getAllowMissingColumnNames

      public String getAllowMissingColumnNames()
    • setAllowMissingColumnNames

      public void setAllowMissingColumnNames(String allowMissingColumnNames)
      Whether to allow missing column names.
    • getIgnoreEmptyLines

      public String getIgnoreEmptyLines()
    • setIgnoreEmptyLines

      public void setIgnoreEmptyLines(String ignoreEmptyLines)
      Whether to ignore empty lines.
    • getIgnoreSurroundingSpaces

      public String getIgnoreSurroundingSpaces()
    • setIgnoreSurroundingSpaces

      public void setIgnoreSurroundingSpaces(String ignoreSurroundingSpaces)
      Whether to ignore surrounding spaces
    • getNullStringDisabled

      public String getNullStringDisabled()
    • setNullStringDisabled

      public void setNullStringDisabled(String nullStringDisabled)
      Used to disable null strings
    • getNullString

      public String getNullString()
    • setNullString

      public void setNullString(String nullString)
      Sets the null string
    • getQuoteDisabled

      public String getQuoteDisabled()
    • setQuoteDisabled

      public void setQuoteDisabled(String quoteDisabled)
      Used to disable quotes
    • getQuote

      public String getQuote()
    • setQuote

      public void setQuote(String quote)
      Sets the quote which by default is "
    • getRecordSeparatorDisabled

      public String getRecordSeparatorDisabled()
    • setRecordSeparatorDisabled

      public void setRecordSeparatorDisabled(String recordSeparatorDisabled)
      Used for disabling record separator
    • getRecordSeparator

      public String getRecordSeparator()
    • setRecordSeparator

      public void setRecordSeparator(String recordSeparator)
      Sets the record separator (aka new line) which by default is new line characters (CRLF)
    • getSkipHeaderRecord

      public String getSkipHeaderRecord()
    • setSkipHeaderRecord

      public void setSkipHeaderRecord(String skipHeaderRecord)
      Whether to skip the header record in the output
    • getQuoteMode

      public String getQuoteMode()
    • setQuoteMode

      public void setQuoteMode(String quoteMode)
      Sets the quote mode
    • getLazyLoad

      public String getLazyLoad()
    • setLazyLoad

      public void setLazyLoad(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.
    • getUseMaps

      public String getUseMaps()
    • setUseMaps

      public void setUseMaps(String useMaps)
      Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists. It requires to have header (either defined or collected).
    • getUseOrderedMaps

      public String getUseOrderedMaps()
    • setUseOrderedMaps

      public void setUseOrderedMaps(String 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).
    • getRecordConverterRef

      public String getRecordConverterRef()
    • setRecordConverterRef

      public void setRecordConverterRef(String recordConverterRef)
      Refers to a custom CsvRecordConverter to lookup from the registry to use.
    • setTrim

      public void setTrim(String trim)
      Sets whether or not to trim leading and trailing blanks.
    • getTrim

      public String getTrim()
    • setIgnoreHeaderCase

      public void setIgnoreHeaderCase(String ignoreHeaderCase)
      Sets whether or not to ignore case when accessing header names.
    • getIgnoreHeaderCase

      public String getIgnoreHeaderCase()
    • setTrailingDelimiter

      public void setTrailingDelimiter(String trailingDelimiter)
      Sets whether or not to add a trailing delimiter.
    • getTrailingDelimiter

      public String getTrailingDelimiter()
    • getCaptureHeaderRecord

      public String getCaptureHeaderRecord()
    • setCaptureHeaderRecord

      public void setCaptureHeaderRecord(String captureHeaderRecord)
      Whether the unmarshalling should capture the header record and store it in the message header