public final class TLcdCSVDataSource extends Object implements ILcdDataSource
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()
).Modifier and Type | Class and Description |
---|---|
static class |
TLcdCSVDataSource.Builder
Builder class for a
TLcdCSVDataSource instance. |
static class |
TLcdCSVDataSource.ColumnType
The different column types which can be defined in a
.csvt file. |
Modifier and Type | Method and Description |
---|---|
TLcdCSVDataSource.Builder |
asBuilder()
Returns a new
Builder instance initialised with the values of this data source. |
boolean |
equals(Object aO) |
List<String> |
getColumnNames()
|
String |
getDescription()
Returns a string description of the data source.
|
Charset |
getEncoding()
Returns the encoding of the data file
|
int |
getGeoJsonGeometryColumn()
Returns the index of the GeoJson encoded geometry, or -1 when no such column exists.
|
int |
getIDColumn()
Returns the index of the column specifying the unique ID of each element, or -1 when no such column exists.
|
int |
getRowsToSkip()
Returns the number of rows to skip from the data file.
|
String |
getSeparator()
Returns the separator used in the data file
|
String |
getSource()
Returns the source name of the data file.
|
List<TLcdCSVDataSource.ColumnType> |
getTypes()
Return the types of the different columns, or
null when the types are not specified. |
int |
getWKTGeometryColumn()
Returns the index of the WKT encoded geometry, or -1 when no such column exists.
|
int |
getXPointColumn()
Returns the index of the X coordinate column, or -1 when no such column exists.
|
int |
getYPointColumn()
Returns the index of the Y coordinate column, or -1 when no such column exists.
|
int |
getZPointColumn()
Returns the index of the Z coordinate column, or -1 when no such column exists.
|
int |
hashCode() |
boolean |
isFirstRowContainsNames()
Returns
true when the first row of the data file contains the names of each column. |
static TLcdCSVDataSource.Builder |
newBuilder()
Creates a new
Builder instance initialized with default values. |
String |
toString() |
public String getSource()
null
public Charset getEncoding()
null
public String getSeparator()
null
public boolean isFirstRowContainsNames()
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.true
when the first row of the data file contains the names of each column, false
otherwise.public int getRowsToSkip()
public List<String> getColumnNames()
null
when isFirstRowContainsNames()
returns true
public int getIDColumn()
public List<TLcdCSVDataSource.ColumnType> getTypes()
null
when the types are not specified.null
when the types are not specified.public int getWKTGeometryColumn()
public int getGeoJsonGeometryColumn()
public int getXPointColumn()
public int getYPointColumn()
public int getZPointColumn()
public String getDescription()
ILcdDataSource
getDescription
in interface ILcdDataSource
public TLcdCSVDataSource.Builder asBuilder()
Builder
instance initialised with the values of this data source.Builder
instance initialised with the values of this data source.public static TLcdCSVDataSource.Builder newBuilder()
Builder
instance initialized with default values.Builder
instance initialized with default values