use of org.knime.core.node.util.filter.InputFilter in project knime-core by knime.
the class EditNominalDomainDicConfiguration method guessDefaultColumnFilter.
/**
* Sets default in the filter configuration: Columns in common (name & type) go to the include list, others to
* the exclude list.
* @param origSpec ...
* @param valueSpec ...
*/
void guessDefaultColumnFilter(final DataTableSpec origSpec, final DataTableSpec valueSpec) {
// includes all column which are present in both DTS; also have to have the same type.
InputFilter<DataColumnSpec> defaultGuessFilter = new InputFilter<DataColumnSpec>() {
@Override
public boolean include(final DataColumnSpec valueColumnSpec) {
DataColumnSpec columnSpec = origSpec.getColumnSpec(valueColumnSpec.getName());
return columnSpec == null ? false : columnSpec.getType().equals(valueColumnSpec.getType());
}
};
m_filterConfiguration.loadDefault(valueSpec, defaultGuessFilter, true);
}
Aggregations