Class TextImportSettings

All Implemented Interfaces:
HasHandlers

public class TextImportSettings extends TextSettings
Settings for use with DataSource.recordsFromText().
  • Constructor Details

    • TextImportSettings

      public TextImportSettings()
    • TextImportSettings

      public TextImportSettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static TextImportSettings getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class TextSettings
    • setHasHeaderLine

      public TextImportSettings setHasHeaderLine(Boolean hasHeaderLine) throws IllegalStateException
      If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.

      recordsFromText will then try to find a same-named DataSourceField by checking parsed titles against both DataSourceField.title and DataSourceField.name (titles first), doing a case-insensitive comparison with any leading or trailing whitespace removed from the title. If no field matches, data will appear in the returned Records under the exact title parsed from the header line.

      If this approach will not find appropriate DataSourceFields, parse the header line before calling recordsFromText(), and provide the list of field names to use when parsing data as TextSettings.fieldList.

      Parameters:
      hasHeaderLine - New hasHeaderLine value. Default value is false
      Returns:
      TextImportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getHasHeaderLine

      public Boolean getHasHeaderLine()
      If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.

      recordsFromText will then try to find a same-named DataSourceField by checking parsed titles against both DataSourceField.title and DataSourceField.name (titles first), doing a case-insensitive comparison with any leading or trailing whitespace removed from the title. If no field matches, data will appear in the returned Records under the exact title parsed from the header line.

      If this approach will not find appropriate DataSourceFields, parse the header line before calling recordsFromText(), and provide the list of field names to use when parsing data as TextSettings.fieldList.

      Returns:
      Current hasHeaderLine value. Default value is false