org.apache.solr.internal.csv

## Class CSVStrategy

- java.lang.Object
- - org.apache.solr.internal.csv.CSVStrategy

- All Implemented Interfaces:
    Serializable, Cloneable

      public class CSVStrategy
      extends Object
      implements Cloneable, Serializable

  CSVStrategy Represents the strategy for a CSV.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `COMMENTS_DISABLED`
    `static String` | `DEFAULT_PRINTER_NEWLINE`
    `static CSVStrategy` | `DEFAULT_STRATEGY`
    `static char` | `ENCAPSULATOR_DISABLED`
    `static char` | `ESCAPE_DISABLED`
    `static CSVStrategy` | `EXCEL_STRATEGY`
    `static CSVStrategy` | `TDF_STRATEGY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CSVStrategy(char delimiter, char encapsulator, char commentStart)`
    `CSVStrategy(char delimiter, char encapsulator, char commentStart, char escape, boolean ignoreLeadingWhitespaces, boolean ignoreTrailingWhitespaces, boolean interpretUnicodeEscapes, boolean ignoreEmptyLines)` Deprecated. Use the ctor that also takes printerNewline. This ctor will be removed in Solr 7.
    `CSVStrategy(char delimiter, char encapsulator, char commentStart, char escape, boolean ignoreLeadingWhitespaces, boolean ignoreTrailingWhitespaces, boolean interpretUnicodeEscapes, boolean ignoreEmptyLines, String printerNewline)` Customized CSV strategy setter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `clone()` Deprecated. will be removed in Solr 7
    `char` | `getCommentStart()`
    `char` | `getDelimiter()`
    `char` | `getEncapsulator()`
    `char` | `getEscape()`
    `boolean` | `getIgnoreEmptyLines()`
    `boolean` | `getIgnoreLeadingWhitespaces()`
    `boolean` | `getIgnoreTrailingWhitespaces()`
    `String` | `getPrinterNewline()`
    `boolean` | `getUnicodeEscapeInterpretation()`
    `boolean` | `isCommentingDisabled()`
    `void` | `setCommentStart(char commentStart)` Deprecated. will be removed in Solr 7
    `void` | `setDelimiter(char delimiter)` Deprecated. will be removed in Solr 7
    `void` | `setEncapsulator(char encapsulator)` Deprecated. will be removed in Solr 7
    `void` | `setEscape(char escape)` Deprecated. will be removed in Solr 7
    `void` | `setIgnoreEmptyLines(boolean ignoreEmptyLines)` Deprecated. will be removed in Solr 7
    `void` | `setIgnoreLeadingWhitespaces(boolean ignoreLeadingWhitespaces)` Deprecated. will be removed in Solr 7
    `void` | `setIgnoreTrailingWhitespaces(boolean ignoreTrailingWhitespaces)` Deprecated. will be removed in Solr 7
    `void` | `setPrinterNewline(String newline)` Deprecated. will be removed in Solr 7
    `void` | `setUnicodeEscapeInterpretation(boolean interpretUnicodeEscapes)` Deprecated. will be removed in Solr 7

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### COMMENTS_DISABLED

          public static char COMMENTS_DISABLED

    - #### ESCAPE_DISABLED

          public static char ESCAPE_DISABLED

    - #### ENCAPSULATOR_DISABLED

          public static char ENCAPSULATOR_DISABLED

    - #### DEFAULT_PRINTER_NEWLINE

          public static String DEFAULT_PRINTER_NEWLINE

    - #### DEFAULT_STRATEGY

          public static final CSVStrategy DEFAULT_STRATEGY

    - #### EXCEL_STRATEGY

          public static final CSVStrategy EXCEL_STRATEGY

    - #### TDF_STRATEGY

          public static final CSVStrategy TDF_STRATEGY

  - ### Constructor Detail

    - #### CSVStrategy

          public CSVStrategy(char delimiter,
                             char encapsulator,
                             char commentStart)

    - #### CSVStrategy

          public CSVStrategy(char delimiter,
                             char encapsulator,
                             char commentStart,
                             char escape,
                             boolean ignoreLeadingWhitespaces,
                             boolean ignoreTrailingWhitespaces,
                             boolean interpretUnicodeEscapes,
                             boolean ignoreEmptyLines,
                             String printerNewline)

      Customized CSV strategy setter.
      Parameters:
        `delimiter` - a Char used for value separation
        `encapsulator` - a Char used as value encapsulation marker
        `commentStart` - a Char used for comment identification
        `escape` - a Char used for escaping
        `ignoreTrailingWhitespaces` - TRUE when trailing whitespaces should be ignored
        `ignoreLeadingWhitespaces` - TRUE when leading whitespaces should be ignored
        `interpretUnicodeEscapes` - TRUE when unicode escapes should be interpreted
        `ignoreEmptyLines` - TRUE when the parser should skip emtpy lines
        `printerNewline` - The string to use when printing a newline

    - #### CSVStrategy

          @Deprecated
          public CSVStrategy(char delimiter,
                                         char encapsulator,
                                         char commentStart,
                                         char escape,
                                         boolean ignoreLeadingWhitespaces,
                                         boolean ignoreTrailingWhitespaces,
                                         boolean interpretUnicodeEscapes,
                                         boolean ignoreEmptyLines)

      Deprecated. Use the ctor that also takes printerNewline. This ctor will be removed in Solr 7.
      Customized CSV strategy setter.
      Parameters:
        `delimiter` - a Char used for value separation
        `encapsulator` - a Char used as value encapsulation marker
        `commentStart` - a Char used for comment identification
        `escape` - a Char used for escaping
        `ignoreTrailingWhitespaces` - TRUE when trailing whitespaces should be ignored
        `ignoreLeadingWhitespaces` - TRUE when leading whitespaces should be ignored
        `interpretUnicodeEscapes` - TRUE when unicode escapes should be interpreted
        `ignoreEmptyLines` - TRUE when the parser should skip emtpy lines

  - ### Method Detail

    - #### setDelimiter

          @Deprecated
          public void setDelimiter(char delimiter)

      Deprecated. will be removed in Solr 7

    - #### getDelimiter

          public char getDelimiter()

    - #### setEncapsulator

          @Deprecated
          public void setEncapsulator(char encapsulator)

      Deprecated. will be removed in Solr 7

    - #### getEncapsulator

          public char getEncapsulator()

    - #### setCommentStart

          @Deprecated
          public void setCommentStart(char commentStart)

      Deprecated. will be removed in Solr 7

    - #### getCommentStart

          public char getCommentStart()

    - #### isCommentingDisabled

          public boolean isCommentingDisabled()

    - #### setEscape

          @Deprecated
          public void setEscape(char escape)

      Deprecated. will be removed in Solr 7

    - #### getEscape

          public char getEscape()

    - #### setIgnoreLeadingWhitespaces

          @Deprecated
          public void setIgnoreLeadingWhitespaces(boolean ignoreLeadingWhitespaces)

      Deprecated. will be removed in Solr 7

    - #### getIgnoreLeadingWhitespaces

          public boolean getIgnoreLeadingWhitespaces()

    - #### setIgnoreTrailingWhitespaces

          @Deprecated
          public void setIgnoreTrailingWhitespaces(boolean ignoreTrailingWhitespaces)

      Deprecated. will be removed in Solr 7

    - #### getIgnoreTrailingWhitespaces

          public boolean getIgnoreTrailingWhitespaces()

    - #### setUnicodeEscapeInterpretation

          @Deprecated
          public void setUnicodeEscapeInterpretation(boolean interpretUnicodeEscapes)

      Deprecated. will be removed in Solr 7

    - #### getUnicodeEscapeInterpretation

          public boolean getUnicodeEscapeInterpretation()

    - #### setIgnoreEmptyLines

          @Deprecated
          public void setIgnoreEmptyLines(boolean ignoreEmptyLines)

      Deprecated. will be removed in Solr 7

    - #### getIgnoreEmptyLines

          public boolean getIgnoreEmptyLines()

    - #### setPrinterNewline

          @Deprecated
          public void setPrinterNewline(String newline)

      Deprecated. will be removed in Solr 7

    - #### getPrinterNewline

          public String getPrinterNewline()

    - #### clone

          @Deprecated
          public Object clone()

      Deprecated. will be removed in Solr 7
      Overrides:
        `clone` in class `Object`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.