Class CsvImporter

All Implemented Interfaces:
Serializable, ICommandImporter, IFileImporter, IImporter, IReaderImporter, IRemoteSetImporter
Direct Known Subclasses:
CsvParametrizedImporter, CsvRawImporter

public abstract class CsvImporter extends RemoteSetImporter implements IReaderImporter, Serializable
This class does something interesting and useful. Or not... Columns are numbered starting with 1.
See Also:
  • Field Details

    • invalid

      protected static final int invalid
      See Also:
    • separator

      protected String separator
    • nameColumn

      protected int nameColumn
    • nameMultiColumn

      protected boolean nameMultiColumn
    • lineNo

      protected int lineNo
  • Constructor Details

    • CsvImporter

      public CsvImporter(String separator, int nameColumn, boolean nameMultiColumn)
  • Method Details

    • separatorsArray

      public static String[] separatorsArray()
    • getSeparator

      public static String getSeparator(int index)
    • gobbleString

      protected static String gobbleString(String[] chunks, int column, String aPriori, boolean includeTail, int offset)
    • gobbleString

      protected static String[] gobbleString(String[] chunks, int column, boolean nameMultiColumn, int basis, String aPriori, boolean rejectNumbers)
    • join

      protected static String join(String[] arr)
    • setSeparator

      public void setSeparator(String separator)
      Parameters:
      separator - the separator to set
    • setSeparatorIndex

      public void setSeparatorIndex(int separatorIndex)
    • setNameColumn

      public void setNameColumn(int nameColumn)
      Parameters:
      nameColumn - the nameColumn to set
    • isNameMultiColumn

      public boolean isNameMultiColumn()
      Returns:
      the nameMultiColumn
    • setNameMultiColumn

      public void setNameMultiColumn(boolean nameMultiColumn)
      Parameters:
      nameMultiColumn - the nameMultiColumn to set
    • getFileExtensions

      public String[][] getFileExtensions()
      Specified by:
      getFileExtensions in interface IFileImporter
      Specified by:
      getFileExtensions in class FileImporter
    • canImportDirectories

      public boolean canImportDirectories()
      Specified by:
      canImportDirectories in interface IFileImporter
      Overrides:
      canImportDirectories in class FileImporter
    • getFormatName

      public String getFormatName()
      Specified by:
      getFormatName in interface IImporter
      Returns:
      Name of the importer. May contain spaces and other "funny" characters. Should be one word, and not end with "Importer" or such.