public class DelimitedFileConnector
extends java.lang.Object
Constructor and Description |
---|
DelimitedFileConnector() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
defaultBuildMap(java.util.List<java.lang.String> cols,
java.util.List<java.lang.String> record)
Static method that takes an ordered list of columns names
and a parsed record broken up into ordered tokens.
|
static java.util.Map<java.lang.String,java.lang.Object> |
defaultBuildMap(java.util.List<java.lang.String> cols,
java.util.List<java.lang.String> record,
boolean trimValues)
This method is the same as defaultBuildMap(List, List)
but allows control over if the values should be trimmed
with the last parameter.
|
public static java.util.Map<java.lang.String,java.lang.Object> defaultBuildMap(java.util.List<java.lang.String> cols, java.util.List<java.lang.String> record)
This method is typically the first method that is called in a buildMap rule to build a base map that can then be altered to suite a customers needs.
Each call to the build map rule is handed several things including 'cols' and 'record' attributes. The cols attribute specifies an ordered list of strings that define the column names either fined on the application or by inspecting the header of the file. The record attribute is also a list of strings in order as they were parsed from the file.
// Here is an example of how it might be used in a buildmap // rule Map defaultMap = DelimitedFileConnector.defaultBuildMap(cols,record); // make your customizations/transformations return defaultMap;
public static java.util.Map<java.lang.String,java.lang.Object> defaultBuildMap(java.util.List<java.lang.String> cols, java.util.List<java.lang.String> record, boolean trimValues)
defaultBuildMap(List, List)