|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.CSVHandler
Base for CSV reading and writing. This class encapsulates data structures which are needed for reading and writing CSV files. This includes
CSVReader
,
CSVWriter
Field Summary | |
static java.lang.Integer |
BOOL
|
protected int |
coding
|
protected char |
columnseparator
|
static java.lang.Integer |
DATE
|
protected char |
decimalseparator
|
static java.lang.Integer |
FLOAT
|
protected static int |
iBOOL
|
protected static int |
iDATE
|
protected static int |
iFLOAT
|
protected static int |
iINT
|
protected static int |
iMEMSTRINT
|
static java.lang.Integer |
INT
|
protected static int |
iSTRING
|
protected static int |
iSTRINT
|
static java.lang.Integer |
MEMSTRINT
|
protected boolean |
saveescaping
|
static java.lang.Integer |
STRING
|
static java.lang.Integer |
STRINT
|
Constructor Summary | |
CSVHandler()
public constructor |
Method Summary | |
char |
getColumnSeparator()
|
char |
getDecimalSeparator()
|
boolean |
isSaveEscaping()
|
protected abstract void |
putInValueType(java.lang.String key,
java.util.Map h)
|
void |
removeKeyValue(java.lang.String key)
remove one key definition |
abstract void |
removeKeyValues()
removes all key definitions (e.g. to reuse the CSVReader for a new table) |
protected abstract void |
removeValueType(java.lang.String key)
|
void |
setCoding(int cdx)
set a character conversion coding |
void |
setColumnSeparator(char columnseparatorx)
|
void |
setDecimalSeparator(char decimalseparatorx)
|
void |
setKeyValues(java.lang.String key,
java.lang.Integer type)
convenience method that sets forcetonull to false and defaultvalue to null |
void |
setKeyValues(java.lang.String key,
java.lang.Integer type,
java.lang.Object defaultvalue)
convenience method that sets the forcetonull-flag to false |
void |
setKeyValues(java.lang.String key,
java.lang.Integer type,
java.lang.Object defaultvalue,
boolean forcetonull)
sets values for a column. |
void |
setSaveEscaping(boolean b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int iINT
protected static final int iFLOAT
protected static final int iSTRING
protected static final int iDATE
protected static final int iSTRINT
protected static final int iBOOL
protected static final int iMEMSTRINT
public static final java.lang.Integer INT
public static final java.lang.Integer FLOAT
public static final java.lang.Integer STRING
public static final java.lang.Integer DATE
public static final java.lang.Integer STRINT
public static final java.lang.Integer BOOL
public static final java.lang.Integer MEMSTRINT
protected char columnseparator
protected char decimalseparator
protected int coding
protected boolean saveescaping
Constructor Detail |
public CSVHandler()
Method Detail |
protected abstract void putInValueType(java.lang.String key, java.util.Map h)
protected abstract void removeValueType(java.lang.String key)
public void setKeyValues(java.lang.String key, java.lang.Integer type, java.lang.Object defaultvalue, boolean forcetonull)
key
- The name of the column as in Map and original tabletype
- The type of this column. One of the type specifiers as of the constants of this class.defaultvalue
- A default value for this columm in case that no value is given in the CSV table.
The default value is taken if the column does not occur in the CSV table or the column is empty.forcetonull
- Flag for indication of handling of rows where this column is empty. When set
to false (default) this column is public void setKeyValues(java.lang.String key, java.lang.Integer type, java.lang.Object defaultvalue)
public void setKeyValues(java.lang.String key, java.lang.Integer type)
public void removeKeyValue(java.lang.String key)
public abstract void removeKeyValues()
public void setCoding(int cdx)
public void setColumnSeparator(char columnseparatorx)
public char getColumnSeparator()
public void setDecimalSeparator(char decimalseparatorx)
public char getDecimalSeparator()
public void setSaveEscaping(boolean b)
public boolean isSaveEscaping()
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |