|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.missingval.ColSetting
final class ColSetting
An object that holds some the properties how to handle missing values in an individual column (called individual) or in columns of one type (called meta). This object holds all properties that can be set in one single component in the missing value dialog, i.e.
Field Summary | |
---|---|
protected static String |
CFG_COLNAME
NodeSettings key: write column name (only for individual columns). |
protected static String |
CFG_FIXVAL
NodeSettings key: write fixed value replacement (if any). |
protected static String |
CFG_INDIVIDUAL
NodeSettings branch identifier for individual settings. |
protected static String |
CFG_META
NodeSettings branch identifier for meta settings. |
protected static String |
CFG_META_DOUBLE
NodeSettings branch identifier for meta setting, Double. |
protected static String |
CFG_META_INT
NodeSettings branch identifier for meta setting, Int. |
protected static String |
CFG_META_OTHER
NodeSettings branch identifier for meta setting, Other. |
protected static String |
CFG_META_STRING
NodeSettings branch identifier for meta setting, String (Individual columns have their name as identifier). |
protected static String |
CFG_METHOD
NodeSettings key: write method. |
protected static String |
CFG_TYPE
NodeSettings key: write column type. |
static int |
METHOD_FIX_VAL
Method: Replace by fixed value, available for Double, Int, String. |
static int |
METHOD_IGNORE_ROWS
Method: Remove row from data set, available for all types. |
static int |
METHOD_MAX
Method: Replace by max in column, available for Double and Int. |
static int |
METHOD_MEAN
Method: Replace by mean, available for Double and Int (rounded). |
static int |
METHOD_MIN
Method: Replace by min in column, available for Double and Int. |
static int |
METHOD_MOST_FREQUENT
Method: Replace by most frequent value, available for String. |
static int |
METHOD_NO_HANDLING
Method: Do nothing, leave untouched, available for all types. |
static int |
TYPE_DOUBLE
Type of column: Double. |
static int |
TYPE_INT
Type of column: Int. |
static int |
TYPE_STRING
Type of column: String. |
static int |
TYPE_UNKNOWN
Type of column: anything but String, Double, Int. |
Constructor Summary | |
---|---|
ColSetting(DataColumnSpec spec)
Constructor for individual column. |
|
ColSetting(int type)
Constructor for meta column setting. |
Method Summary | |
---|---|
DataCell |
getFixCell()
|
int |
getMethod()
|
String |
getName()
|
int |
getType()
|
boolean |
isMetaConfig()
Is this config a meta-config? |
protected static ColSetting[] |
loadIndividualColSettings(NodeSettingsRO settings)
Helper that load individual settings from a config object, used in NodeModel. |
protected static ColSetting[] |
loadIndividualColSettings(NodeSettingsRO settings,
DataTableSpec spec)
Helper that individual settings from a config object, used in NodeDialog. |
protected static ColSetting[] |
loadMetaColSettings(NodeSettingsRO settings)
Helper that load meta settings from a config object, used in NodeModel. |
protected static ColSetting[] |
loadMetaColSettings(NodeSettingsRO settings,
DataTableSpec spec)
Helper that loads meta settings from a config object, used in NodeDialog. |
protected void |
loadSettings(NodeSettingsRO settings)
Loads settings from a NodeSettings object, used in NodeModel . |
protected static void |
saveIndividualsColSettings(ColSetting[] colSettings,
NodeSettingsWO settings)
Saves the individual settings to a config object. |
protected static void |
saveMetaColSettings(ColSetting[] colSettings,
NodeSettingsWO settings)
Saves the meta settings to a config object. |
protected void |
saveSettings(NodeSettingsWO settings)
Save settings to config object. |
void |
setFixCell(DataCell newFix)
|
void |
setMethod(int method)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_UNKNOWN
public static final int TYPE_DOUBLE
public static final int TYPE_INT
public static final int TYPE_STRING
public static final int METHOD_NO_HANDLING
public static final int METHOD_IGNORE_ROWS
public static final int METHOD_FIX_VAL
public static final int METHOD_MEAN
public static final int METHOD_MIN
public static final int METHOD_MAX
public static final int METHOD_MOST_FREQUENT
protected static final String CFG_METHOD
protected static final String CFG_COLNAME
protected static final String CFG_TYPE
protected static final String CFG_FIXVAL
protected static final String CFG_META
protected static final String CFG_INDIVIDUAL
protected static final String CFG_META_STRING
protected static final String CFG_META_DOUBLE
protected static final String CFG_META_INT
protected static final String CFG_META_OTHER
Constructor Detail |
---|
public ColSetting(int type)
type
- the type of the meta columnpublic ColSetting(DataColumnSpec spec)
spec
- the spec to the columnMethod Detail |
---|
public int getMethod()
public void setMethod(int method)
method
- the method to setpublic DataCell getFixCell()
public void setFixCell(DataCell newFix)
newFix
- the replace to setpublic int getType()
public String getName()
null
if
isMetaConfig()
returns true
public boolean isMetaConfig()
true
if it isprotected void loadSettings(NodeSettingsRO settings) throws InvalidSettingsException
NodeModel
.
settings
- the (sub-) config to load from
InvalidSettingsException
- if any setting is missingprotected void saveSettings(NodeSettingsWO settings)
settings
- to save toprotected static ColSetting[] loadMetaColSettings(NodeSettingsRO settings) throws InvalidSettingsException
settings
- to load from
InvalidSettingsException
- if errors occurprotected static ColSetting[] loadMetaColSettings(NodeSettingsRO settings, DataTableSpec spec)
settings
- to load fromspec
- To be used for default init
protected static ColSetting[] loadIndividualColSettings(NodeSettingsRO settings) throws InvalidSettingsException
settings
- to load from
InvalidSettingsException
- if errors occurprotected static ColSetting[] loadIndividualColSettings(NodeSettingsRO settings, DataTableSpec spec)
settings
- to load fromspec
- ignored, used here to differ from method that is used by
NodeModel
protected static void saveIndividualsColSettings(ColSetting[] colSettings, NodeSettingsWO settings)
colSettings
- the settings to write, may include meta settings
(ignored)settings
- to write toprotected static void saveMetaColSettings(ColSetting[] colSettings, NodeSettingsWO settings)
colSettings
- the settings to write, may include individual settings
(ignored)settings
- to write topublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |