Package com.google.refine.model
Class ColumnModel
java.lang.Object
com.google.refine.model.ColumnModel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddColumnGroup(int startColumnIndex, int span, int keyColumnIndex) intvoidClear cached value computations for all columnsprotected voidgetColumnByCellIndex(int cellIndex) getColumnByName(String name) intgetColumnIndexByName(String name) Return the index of the column with the given name.intintgetUnduplicatedColumnName(String baseName) protected voidvoidload(LineNumberReader reader) voidsave(Writer writer, Properties options) voidsetKeyColumnIndex(int keyColumnIndex) voidsetMaxCellIndex(int maxCellIndex) voidupdate()
-
Field Details
-
columns
-
columnGroups
-
_nameToColumn
-
_cellIndexToColumn
-
_rootColumnGroups
-
_columnNames
-
-
Constructor Details
-
ColumnModel
public ColumnModel()
-
-
Method Details
-
setMaxCellIndex
public void setMaxCellIndex(int maxCellIndex) -
getMaxCellIndex
public int getMaxCellIndex() -
allocateNewCellIndex
public int allocateNewCellIndex()- Returns:
- the next available cell index
-
setKeyColumnIndex
public void setKeyColumnIndex(int keyColumnIndex) -
getKeyColumnIndex
public int getKeyColumnIndex() -
addColumnGroup
public void addColumnGroup(int startColumnIndex, int span, int keyColumnIndex) -
update
public void update() -
addColumn
- Throws:
ModelException
-
getUnduplicatedColumnName
-
getColumnByName
-
getColumnIndexByName
Return the index of the column with the given name.- Parameters:
name- column name to look up- Returns:
- index of column with given name or -1 if not found.
-
getColumnByCellIndex
-
getColumnNames
-
getJsonKeyCellIndex
-
getKeyColumnName
-
save
- Throws:
IOException
-
load
- Throws:
IOException
-
internalInitialize
protected void internalInitialize() -
generateMaps
protected void generateMaps() -
clearPrecomputes
public void clearPrecomputes()Clear cached value computations for all columns
-