org.knime.base.node.rules
Class RuleNodeFactory

java.lang.Object
  extended by org.knime.base.node.rules.RuleNodeFactory

final class RuleNodeFactory
extends Object

This utility class has function to create all kinds of rule nodes.

Author:
Thorsten Meinl, University of Konstanz

Method Summary
static RuleNode and(RuleNode left, RuleNode right)
          Creates a new AND node.
static RuleNode eq(int leftCol, int rightCol)
          Creates a equal node, that compares the values in two columns.
static RuleNode eq(int col, Number value)
          Creates a equal node, that compares the value in a column to a fixed number.
static RuleNode eq(int col, String value)
          Creates a new equal node, that compares the value in a column to a fixed string.
static RuleNode ge(int leftCol, int rightCol, DataValueComparator comp)
          Creates a new greater than or equal node, that compares the values in two columns.
static RuleNode ge(int col, Number value)
          Creates a new greater than or equal node, that compares the value in a column to a fixed number.
static RuleNode ge(int col, String value)
          Creates a new greater than or equal node, that compares the value in a column to a fixed string.
static RuleNode gt(int leftCol, int rightCol, DataValueComparator comp)
          Creates a new greater than node, that compares the values in two columns.
static RuleNode gt(int col, Number value)
          Creates a new greater than node, that compares the value in a column to a fixed number.
static RuleNode gt(int col, String value)
          Creates a new greater than node, that compares the value in a column to a fixed string.
static RuleNode in(int col, List<String> list)
          Returns a new in node that checks if the the value in the column is equal to at least one string value from the list.
static RuleNode le(int leftCol, int rightCol, DataValueComparator comp)
          Creates a new less than or equal node, that compares the values in two columns.
static RuleNode le(int col, Number value)
          Creates a new less than or equal node, that compares the value in a column to a fixed number.
static RuleNode le(int col, String value)
          Creates a new less than or equal node, that compares the value in a column to a fixed string.
static RuleNode like(int col1, int col2)
          Returns a new like not that tries to match a fixed wildcard expression to the value in a column.
static RuleNode like(int col, String value)
          Returns a new like not that tries to match a fixed wildcard expression to the value in a column.
static RuleNode like(String value, int col)
          Returns a new like not that tries to match a wildcard expression in a column to a fixed string value.
static RuleNode lt(int leftCol, int rightCol, DataValueComparator comp)
          Creates a new less than node, that compares the values in two columns.
static RuleNode lt(int col, Number value)
          Creates a new less than node, that compares the value in a column to a fixed number.
static RuleNode lt(int col, String value)
          Creates a new less than node, that compares the value in a column to a fixed string.
static RuleNode missing(int col)
          Creates a new MISSING node.
static RuleNode not(RuleNode node)
          Creates a new NOT node.
static RuleNode or(RuleNode left, RuleNode right)
          Creates a new OR node.
static RuleNode xor(RuleNode left, RuleNode right)
          Creates a new XOR node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

and

public static RuleNode and(RuleNode left,
                           RuleNode right)
Creates a new AND node.

Parameters:
left - the left node
right - the right node
Returns:
a new AND node

or

public static RuleNode or(RuleNode left,
                          RuleNode right)
Creates a new OR node.

Parameters:
left - the left node
right - the right node
Returns:
a new OR node

xor

public static RuleNode xor(RuleNode left,
                           RuleNode right)
Creates a new XOR node.

Parameters:
left - the left node
right - the right node
Returns:
a new XOR node

not

public static RuleNode not(RuleNode node)
Creates a new NOT node.

Parameters:
node - the node to be negated
Returns:
a new NOT node

gt

public static RuleNode gt(int leftCol,
                          int rightCol,
                          DataValueComparator comp)
Creates a new greater than node, that compares the values in two columns.

Parameters:
leftCol - the left column's index
rightCol - the right column's index
comp - the comparator that should be used for comparing the two columns
Returns:
a new greater than node

gt

public static RuleNode gt(int col,
                          Number value)
Creates a new greater than node, that compares the value in a column to a fixed number.

Parameters:
col - the left column's index
value - the fixed number on the right side
Returns:
a new greater than node

gt

public static RuleNode gt(int col,
                          String value)
Creates a new greater than node, that compares the value in a column to a fixed string.

