Class TLcdCSVDataSource

java.lang.Object
com.luciad.format.csv.TLcdCSVDataSource
All Implemented Interfaces:
ILcdDataSource

public final class TLcdCSVDataSource extends Object implements ILcdDataSource
An ILcdDataSource describing the structure of a character separated data file, which can be passed to the TLcdCSVModelDecoder to decode the data. New instances can be created through a TLcdCSVDataSource.Builder (see newBuilder()).
Since:
2018.0
  • Method Details

    • getSource

      public String getSource()
      Returns the source name of the data file.
      Returns:
      the source name of the data file, never null
    • getEncoding

      public Charset getEncoding()
      Returns the encoding of the data file
      Returns:
      the encoding of the data file, never null
    • getSeparator

      public String getSeparator()
      Returns the separator used in the data file
      Returns:
      the separator used in the data file, never null
    • isFirstRowContainsNames

      public boolean isFirstRowContainsNames()
      Returns true when the first row of the data file contains the names of each column. The first row is considered to be the first row in the data file after skipping the first getRowsToSkip() number of rows.
      Returns:
      true when the first row of the data file contains the names of each column, false otherwise.
    • getRowsToSkip

      public int getRowsToSkip()
      Returns the number of rows to skip from the data file. This allows to for example ignore a header in the file.
      Returns:
      the number of rows to skip from the data file.
    • getColumnNames

      public List<String> getColumnNames()
      Returns the column names, or null when isFirstRowContainsNames() returns true.
      Returns:
      the column names, or null when isFirstRowContainsNames() returns true
    • getIDColumn

      public int getIDColumn()
      Returns the index of the column specifying the unique ID of each element, or -1 when no such column exists.
      Returns:
      the index of the column specifying the unique ID of each element, or -1 when no such column exists.
    • getTypes

      public List<TLcdCSVDataSource.ColumnType> getTypes()
      Return the types of the different columns, or null when the types are not specified.
      Returns:
      The types of the different columns, or null when the types are not specified.
    • getWKTGeometryColumn

      public int getWKTGeometryColumn()
      Returns the index of the WKT encoded geometry, or -1 when no such column exists.
      Returns:
      the index of the WKT encoded geometry, or -1 when no such column exists.
    • getGeoJsonGeometryColumn

      public int getGeoJsonGeometryColumn()
      Returns the index of the GeoJson encoded geometry, or -1 when no such column exists.
      Returns:
      the index of the GeoJson encoded geometry, or -1 when no such column exists.
      Since:
      2019.1
    • getXPointColumn

      public int getXPointColumn()
      Returns the index of the X coordinate column, or -1 when no such column exists.
      Returns:
      the index of the X coordinate column, or -1 when no such column exists.
    • getYPointColumn

      public int getYPointColumn()
      Returns the index of the Y coordinate column, or -1 when no such column exists.
      Returns:
      the index of the Y coordinate column, or -1 when no such column exists.
    • getZPointColumn

      public int getZPointColumn()
      Returns the index of the Z coordinate column, or -1 when no such column exists.
      Returns:
      the index of the Z coordinate column, or -1 when no such column exists.
    • getDescription

      public String getDescription()
      Description copied from interface: ILcdDataSource
      Returns a string description of the data source. This will typically be used in a GUI, or in error and warning messages.
      Specified by:
      getDescription in interface ILcdDataSource
      Returns:
      a String describing the data source.
    • asBuilder

      public TLcdCSVDataSource.Builder asBuilder()
      Returns a new Builder instance initialised with the values of this data source.
      Returns:
      a new Builder instance initialised with the values of this data source.
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • newBuilder

      public static TLcdCSVDataSource.Builder newBuilder()
      Creates a new Builder instance initialized with default values.
      Returns:
      a new Builder instance initialized with default values