org.knime.base.node.preproc.filter.row.rowfilter
Class RowFilterFactory
java.lang.Object
org.knime.base.node.preproc.filter.row.rowfilter.RowFilterFactory
public final class RowFilterFactory
- extends Object
Used to create RowFilter
objects from
NodeSettings
. Each row filter must be
registered here (i.e. code must be added). Scan the file for "CHANGE HERE".
RowFilter must provide the default constructor.
- Author:
- Peter Ohl, University of Konstanz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prepareConfigFor
public static NodeSettingsWO prepareConfigFor(NodeSettingsWO cfg,
RowFilter filter)
- Parameters:
filter
- the filter for which the config object will be used to
store the settingscfg
- will be modified to be able to recreate the corresponding
filter type from it
- Returns:
- the config object passed in, modified in a way the
createRowFilter(NodeSettingsRO)
method will be able to
recreate the row filter object (with the corresponding type) from
it. The method adds a row filter type identifier to the config.
Passing the returned object to the
createRowFilter(NodeSettingsRO)
method will recreate the
filter. If null
is returned the row filter type
was not properly added to this factory - which should not happen.
createRowFilter
public static RowFilter createRowFilter(NodeSettingsRO cfg)
throws InvalidSettingsException
- Parameters:
cfg
- config of a filter (created with the above method) to create
the corresponding filter for. The settings in the config will
be loaded into the filter.
- Returns:
- a (configured) row filter of the type that was used to create the
passed config spec.
- Throws:
InvalidSettingsException
- if the config object contains no type ID
(then it was probably not prepared with the method above), or
if it contains an unknown filter type - which either means
the type is not registered at all or the type was added to
the method above but not to this method, of if it contains
invalid/inconsistent settings.
Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display,
or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the
copyright owner or as specified in the license file distributed with this product.