public class DataTypeGuess extends Object
Constructor and Description |
---|
DataTypeGuess(boolean hasHeader) |
Modifier and Type | Method and Description |
---|---|
static String |
getDateFormat(String t)
Tests if the String is date
|
String |
getDefaultLdmType()
returns default LDM type to be associated with detected fields rather
than by guessing
|
SourceColumn[] |
guessCsvSchema(CSVReader cr)
Guesses the CSV schema
|
SourceColumn[] |
guessCsvSchema(CSVReader cr,
int columns)
Guesses the CSV schema
|
SourceColumn[] |
guessCsvSchema(InputStream is,
char separator)
Guesses the CSV schema
|
SourceColumn[] |
guessCsvSchema(URL url,
char separator)
Guesses the CSV schema
|
static boolean |
isDecimal(String t)
Tests if the String is decimal
|
static boolean |
isInteger(String t)
Tests if the String is integer
|
void |
setDefaultLdmType(String defaultLdmType)
sets the default LDM type to be associated with detected fields rather
than by guessing
|
public static boolean isInteger(String t)
t
- the tested Stringpublic static boolean isDecimal(String t)
t
- the tested Stringpublic static String getDateFormat(String t)
t
- the tested Stringpublic SourceColumn[] guessCsvSchema(URL url, char separator) throws IOException
separator
- field separatorIOException
- in case of IO issuepublic SourceColumn[] guessCsvSchema(InputStream is, char separator) throws IOException
is
- CSV streamseparator
- field separatorIOException
- in case of IO issuepublic SourceColumn[] guessCsvSchema(CSVReader cr) throws IOException
cr
- CSV readerIOException
- in case of IO issuepublic SourceColumn[] guessCsvSchema(CSVReader cr, int columns) throws IOException
cr
- CSV readerIOException
- in case of IO issuepublic String getDefaultLdmType()
public void setDefaultLdmType(String defaultLdmType)
defaultLdmType
- Copyright © 2014. All rights reserved.