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

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

final class OutputDataRow
extends Object

Stores information of a inner or outer join in a DataRow. Stored are the cells of the right row, its rowkey and the indices of the left and the right row. This class provides static method to retrieve the stored data.

Author:
Heiko Hofer

Nested Class Summary
(package private) static class OutputDataRow.Settings
          A class that stores the common settings for all OutputDataRows.
 
Method Summary
(package private) static DataRow createDataRow(int index, int leftIndex, int rightIndex, DataRow rightDataRow, OutputDataRow.Settings settings)
          Create a DataRow that stores information of a inner or outer joins.
(package private) static DataRow createDataRow(int index, int leftIndex, int rightIndex, OutputDataRow.Settings settings)
          Create a DataRow that stores information of a right outer join.
(package private) static Comparator<DataRow> createRowComparator()
          Creates a comparator which can be used to order DataRows created by the factory methods of this class.
(package private) static int getLeftIndex(DataRow row)
           
(package private) static int getRightIndex(DataRow row)
           
(package private) static RowKey getRightKey(DataRow row)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createDataRow

static DataRow createDataRow(int index,
                             int leftIndex,
                             int rightIndex,
                             DataRow rightDataRow,
                             OutputDataRow.Settings settings)
Create a DataRow that stores information of a inner or outer joins.

Parameters:
index - The index of this row.
leftIndex - The index of the left row.
rightIndex - The index of the right row.
rightDataRow - The right row.
settings - The common settings object.
Returns:
New instance of DataRow populated with the given information.

createDataRow

static DataRow createDataRow(int index,
                             int leftIndex,
                             int rightIndex,
                             OutputDataRow.Settings settings)
Create a DataRow that stores information of a right outer join.

Parameters:
index - The index of this row.
leftIndex - The index of the left row.
rightIndex - The index of the right row.
settings - The common settings object.
Returns:
New instance of DataRow populated with the given information.

getLeftIndex

static int getLeftIndex(DataRow row)
Parameters:
row - A DataRow created by the factory methods of this class.
Returns:
The index of the left row.

getRightIndex

static int getRightIndex(DataRow row)
Parameters:
row - A DataRow created by the factory methods of this class.
Returns:
The index of the right row.

getRightKey

static RowKey getRightKey(DataRow row)
Parameters:
row - A DataRow created by the factory methods of this class.
Returns:
the row ID of the right row or null if missing (left outer join)

createRowComparator

static Comparator<DataRow> createRowComparator()
Creates a comparator which can be used to order DataRows created by the factory methods of this class.

Returns:
The comparator.


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.