Package com.luciad.format.csv
Enum Class TLcdCSVDataSource.ColumnType
- All Implemented Interfaces:
Serializable
,Comparable<TLcdCSVDataSource.ColumnType>
,Constable
- Enclosing class:
TLcdCSVDataSource
The different column types which can be defined in a
.csvt
file.
See the class javadoc of TLcdCSVModelDecoder
for more information about the .csvt
file.- Since:
- 2018.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA column containing booleansA column containing dates.A column containing date times.A column containing floating numbersA column containing the GeoJson encoded geometryA column containing integersA column containing real numbersA column containing shortsA column containing stringsA column containing times.A column containing the WKT encoded geometryA column containing the X coordinates of a pointA column containing the X-Y coordinates of a point.A column containing the Y coordinates of a pointA column containing the Z coordinates of a point -
Method Summary
Modifier and TypeMethodDescriptionstatic List
<TLcdCSVDataSource.ColumnType> decodeSource
(String aCSVTSource, ILcdInputStreamFactory aInputStreamFactory, Charset aEncoding) Returns a list of column types as defined in a CSVT file.static TLcdCSVDataSource.ColumnType
Returns the enum constant of this class with the specified name.static TLcdCSVDataSource.ColumnType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
A column containing booleans -
SHORT
A column containing shorts -
INTEGER
A column containing integers -
FLOAT
A column containing floating numbers -
REAL
A column containing real numbers -
STRING
A column containing strings -
DATE
A column containing dates. Values are parsed withLocalDate.parse(java.lang.CharSequence)
. -
TIME
A column containing times. Values are parsed withOffsetTime.parse(java.lang.CharSequence)
. -
DATE_TIME
A column containing date times. Values are parsed with aSimpleDateFormat
with pattern"yyyy-MM-dd HH:mm:ssXXX"
. UseTLcdCSVModelDecoder.setDateFormat(java.text.DateFormat)
in combination with this column type to parse other date notations. -
XY_COORD
A column containing the X-Y coordinates of a point. Supported format examples are listed below.
Latitude longitude (degrees, minutes, seconds): 55°45'22",037°41'01" Latitude longitude (Decimal Degrees): 55.7561°, 037.6836° Latitude longitude (Decimal Degrees micro): 55.756112N037.683562E Latitude longitude (Degrees, Decimal Minutes): 5545.3667N03741.0137E Latitude longitude (Degrees, Minutes, Decimal Seconds): 554522.00N 0374100.82E Georef: QKHL41014536 Latitude longitude (military style): 554522N0374101E UTM KM: 37UDB1779 UTM M: 37UDB1738379720
- Since:
- 2019.1
-
X_COORD
A column containing the X coordinates of a point -
Y_COORD
A column containing the Y coordinates of a point -
Z_COORD
A column containing the Z coordinates of a point -
WKT
A column containing the WKT encoded geometry -
GEO_JSON
A column containing the GeoJson encoded geometry- Since:
- 2019.1
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
decodeSource
public static List<TLcdCSVDataSource.ColumnType> decodeSource(String aCSVTSource, ILcdInputStreamFactory aInputStreamFactory, Charset aEncoding) throws IOException Returns a list of column types as defined in a CSVT file.- Parameters:
aCSVTSource
- Path to the CSVT fileaInputStreamFactory
- An input stream factory used to read the data from the CSVT fileaEncoding
- The character encoding of the CSVT file- Returns:
- the list of column types defined in the CSVT file
- Throws:
IOException
- when an I/O error occurs, or when the file cannot be decoded
-