public class CsvLoaderLib
extends java.lang.Object
| Constructor and Description |
|---|
CsvLoaderLib() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
loadPropertyList(VfsFile vfsFile,
java.lang.String columnName)
Given VfsFile object (of a csv file) and columnName of the the
property list, returns the list under the column.
|
static Naming<java.lang.String> |
loadPropertyMappingFrom(java.io.File file,
java.lang.String fromPath,
java.lang.String toPath)
When called, this static method loads property mapping from a csv file and returns a Naming.
|
static Naming<java.lang.String> |
loadPropertyMappingFrom(VfsFile propertyMappingCsv)
Uses com.partnersoft.formats.csv.CsvDataRecordSource instead of
com.partnersoft.io.formats.csv.CSVDataRecordSource to load the
csv file.
|
static Naming<java.lang.String> |
loadPropertyMappingFrom(VfsFile propertyMappingCsv,
java.lang.String fromPath,
java.lang.String toPath)
When called, this static method loads property mapping from a csv file and returns a Naming.
|
static java.lang.String[] |
readColumnNames(VfsFile file) |
public static Naming<java.lang.String> loadPropertyMappingFrom(VfsFile propertyMappingCsv, java.lang.String fromPath, java.lang.String toPath) throws java.io.IOException
When called, this static method loads property mapping from a csv file and returns a Naming. The "fromPath" is the key and the "toPath" will be the value of this returned Naming.
VfsFile - propertyMappingCsvString - fromPathSting - toPathjava.io.IOExceptionpublic static Naming<java.lang.String> loadPropertyMappingFrom(java.io.File file, java.lang.String fromPath, java.lang.String toPath) throws java.io.IOException
When called, this static method loads property mapping from a csv file and returns a Naming. The "fromPath" is the key and the "toPath" will be the value of this returned Naming.
File - fileString - fromPathSting - toPathjava.io.IOExceptionpublic static Naming<java.lang.String> loadPropertyMappingFrom(VfsFile propertyMappingCsv) throws java.io.IOException
Uses com.partnersoft.formats.csv.CsvDataRecordSource instead of com.partnersoft.io.formats.csv.CSVDataRecordSource to load the csv file. Returns Naming of the first column as keys and the second column a values. The assumption is the first column is the fromPath and the second column is the toPath.
VfsFile - propertyMappingCsvjava.io.IOExceptionpublic static java.util.List<java.lang.String> loadPropertyList(VfsFile vfsFile, java.lang.String columnName)
Given VfsFile object (of a csv file) and columnName of the the property list, returns the list under the column.
vfsFile - columnName - public static java.lang.String[] readColumnNames(VfsFile file)