use of org.knime.core.node.port.viewproperty.FilterDefinitionHandlerPortObject in project knime-core by knime.
the class FilterApplyNodeModel method execute.
/**
* {@inheritDoc}
*/
@Override
protected PortObject[] execute(final PortObject[] inObjects, final ExecutionContext exec) throws Exception {
exec.setProgress(0);
PortObject portObject = inObjects[1];
DataTableSpec filterSpec = portObject == null ? ((BufferedDataTable) inObjects[0]).getDataTableSpec() : ((FilterDefinitionHandlerPortObject) portObject).getSpec();
final BufferedDataTableRowOutput out = new BufferedDataTableRowOutput(exec.createDataContainer(((BufferedDataTable) inObjects[0]).getDataTableSpec()));
execute(new DataTableRowInput((BufferedDataTable) inObjects[0]), out, filterSpec, exec, ((BufferedDataTable) inObjects[0]).size());
return new BufferedDataTable[] { out.getDataTable() };
}
use of org.knime.core.node.port.viewproperty.FilterDefinitionHandlerPortObject in project knime-core by knime.
the class FilterApplyRowSplitterNodeModel method execute.
/**
* {@inheritDoc}
*/
@Override
protected PortObject[] execute(final PortObject[] inObjects, final ExecutionContext exec) throws Exception {
exec.setProgress(0);
PortObject portObject = inObjects[1];
DataTableSpec filterSpec = portObject == null ? ((BufferedDataTable) inObjects[0]).getDataTableSpec() : ((FilterDefinitionHandlerPortObject) portObject).getSpec();
final BufferedDataTableRowOutput out1 = new BufferedDataTableRowOutput(exec.createDataContainer(((BufferedDataTable) inObjects[0]).getDataTableSpec()));
final BufferedDataTableRowOutput out2 = new BufferedDataTableRowOutput(exec.createDataContainer(((BufferedDataTable) inObjects[0]).getDataTableSpec()));
execute(new DataTableRowInput((BufferedDataTable) inObjects[0]), out1, out2, filterSpec, exec, ((BufferedDataTable) inObjects[0]).size());
return new BufferedDataTable[] { out1.getDataTable(), out2.getDataTable() };
}
Aggregations