public abstract class ExcelIngestorBase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String[] |
illegalChars
The illegal chars.
|
protected org.apache.log4j.Logger |
logger |
| Constructor and Description |
|---|
ExcelIngestorBase()
Instantiates a new excel ingestor base.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.ArrayList<java.lang.String> |
checkForDups(java.util.ArrayList<Column> columns)
check for duplicate column names.
|
java.lang.String |
echo(java.lang.String string)
Method for debugging remote object calls.
|
protected java.lang.String |
fixString(java.lang.String str)
Replace all "illegal" characters with an underscore "_".
|
abstract java.util.ArrayList<java.lang.String> |
getColumnHeaders(java.lang.String fileName)
When given the name of an existing file, returns the columns which exist
in the top sheet of that excel file.
|
abstract IngestResult |
ingestFile(java.lang.String tableName,
java.lang.String fileName,
boolean merge)
Ingests the requested columns in to tableName from the provided file.
|
abstract java.util.ArrayList<Column> |
listColumns(java.lang.String fileName)
When given the name of an existing file, returns the columns which exist
in the top sheet of that excel file.
|
protected void |
trace(java.lang.String message)
Debug statement method.
|
protected org.apache.log4j.Logger logger
protected static java.lang.String[] illegalChars
public ExcelIngestorBase()
protected void trace(java.lang.String message)
message - the message to log and printpublic java.lang.String echo(java.lang.String string)
string - the string to returnprotected java.lang.String fixString(java.lang.String str)
str - the String to 'fix'public abstract java.util.ArrayList<Column> listColumns(java.lang.String fileName)
fileName - the file namepublic abstract java.util.ArrayList<java.lang.String> getColumnHeaders(java.lang.String fileName)
fileName - the file nameprotected java.util.ArrayList<java.lang.String> checkForDups(java.util.ArrayList<Column> columns)
columns - the columnspublic abstract IngestResult ingestFile(java.lang.String tableName, java.lang.String fileName, boolean merge)
tableName - the table namefileName - the file namemerge - flag to merge with existing data in the table (true = merge, false = replace)