Class CsvwUnivocityUtils

java.lang.Object
org.aksw.commons.model.csvw.univocity.CsvwUnivocityUtils

public class CsvwUnivocityUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<String>
    configureCommonSettings(com.univocity.parsers.common.CommonParserSettings<?> settings, UnivocityCsvwConf csvwConf)
    Does not configure the format
    static Set<String>
    configureCsvFormat(com.univocity.parsers.csv.CsvFormat format, org.aksw.commons.model.csvw.domain.api.Dialect dialect)
     
    static Set<String>
    configureDetection(com.univocity.parsers.csv.CsvParserSettings settings, org.aksw.commons.model.csvw.domain.api.Dialect dialect)
     
    static Set<String>
    configureDialect(org.aksw.commons.model.csvw.domain.api.DialectMutable dialect, com.univocity.parsers.csv.CsvFormat format)
    Configure a dialect with the attributes detected by univocity
    static Set<String>
    configureDialect(org.aksw.commons.model.csvw.domain.api.DialectMutable dialect, com.univocity.parsers.csv.CsvParserSettings settings, Callable<com.univocity.parsers.csv.CsvParser> parserFactory, Callable<Reader> readerSupp)
    Checks for certain non-configured univocity settings and if there are any then a parser is started for probing.
    static com.univocity.parsers.csv.CsvFormat
    detectFormat(com.univocity.parsers.csv.CsvParser parser, Callable<Reader> readerSupp)
     
    static boolean
    isDetectionNeeded(com.univocity.parsers.common.CommonParserSettings<?> settings)
     
    static boolean
    isDetectionNeeded(com.univocity.parsers.csv.CsvParserSettings settings)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CsvwUnivocityUtils

      public CsvwUnivocityUtils()
  • Method Details

    • configureCommonSettings

      public static Set<String> configureCommonSettings(com.univocity.parsers.common.CommonParserSettings<?> settings, UnivocityCsvwConf csvwConf)
      Does not configure the format
    • configureDetection

      public static Set<String> configureDetection(com.univocity.parsers.csv.CsvParserSettings settings, org.aksw.commons.model.csvw.domain.api.Dialect dialect)
    • configureCsvFormat

      public static Set<String> configureCsvFormat(com.univocity.parsers.csv.CsvFormat format, org.aksw.commons.model.csvw.domain.api.Dialect dialect)
    • configureDialect

      public static Set<String> configureDialect(org.aksw.commons.model.csvw.domain.api.DialectMutable dialect, com.univocity.parsers.csv.CsvFormat format)
      Configure a dialect with the attributes detected by univocity
    • isDetectionNeeded

      public static boolean isDetectionNeeded(com.univocity.parsers.csv.CsvParserSettings settings)
    • isDetectionNeeded

      public static boolean isDetectionNeeded(com.univocity.parsers.common.CommonParserSettings<?> settings)
    • detectFormat

      public static com.univocity.parsers.csv.CsvFormat detectFormat(com.univocity.parsers.csv.CsvParser parser, Callable<Reader> readerSupp) throws Exception
      Throws:
      Exception
    • configureDialect

      public static Set<String> configureDialect(org.aksw.commons.model.csvw.domain.api.DialectMutable dialect, com.univocity.parsers.csv.CsvParserSettings settings, Callable<com.univocity.parsers.csv.CsvParser> parserFactory, Callable<Reader> readerSupp) throws Exception
      Checks for certain non-configured univocity settings and if there are any then a parser is started for probing. Those settings are: line terminators, field delimiters and quote char. If they are given then nothing is done.
      Throws:
      Exception