|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.rename.RenameColumnSetting
final class RenameColumnSetting
Helper class that combines settings as to what should be happen with one column. That is one object of this class is responsible for only one column!
Field Summary | |
---|---|
static String |
CFG_NEW_COLNAME
Config identifier for the new column name (if any). |
static String |
CFG_NEW_COLTYPE
Config identifier for the index of the new type. |
static String |
CFG_OLD_COLNAME
Config identifier for the original column name, used for sanity check. |
Constructor Summary | |
---|---|
RenameColumnSetting(DataColumnSpec column)
Constructor being used in the NodeModel's configure method (for validation) and in the NodeDialog (DataTableSpec used to init default values like possible types). |
|
RenameColumnSetting(String name)
Inits a settings object for a given column. |
Method Summary | |
---|---|
(package private) DataColumnSpec |
configure(DataColumnSpec inSpec)
Called by configure in NodeModel to compute the new column spec. |
(package private) static Set<Class<? extends DataValue>> |
constructPossibleTypes(DataType type)
Construct a set with all types a given type can be cast to. |
(package private) static RenameColumnSetting |
createFrom(NodeSettingsRO settings)
Factory method used in NodeModel#validate and #loadSettingsFrom. |
(package private) String |
getName()
|
(package private) String |
getNewColumnName()
The name of the new column, if any. |
(package private) int |
getNewValueClassIndex()
The index of the type to cast the column to. |
(package private) Class<? extends DataValue>[] |
getPossibleValueClasses()
Result may be null when the first constructor was used
(based on a column name only). |
(package private) void |
loadSettingsFrom(NodeSettingsRO settings)
Loads settings from a settings object. |
(package private) void |
saveSettingsTo(NodeSettingsWO settings)
Save the current settings to a config. |
(package private) void |
setNewColumnName(String newColumnName)
Sets a new column name or null . |
(package private) void |
setNewValueClassIndex(int newType)
Set new type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CFG_OLD_COLNAME
public static final String CFG_NEW_COLNAME
public static final String CFG_NEW_COLTYPE
Constructor Detail |
---|
RenameColumnSetting(String name)
name
- the column to get settings (e.g. compatible types) from
NullPointerException
- if argument is null
RenameColumnSetting(DataColumnSpec column)
column
- the column spec form which to get valuesMethod Detail |
---|
String getNewColumnName()
null
when no
new name was set.
void setNewColumnName(String newColumnName)
null
.
newColumnName
- the newColumnName to setint getNewValueClassIndex()
void setNewValueClassIndex(int newType)
newType
- the newType to setString getName()
Class<? extends DataValue>[] getPossibleValueClasses()
null
when the first constructor was used
(based on a column name only).
void loadSettingsFrom(NodeSettingsRO settings)
settings
- to load fromvoid saveSettingsTo(NodeSettingsWO settings)
settings
- to save toDataColumnSpec configure(DataColumnSpec inSpec) throws InvalidSettingsException
inSpec
- the original input spec (names must match)
InvalidSettingsException
- if that failsstatic RenameColumnSetting createFrom(NodeSettingsRO settings) throws InvalidSettingsException
settings
- to load from
InvalidSettingsException
- if that failsstatic Set<Class<? extends DataValue>> constructPossibleTypes(DataType type)
StringValue.class
.
type
- the type for which to determine all possible types
type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |