Annotation Type CsvRecord


  • @Documented
    @Retention(RUNTIME)
    public @interface CsvRecord
    This annotation represents the root class of the model. When a CSV, fixed-length record must be described in the model we will use this annotation and the separator (for csv record) to know how to split the data during the unmarshal process The separator (mandatory) The name is optional and could be used in the future to bind a property which a different name The skipfirstline (optional) allows to skip the first line of the file/content received The generateHeaderColumnNames (optional) allow to add in the CSV generated the header containing names of the columns The crlf (optional) is used to add a new line after a record. By default, the value is WINDOWS The isOrdered (optional) boolean is used to ordered the message generated in output
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String separator
      Separator used to split a record in tokens (mandatory) - can be ',' or ';' or 'anything'.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean allowEmptyStream
      The allowEmptyStream parameter will allow to prcoess the unavaiable stream for CSV file.
      boolean autospanLine
      Last record spans rest of line (optional) - if enabled then the last column is auto spanned to end of line, for example if its a comment, etc this allows the line to contain all characters, also the delimiter char.
      String crlf
      Character to be used to add a carriage return after each record (optional) - allow to define the carriage return character to use.
      boolean endWithLineBreak
      The endWithLineBreak parameter flags if the CSV file should end with a line break or not (optional)
      boolean generateHeaderColumns
      The generateHeaderColumns parameter allow to add in the CSV generated the header containing names of the columns
      boolean isOrdered
      Indicates if the message must be ordered in output
      String name
      Name describing the record (optional)
      String quote
      Whether to marshal columns with the given quote character (optional) - allow to specify a quote character of the fields when CSV is generated.
      boolean quoting
      Indicate if the values (and headers) must be quoted when marshaling (optional)
      boolean quotingEscaped
      Indicate if the values must be escaped when quoting (optional)
      boolean removeQuotes
      The remove quotes parameter flags if unmarshalling should try to remove quotes for each field
      boolean skipField
      The skipField parameter will allow to skip fields of a CSV file.
      boolean skipFirstLine
      The skipFirstLine parameter will allow to skip or not the first line of a CSV file.
    • Element Detail

      • separator

        String separator
        Separator used to split a record in tokens (mandatory) - can be ',' or ';' or 'anything'. The only whitespace character supported is tab (\t). No other whitespace characters (spaces) are not supported. This value is interpreted as a regular expression. If you want to use a sign which has a special meaning in regular expressions, e.g. the '\|' sign, then you have to mask it, like '\|'
      • name

        String name
        Name describing the record (optional)
        Default:
        ""
      • skipFirstLine

        boolean skipFirstLine
        The skipFirstLine parameter will allow to skip or not the first line of a CSV file. This line often contains columns definition
        Default:
        false
      • skipField

        boolean skipField
        The skipField parameter will allow to skip fields of a CSV file. If some fields are not necessary, they can be skipped.
        Default:
        false
      • crlf

        String crlf
        Character to be used to add a carriage return after each record (optional) - allow to define the carriage return character to use. If you specify a value other than the three listed before, the value you enter (custom) will be used as the CRLF character(s). Three values can be used : WINDOWS, UNIX, MAC, or custom.
        Default:
        "WINDOWS"
      • generateHeaderColumns

        boolean generateHeaderColumns
        The generateHeaderColumns parameter allow to add in the CSV generated the header containing names of the columns
        Default:
        false
      • isOrdered

        boolean isOrdered
        Indicates if the message must be ordered in output
        Default:
        false
      • quote

        String quote
        Whether to marshal columns with the given quote character (optional) - allow to specify a quote character of the fields when CSV is generated. This annotation is associated to the root class of the model and must be declared one time.
        Default:
        "\""
      • quoting

        boolean quoting
        Indicate if the values (and headers) must be quoted when marshaling (optional)
        Default:
        false
      • quotingEscaped

        boolean quotingEscaped
        Indicate if the values must be escaped when quoting (optional)
        Default:
        false
      • autospanLine

        boolean autospanLine
        Last record spans rest of line (optional) - if enabled then the last column is auto spanned to end of line, for example if its a comment, etc this allows the line to contain all characters, also the delimiter char.
        Default:
        false
      • allowEmptyStream

        boolean allowEmptyStream
        The allowEmptyStream parameter will allow to prcoess the unavaiable stream for CSV file.
        Default:
        false
      • endWithLineBreak

        boolean endWithLineBreak
        The endWithLineBreak parameter flags if the CSV file should end with a line break or not (optional)
        Default:
        true
      • removeQuotes

        boolean removeQuotes
        The remove quotes parameter flags if unmarshalling should try to remove quotes for each field
        Default:
        true