Parameters:
col - the left column's index
value - the fixed string on the right side
Returns:
a new greater than node

ge

public static RuleNode ge(int leftCol,
                          int rightCol,
                          DataValueComparator comp)
Creates a new greater than or equal node, that compares the values in two columns.

Parameters:
leftCol - the left column's index
rightCol - the right column's index
comp - the comparator that should be used for comparing the two columns
Returns:
a new greater than or equal node

ge

public static RuleNode ge(int col,
                          Number value)
Creates a new greater than or equal node, that compares the value in a column to a fixed number.

Parameters:
col - the left column's index
value - the fixed number on the right side
Returns:
a new greater than or equal node

ge

public static RuleNode ge(int col,
                          String value)
Creates a new greater than or equal node, that compares the value in a column to a fixed string.

Parameters:
col - the left column's index
value - the fixed string on the right side
Returns:
a new greater than or equal node

lt

public static RuleNode lt(int leftCol,
                          int rightCol,
                          DataValueComparator comp)
Creates a new less than node, that compares the values in two columns.

Parameters:
leftCol - the left column's index
rightCol - the right column's index
comp - the comparator that should be used for comparing the two columns
Returns:
a new less than node

lt

public static RuleNode lt(int col,
                          Number value)
Creates a new less than node, that compares the value in a column to a fixed number.

Parameters:
col - the left column's index
value - the fixed number on the right side
Returns:
a new less than node

lt

public static RuleNode lt(int col,
                          String value)
Creates a new less than node, that compares the value in a column to a fixed string.

Parameters:
col - the left column's index
value - the fixed string on the right side
Returns:
a new less than node

le

public static RuleNode le(int leftCol,
                          int rightCol,
                          DataValueComparator comp)
Creates a new less than or equal node, that compares the values in two columns.

Parameters:
leftCol - the left column's index
rightCol - the right column's index
comp - the comparator that should be used for comparing the two columns
Returns:
a new less than or equal node

le

public static RuleNode le(int col,
                          Number value)
Creates a new less than or equal node, that compares the value in a column to a fixed number.

Parameters:
col - the left column's index
value - the fixed number on the right side
Returns:
a new greater than node

le

public static RuleNode le(int col,
                          String value)
Creates a new less than or equal node, that compares the value in a column to a fixed string.

Parameters:
col - the left column's index
value - the fixed string on the right side
Returns:
a new less than or equal node

eq

public static RuleNode eq(int leftCol,
                          int rightCol)
Creates a equal node, that compares the values in two columns.

Parameters:
leftCol - the left column's index
rightCol - the right column's index
Returns:
a new equal node

eq

public static RuleNode eq(int col,
                          Number value)
Creates a equal node, that compares the value in a column to a fixed number.

Parameters:
col - the left column's index
value - the fixed number on the right side
Returns:
a new equal node

eq

public static RuleNode eq(int col,
                          String value)
Creates a new equal node, that compares the value in a column to a fixed string.

Parameters:
col - the left column's index
value - the fixed string on the right side
Returns:
a new equal node

like

public static RuleNode like(int col,
                            String value)
Returns a new like not that tries to match a fixed wildcard expression to the value in a column.

Parameters:
col - the left column's index
value - a string that is interpreted as a wildcard pattern (with * and ? as wildcards)
Returns:
a new like node

like

public static RuleNode like(String value,
                            int col)
Returns a new like not that tries to match a wildcard expression in a column to a fixed string value.

Parameters:
value - a fixed value
col - the column's index whose contents are interpreted as wildcard patterns
Returns:
a new like node

like

public static RuleNode like(int col1,
                            int col2)
Returns a new like not that tries to match a fixed wildcard expression to the value in a column.

Parameters:
col1 - the left column's index
col2 - the right column's index, whose value is interpreted as a wildcard pattern (with * and ? as wildcards)
Returns:
a new like node

in

public static RuleNode in(int col,
                          List<String> list)
Returns a new in node that checks if the the value in the column is equal to at least one string value from the list.

Parameters:
col - the left column's index
list - a list of strings
Returns:
a new in node

missing

public static RuleNode missing(int col)
Creates a new MISSING node.

Parameters:
col - the column int the row to be checked
Returns:
a new MISSING node


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.