org.knime.base.node.preproc.joiner
Class Joiner

java.lang.Object
  extended by org.knime.base.node.preproc.joiner.Joiner

public final class Joiner
extends Object

The joiner implements a database like join of two tables.

Author:
Heiko Hofer

Constructor Summary
Joiner(DataTableSpec leftTableSpec, DataTableSpec rightTableSpec, Joiner2Settings settings)
          Creates a new instance.
 
Method Summary
 BufferedDataTable computeJoinTable(BufferedDataTable leftTable, BufferedDataTable rightTable, ExecutionContext exec)
          Joins the leftTable and the rightTable.
 List<String> getConfigWarnings()
          Get warnings which occurred when processing the method getOutputSpec.
(package private)  HashMap<RowKey,Set<RowKey>> getLeftRowKeyMap()
           
 DataTableSpec getOutputSpec()
          Create the DataTableSpec of the output.
(package private)  HashMap<RowKey,Set<RowKey>> getRightRowKeyMap()
           
 List<String> getRuntimeWarnings()
          Get warnings which occurred when processing the method computeJoinTable.
(package private)  void setMemoryService(MemoryService memoryService)
          Used for testing, only.
(package private)  void setNumBitsInitial(int bits)
          Used for testing, only.
(package private)  void setNumBitsMaximal(int bits)
          Used for testing, only.
static void validateSettings(Joiner2Settings s)
          Validates the settings in the passed NodeSettings object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Joiner

public Joiner(DataTableSpec leftTableSpec,
              DataTableSpec rightTableSpec,
              Joiner2Settings settings)
Creates a new instance.

Parameters:
leftTableSpec - The DataTableSpec of the left input table.
rightTableSpec - The DataTableSpec of the right input table.
settings - The settings object. This object might be used to change the settings of the Joiner.
Method Detail

getLeftRowKeyMap

HashMap<RowKey,Set<RowKey>> getLeftRowKeyMap()
Returns:
the rowKeyMap

getRightRowKeyMap

HashMap<RowKey,Set<RowKey>> getRightRowKeyMap()
Returns:
the rowKeyMap

getConfigWarnings

public List<String> getConfigWarnings()
Get warnings which occurred when processing the method getOutputSpec.

Returns:
The warning messages.

getRuntimeWarnings

public List<String> getRuntimeWarnings()
Get warnings which occurred when processing the method computeJoinTable.

Returns:
The warning messages.

getOutputSpec

public DataTableSpec getOutputSpec()
                            throws InvalidSettingsException
Create the DataTableSpec of the output.

Returns:
The DataTableSpec of the output.
Throws:
InvalidSettingsException - if the settings are inconsistent with the DataTableSpec elements given in the Constructor.

computeJoinTable

public BufferedDataTable computeJoinTable(BufferedDataTable leftTable,
                                          BufferedDataTable rightTable,
                                          ExecutionContext exec)
                                   throws CanceledExecutionException,
                                          InvalidSettingsException
Joins the leftTable and the rightTable.

Parameters:
leftTable - The left input table.
rightTable - The right input table.
exec - The Execution monitor for this execution.
Returns:
The joined table.
Throws:
CanceledExecutionException - when execution is canceled
InvalidSettingsException - when inconsistent settings are provided

validateSettings

public static void validateSettings(Joiner2Settings s)
                             throws InvalidSettingsException
Validates the settings in the passed NodeSettings object. The specified settings is checked for completeness and consistency.

Parameters:
s - The settings to validate.
Throws:
InvalidSettingsException - If the validation of the settings failed.

setMemoryService

void setMemoryService(MemoryService memoryService)
Used for testing, only.

Parameters:
memoryService - set memory service

setNumBitsInitial

void setNumBitsInitial(int bits)
Used for testing, only.

Parameters:
bits - number of initial partitions will be 2^bits

setNumBitsMaximal

void setNumBitsMaximal(int bits)
Used for testing, only.

Parameters:
bits - number of maximal partitions will be 2^numBits


Copyright, 2003 - 2012. 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.