Class CsvwLib

java.lang.Object
org.aksw.commons.model.csvw.domain.impl.CsvwLib

public class CsvwLib extends Object
  • Field Details

  • Constructor Details

    • CsvwLib

      public CsvwLib()
  • Method Details

    • isPresent

      public static boolean isPresent(String value)
    • expectAtMostOneChar

      public static Character expectAtMostOneChar(String contextLabel, String str, Character fallbackChar)
    • expectAtMostOneChar

      public static Character expectAtMostOneChar(String contextLabel, String str)
    • buildEffectiveModel

      public static Dialect buildEffectiveModel(Dialect src, DialectMutable dest)
      Apply defaults according to the csvw spec (https://www.w3.org/ns/csvw#class-definitions). The target may be the same as the source.
    • getEncoding

      public static Charset getEncoding(Dialect dialect, Charset fallback)
    • getEncoding

      public static Charset getEncoding(String encoding, Charset fallback)
      Raises IllegalArgumentException if neither encoding nor fallback is specified
    • getExcelColumnLabel

      public static String getExcelColumnLabel(int columnIndex)
      Create an excel-like column label for a given zero-based column index

      0: 'a'

      25: 'z'

      26: 'aa', ...