*/
public static Table standardizeTable(URL propertiesFilePath, Table inputTable) throws IOException {
if (propertiesFilePath == null || inputTable == null)
throw new IllegalArgumentException();
Table returnTable = new Table();
// grabs info about inputData
Schema oldSchema = inputTable.getSchema();
final int numTableColumns = oldSchema.getColumnCount();
final int numTableRows = inputTable.getRowCount();
Map<String, String> headerMap = readHeaderProperties(propertiesFilePath);
// add columns to return table, correcting them as iteration proceeds
for (int i = 0; i < numTableColumns; i++) {
String colHead = oldSchema.getColumnName(i);
// check for columns that need updating here
String newHeader = headerMap.get(colHead);
if (newHeader != null)
colHead = newHeader;
returnTable.addColumn(colHead, oldSchema.getColumnType(i));
}
// add existing rows to return table
returnTable.addRows(numTableRows);
for (int i = 0; i < numTableRows; i++) {
copyTableRow(i, i, returnTable, inputTable);
}
return returnTable;