public class DirectoryCSVLoader extends Object
The actual consumer of rows is a parameter passed by the caller.
Modifier and Type | Field and Description |
---|---|
static String |
CSV_NULL_MARKER
The special CSV value ("__NULL__") used to denote that a
null should be used for a value. |
Modifier and Type | Method and Description |
---|---|
protected static Object |
decode(Field field,
String value) |
protected static InputStream |
getResource(String name) |
static void |
loadData(String dataFileName,
char delimiter,
Schema schema,
Consumer<Map<String,Object>> loader)
Loads the CSV data file based on the provided schema, and creates the corresponding entries using the provided
loader.
|
public static final String CSV_NULL_MARKER
null
should be used for a value.public static void loadData(String dataFileName, char delimiter, Schema schema, Consumer<Map<String,Object>> loader) throws DirectoryException
dataFileName
- the file name containing CSV datadelimiter
- the CSV column separatorschema
- the data schemaloader
- the actual consumer of loaded rowsDirectoryException
protected static InputStream getResource(String name)
Copyright © 2016 Nuxeo SA. All rights reserved.