org.gersteinlab.tyna.core.operators
Class NodeIdFilter

java.lang.Object
  extended by org.gersteinlab.tyna.core.operators.NodeIdFilter
All Implemented Interfaces:
UnaryOperator

public class NodeIdFilter
extends java.lang.Object
implements UnaryOperator

        This class defines the ID filter, which is a unary graph operator. It
        takes a graph as input, and returns a graph that contains nodes whose
        IDs satisfy some requirements.
        

Version:
1.0 (November 6, 2005) Change History: 1.0 - Initial version
Author:
Kevin Yuk-Lap Yip

Field Summary
static java.lang.String EXACT
           
protected  java.lang.String filterType
          The filtering type
protected  java.lang.String filterValue
          The filtering value
protected  boolean includeNeighbors
          Whether to include the neighbors of the nodes that pass the requirements
static java.lang.String REG_EXP
           
 
Constructor Summary
NodeIdFilter(java.lang.String filterType, java.lang.String filterValue, boolean includeNeighbors)
          Create a new node ID filter.
 
Method Summary
 Graph operate(Graph graph)
          Perform the operation on a graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXACT

public static final java.lang.String EXACT
See Also:
Constant Field Values

REG_EXP

public static final java.lang.String REG_EXP
See Also:
Constant Field Values

filterType

protected java.lang.String filterType
The filtering type


filterValue

protected java.lang.String filterValue
The filtering value


includeNeighbors

protected boolean includeNeighbors
Whether to include the neighbors of the nodes that pass the requirements

Constructor Detail

NodeIdFilter

public NodeIdFilter(java.lang.String filterType,
                    java.lang.String filterValue,
                    boolean includeNeighbors)
Create a new node ID filter.

Parameters:
filterType - The filtering type
filterValue - The filtering value
includeNeighbors - Whether to include the neighbors of the nodes that pass the requirements
Method Detail

operate

public Graph operate(Graph graph)
              throws GraphTypeException
Description copied from interface: UnaryOperator
Perform the operation on a graph.

Specified by:
operate in interface UnaryOperator
Parameters:
graph - The graph
Returns:
The resulting graph
Throws:
GraphTypeException - If there are problems with the type of the input graph