|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eobjects.metamodel.util.BaseObject
org.eobjects.metamodel.csv.CsvConfiguration
public final class CsvConfiguration
Represents the configuration for reading/parsing CSV files.
| Field Summary | |
|---|---|
static int |
DEFAULT_COLUMN_NAME_LINE
|
static char |
DEFAULT_ESCAPE_CHAR
|
static char |
DEFAULT_QUOTE_CHAR
|
static char |
DEFAULT_SEPARATOR_CHAR
|
static int |
NO_COLUMN_NAME_LINE
|
static char |
NOT_A_CHAR
The value is '\\uFFFF', the "not a character" value which should not occur in any valid Unicode string. |
| Constructor Summary | |
|---|---|
CsvConfiguration()
|
|
CsvConfiguration(int columnNameLineNumber)
|
|
CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar)
|
|
CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar,
boolean failOnInconsistentRowLength)
|
|
| Method Summary | |
|---|---|
protected void |
decorateIdentity(List<Object> identifiers)
|
int |
getColumnNameLineNumber()
The line number (1 based) from which to get the names of the columns. |
String |
getEncoding()
Gets the file encoding to use for reading the file. |
char |
getEscapeChar()
Gets the escape char, used for escaping eg. |
char |
getQuoteChar()
Gets the quote char, used for encapsulating values. |
char |
getSeparatorChar()
Gets the separator char (typically comma or semicolon) for separating values. |
boolean |
isFailOnInconsistentRowLength()
Determines whether to fail (by throwing an InconsistentRowLengthException) if a line in the CSV file has
inconsistent amounts of columns. |
String |
toString()
|
| Methods inherited from class org.eobjects.metamodel.util.BaseObject |
|---|
classEquals, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char NOT_A_CHAR
public static final int NO_COLUMN_NAME_LINE
public static final int DEFAULT_COLUMN_NAME_LINE
public static final char DEFAULT_SEPARATOR_CHAR
public static final char DEFAULT_QUOTE_CHAR
public static final char DEFAULT_ESCAPE_CHAR
| Constructor Detail |
|---|
public CsvConfiguration()
public CsvConfiguration(int columnNameLineNumber)
public CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar)
public CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar,
boolean failOnInconsistentRowLength)
| Method Detail |
|---|
public boolean isFailOnInconsistentRowLength()
InconsistentRowLengthException) if a line in the CSV file has
inconsistent amounts of columns.
If set to false (default) MetaModel will gracefully fill in missing null
values in or ignore additional values in a line.
public int getColumnNameLineNumber()
public String getEncoding()
public char getSeparatorChar()
public char getQuoteChar()
public char getEscapeChar()
protected void decorateIdentity(List<Object> identifiers)
decorateIdentity in class BaseObjectpublic String toString()
toString in class BaseObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||