org.knime.base.node.preproc.setoperator
Class SetOperationTable

java.lang.Object
  extended by org.knime.base.node.preproc.setoperator.SetOperationTable

public class SetOperationTable
extends Object

This class handles the result table creation for the Set node. It provides also a static method to create the result table specification.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
SetOperationTable(ExecutionContext exec, boolean useRowID1, String col1, BufferedDataTable table1, boolean useRowID2, String col2, BufferedDataTable table2, SetOperation op, boolean enableHilite, boolean skipMissing, boolean sortInMemory)
          Constructor for class SetOperationTable.
 
Method Summary
static DataTableSpec createResultTableSpec(SetOperation op, DataColumnSpec col1Spec, DataColumnSpec col2Spec)
           
static DataColumnSpec createRowIDSpec(String name)
           
 BufferedDataTable getBufferedTable()
           
 int getDuplicateCounter()
           
 Map<RowKey,Set<RowKey>> getHiliteMapping0()
          The hilite translation Map for the first set or null if the enableHilte flag in the constructor was set to false.
 Map<RowKey,Set<RowKey>> getHiliteMapping1()
          The hilite translation Map for the second set or null if the enableHilte flag in the constructor was set to false.
 int getMissingCounter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetOperationTable

public SetOperationTable(ExecutionContext exec,
                         boolean useRowID1,
                         String col1,
                         BufferedDataTable table1,
                         boolean useRowID2,
                         String col2,
                         BufferedDataTable table2,
                         SetOperation op,
                         boolean enableHilite,
                         boolean skipMissing,
                         boolean sortInMemory)
                  throws CanceledExecutionException
Constructor for class SetOperationTable.

Parameters:
exec - the ExecutionContext
useRowID1 - true if the row id should be used instead of a column
col1 - the column name of the first set
table1 - the table of the first set
useRowID2 - true if the row id should be used instead of a column
col2 - the column name of the second set
table2 - the table of the second set
op - the SetOperation to perform
enableHilite - true if hilite translation should be performed
skipMissing - true if missing cells should be skipped
sortInMemory - true if the sorting should be performed in memory
Throws:
CanceledExecutionException - if the operation was canceled
Method Detail

getDuplicateCounter

public int getDuplicateCounter()
Returns:
the number of duplicates

getMissingCounter

public int getMissingCounter()
Returns:
the number of missing values

getBufferedTable

public BufferedDataTable getBufferedTable()
Returns:
the resulting set as a BufferedDataTable

createRowIDSpec

public static DataColumnSpec createRowIDSpec(String name)
Parameters:
name - the name of the column
Returns:
the column spec with the given column name and the type of the RowID

createResultTableSpec

public static DataTableSpec createResultTableSpec(SetOperation op,
                                                  DataColumnSpec col1Spec,
                                                  DataColumnSpec col2Spec)
Parameters:
op - the SetOperation
col1Spec - the DataColumnSpec of the first set
col2Spec - the DataColumnSpec of the second set
Returns:
the result DataTableSpec

getHiliteMapping0

public Map<RowKey,Set<RowKey>> getHiliteMapping0()
The hilite translation Map for the first set or null if the enableHilte flag in the constructor was set to false. The key of the Map is the row key of each row and the corresponding value is the Collection with all old row keys which belong to this element.

Returns:
the hilite translation Map or null if the enableHilte flag in the constructor was set to false.

getHiliteMapping1

public Map<RowKey,Set<RowKey>> getHiliteMapping1()
The hilite translation Map for the second set or null if the enableHilte flag in the constructor was set to false. The key of the Map is the row key of each row and the corresponding value is the Collection with all old row keys which belong to this element.

Returns:
the hilite translation Map or null if the enableHilte flag in the constructor was set to false.


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.