|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.columnTrans.One2ManyCellFactory
public class One2ManyCellFactory
Maps several original nominal columns to their possible values, creates a column for every possible value and when the rows are processed the value is set to 1 if the original column contains this value and to 0 otherwise.
Constructor Summary | |
---|---|
One2ManyCellFactory(DataTableSpec inputSpec,
List<String> columnNames,
boolean appendOrgColNames)
Creates for every possible value of one column given by the columnNames an extra column with the values present(1) or absent(0). |
Method Summary | |
---|---|
DataCell[] |
getCells(DataRow row)
Get the new cells for a given row. |
DataColumnSpec[] |
getColumnSpecs()
The column specs for the cells that are generated in the getCells() method. |
void |
setProgress(int curRowNr,
int rowCount,
RowKey lastKey,
ExecutionMonitor exec)
This method is called when a row has been processed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public One2ManyCellFactory(DataTableSpec inputSpec, List<String> columnNames, boolean appendOrgColNames)
inputSpec
- the input table spec.columnNames
- the names of the columns to be transformed.appendOrgColNames
- if true original column names will be appended
to the newly generated column name: (possibleValue_originalColName)Method Detail |
---|
public DataColumnSpec[] getColumnSpecs()
CellFactory
getColumnSpecs
in interface CellFactory
public DataCell[] getCells(DataRow row)
getCells
in interface CellFactory
row
- The row of interest.
public void setProgress(int curRowNr, int rowCount, RowKey lastKey, ExecutionMonitor exec)
Note, you don't need to check exec.checkCanceled()
in
the implementation as this is done in the calling class.
setProgress
in interface CellFactory
curRowNr
- The number of the row just processedrowCount
- The total number of rows.lastKey
- The row's key.exec
- The execution monitor to report progress to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |