Annotation Type CsvFile


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface CsvFile
    Various settings applying to the entire CSV file and BeanInstructions.
    Author:
    Robert Bor
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      char comment
      All lines starting with this symbol (must be at the first encountered position) will be considered comments, which are ignored by the parser
      char[] endOfLine
      The symbols all eligible as end-of-line markers.
      char escape
      The symbol which escapes a quote character while inside a quoted string.
      Class<? extends AbstractMapper> mappingStrategy
      Determines the strategy to employ for mapping between CSV and Bean.
      char quote
      The quote symbol is the sign on both sides of the field value.
      boolean quotingEnabled
      Sets whether or not quotes are written around the field values.
      char separator
      The separator is the symbol between two fields.
      boolean skipCommentLines
      Ascertains that comment lines are skipped.
      boolean skipEmptyLines
      Ascertains that empty lines are skipped.
      int startIndexDynamicColumns
      The column where the dynamic headers start.
      int startRow
      The point from where the lines must be read, including the structure (if applicable).
      boolean useHeader
      States whether the first line will be used as a structure line.
    • Element Detail

      • escape

        char escape
        The symbol which escapes a quote character while inside a quoted string. By default a double quote (")
        Returns:
        escape character
        Default:
        '\"'
      • quote

        char quote
        The quote symbol is the sign on both sides of the field value. By default this will be a double quote
        Returns:
        quote symbol for a field
        Default:
        '\"'
      • quotingEnabled

        boolean quotingEnabled
        Sets whether or not quotes are written around the field values. If enabled, the character set as the escape symbol will be disabled. If disabled, no quotes are written around the field values and the escape symbol is not escaped. This setting has no effect when reading CSV files, only when writing them.
        Returns:
        whether or not to write quotes around field values
        Default:
        true
      • separator

        char separator
        The separator is the symbol between two fields. By default this will be a semi-colon
        Returns:
        separator between two fields
        Default:
        ';'
      • endOfLine

        char[] endOfLine
        The symbols all eligible as end-of-line markers. By default \r and \n are both eol symbols
        Returns:
        all the eligible eol symbols
        Default:
        {'\r', '\n'}
      • comment

        char comment
        All lines starting with this symbol (must be at the first encountered position) will be considered comments, which are ignored by the parser
        Returns:
        comment symbol
        Default:
        '#'
      • useHeader

        boolean useHeader
        States whether the first line will be used as a structure line. If this is not the case, the mapping will be done based on column indexes.
        Returns:
        whether to use the first line as a structure or not
        Default:
        true
      • startRow

        int startRow
        The point from where the lines must be read, including the structure (if applicable). By default, this value is 1 and includes the header. Note that row counting starts at 1, not at 0, ie CSVeed is 1-based to be more aligned with the Excel user who receives the error report, not the developer.
        Returns:
        the point from where lines must be converted, 1-based
        Default:
        1
      • skipEmptyLines

        boolean skipEmptyLines
        Ascertains that empty lines are skipped. If this value is false, empty lines will be parsed as single column rows. Default values is true.
        Returns:
        whether empty files must be skipped
        Default:
        true
      • skipCommentLines

        boolean skipCommentLines
        Ascertains that comment lines are skipped. If this value is false, the comment marker is ignored. Normally, this method should not be needed. Use only if you want to have 100% certainty that lines identified as comment lines are never skipped. Default value is true.
        Returns:
        whether comment lines (marked with a comment marker on the first position) must be skipped
        Default:
        true
      • startIndexDynamicColumns

        int startIndexDynamicColumns
        The column where the dynamic headers start. All columns following this column are automatically assumed to be dynamic also.
        Returns:
        index where dynamic columns start
        Default:
        0
      • mappingStrategy

        Class<? extends AbstractMapper> mappingStrategy
        Determines the strategy to employ for mapping between CSV and Bean. The default will be to map on the basis of the column index
        Returns:
        the mapping strategy
        Default:
        org.csveed.bean.ColumnIndexMapper.class