Class DialectImpl

java.lang.Object
org.aksw.commons.model.csvw.domain.impl.DialectImpl
All Implemented Interfaces:
Serializable, Dialect, DialectMutable
Direct Known Subclasses:
DialectMutableImpl

public class DialectImpl extends Object implements DialectMutable, Serializable
See Also:
  • Field Details

    • commentPrefix

      protected String commentPrefix
    • delimiter

      protected String delimiter
    • doubleQuote

      protected Boolean doubleQuote
    • encoding

      protected String encoding
    • headerRowCount

      protected Long headerRowCount
    • lineTerminators

      protected String lineTerminators
    • quoteChar

      protected String quoteChar
    • skipBlankRows

      protected Boolean skipBlankRows
    • skipColumns

      protected Long skipColumns
    • skipInitialSpace

      protected Boolean skipInitialSpace
    • skipRows

      protected Long skipRows
    • trim

      protected String trim
    • quoteEscapeChar

      protected String quoteEscapeChar
  • Constructor Details

    • DialectImpl

      public DialectImpl()
  • Method Details

    • getCommentPrefix

      public String getCommentPrefix()
      Description copied from interface: Dialect
      An atomic property that sets the comment prefix flag to the single provided value, which MUST be a string.
      Specified by:
      getCommentPrefix in interface Dialect
    • setCommentPrefix

      public DialectMutable setCommentPrefix(String commentPrefix)
      Specified by:
      setCommentPrefix in interface DialectMutable
    • getDelimiter

      public String getDelimiter()
      Description copied from interface: Dialect
      An atomic property that sets the delimiter flag to the single provided value, which MUST be a string.
      Specified by:
      getDelimiter in interface Dialect
    • setDelimiter

      public DialectMutable setDelimiter(String delimiter)
      Specified by:
      setDelimiter in interface DialectMutable
    • isDoubleQuote

      public Boolean isDoubleQuote()
      Description copied from interface: Dialect
      A boolean atomic property that, if `true`, sets the escape character flag to `"`.
      Specified by:
      isDoubleQuote in interface Dialect
    • setDoubleQuote

      public DialectMutable setDoubleQuote(Boolean doubleQuote)
      Specified by:
      setDoubleQuote in interface DialectMutable
    • getEncoding

      public String getEncoding()
      Description copied from interface: Dialect
      An atomic property that sets the encoding flag to the single provided string value, which MUST be a defined in [encoding]. The default is "utf-8".
      Specified by:
      getEncoding in interface Dialect
    • setEncoding

      public DialectMutable setEncoding(String encoding)
      Specified by:
      setEncoding in interface DialectMutable
    • getHeader

      public Boolean getHeader()
      Description copied from interface: Dialect
      A boolean atomic property that, if `true`, sets the header row count flag to `1`, and if `false` to `0`, unless headerRowCount is provided, in which case the value provided for the header property is ignored.
      Specified by:
      getHeader in interface Dialect
    • setHeader

      public DialectMutable setHeader(Boolean header)
      Specified by:
      setHeader in interface DialectMutable
    • getHeaderRowCount

      public Long getHeaderRowCount()
      Description copied from interface: Dialect
      An numeric atomic property that sets the header row count flag to the single provided value, which must be a non-negative integer.
      Specified by:
      getHeaderRowCount in interface Dialect
    • setHeaderRowCount

      public DialectMutable setHeaderRowCount(Long headerRowCount)
      Specified by:
      setHeaderRowCount in interface DialectMutable
    • getLineTerminators

      public String getLineTerminators()
      Description copied from interface: Dialect
      An atomic property that sets the line terminators flag to either an array containing the single provided string value, or the provided array.
      Specified by:
      getLineTerminators in interface Dialect
    • setLineTerminators

      public DialectMutable setLineTerminators(String lineTerminators)
      Specified by:
      setLineTerminators in interface DialectMutable
    • getQuoteChar

      public String getQuoteChar()
      Description copied from interface: Dialect
      An atomic property that sets the quote character flag to the single provided value, which must be a string or `null`.
      Specified by:
      getQuoteChar in interface Dialect
    • setQuoteChar

      public DialectMutable setQuoteChar(String quoteChar)
      Specified by:
      setQuoteChar in interface DialectMutable
    • getSkipBlankRows

      public Boolean getSkipBlankRows()
      Description copied from interface: Dialect
      An boolean atomic property that sets the `skip blank rows` flag to the single provided boolean value.
      Specified by:
      getSkipBlankRows in interface Dialect
    • setSkipBlankRows

      public DialectMutable setSkipBlankRows(Boolean skipBlankRows)
      Specified by:
      setSkipBlankRows in interface DialectMutable
    • getSkipColumns

      public Long getSkipColumns()
      Description copied from interface: Dialect
      An numeric atomic property that sets the `skip columns` flag to the single provided numeric value, which MUST be a non-negative integer.
      Specified by:
      getSkipColumns in interface Dialect
    • setSkipColumns

      public DialectMutable setSkipColumns(Long skipColumns)
      Specified by:
      setSkipColumns in interface DialectMutable
    • getSkipInitialSpace

      public Boolean getSkipInitialSpace()
      Description copied from interface: Dialect
      A boolean atomic property that, if `true`, sets the trim flag to "start". If `false`, to `false`.
      Specified by:
      getSkipInitialSpace in interface Dialect
    • setSkipInitialSpace

      public DialectMutable setSkipInitialSpace(Boolean skipInitialSpace)
      Specified by:
      setSkipInitialSpace in interface DialectMutable
    • getSkipRows

      public Long getSkipRows()
      Description copied from interface: Dialect
      An numeric atomic property that sets the `skip rows` flag to the single provided numeric value, which MUST be a non-negative integer.
      Specified by:
      getSkipRows in interface Dialect
    • setSkipRows

      public DialectMutable setSkipRows(Long skipRows)
      Specified by:
      setSkipRows in interface DialectMutable
    • getTrim

      public String getTrim()
      Description copied from interface: Dialect
      An atomic property that, if the boolean `true`, sets the trim flag to `true` and if the boolean `false` to `false`. If the value provided is a string, sets the trim flag to the provided value, which must be one of "true", "false", "start" or "end". rdfs:range xsd:boolean rdfs:domain csvw:Dialect Holy cow... so let's just assume the literal strings "true"/"false" represent the corresponding boolean value and thus the range is string. Otherwise we'd either have to result to Object or use a BooleanOrString class.
      Specified by:
      getTrim in interface Dialect
    • setTrim

      public DialectMutable setTrim(String trim)
      Specified by:
      setTrim in interface DialectMutable
    • getQuoteEscapeChar

      public String getQuoteEscapeChar()
      Description copied from interface: Dialect
      Extension: Quote escape char
      Specified by:
      getQuoteEscapeChar in interface Dialect
    • setQuoteEscapeChar

      public DialectMutable setQuoteEscapeChar(String quoteEscapeChar)
      Specified by:
      setQuoteEscapeChar in interface DialectMutable
    • toString

      public String toString()
      Overrides:
      toString in class Object