ch.elca.dependency.graph
Class Filter

java.lang.Object
  |
  +--ch.elca.dependency.graph.AbstractGraphProcessor
        |
        +--ch.elca.dependency.graph.Filter
All Implemented Interfaces:
GraphProcessor

public class Filter
extends AbstractGraphProcessor

A Filter is responsible for filtering Nodes from a Graph.

Version:
1.0-beta
Author:
Pawel Kowalski
See Also:
Graph, Node

Field Summary
protected  boolean m_noRegexp
          A flag, telling whether the specified regular expression could be successfully used for building a RE Program.
protected  org.apache.regexp.RE m_regexp
          A RE (regular expression) associated with this Aggregator.
protected  java.lang.String m_regexpString
          A regexp String associated with this Aggregator.
 
Fields inherited from class ch.elca.dependency.graph.AbstractGraphProcessor
m_name
 
Constructor Summary
Filter()
          Creates a new Filter instance.
Filter(java.lang.String name, java.lang.String regexpString)
          Creates a new Filter instance with a name and a String used to be used for building a RE (regular expression program).
 
Method Summary
 java.lang.String getRegexp()
          Get the regexp used to filter nodes.
 Graph process(Graph graph)
          Filter nodes accordingl to a regexp.
 void setRegexp(java.lang.String regexpString)
          Set a regular expression for filtering nodes.
 
Methods inherited from class ch.elca.dependency.graph.AbstractGraphProcessor
getName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_regexpString

protected java.lang.String m_regexpString
A regexp String associated with this Aggregator.


m_regexp

protected org.apache.regexp.RE m_regexp
A RE (regular expression) associated with this Aggregator.


m_noRegexp

protected boolean m_noRegexp
A flag, telling whether the specified regular expression could be successfully used for building a RE Program.

Constructor Detail

Filter

public Filter()
Creates a new Filter instance.


Filter

public Filter(java.lang.String name,
              java.lang.String regexpString)
Creates a new Filter instance with a name and a String used to be used for building a RE (regular expression program).

Parameters:
name - a String value
regexpString - a String value
See Also:
gnu.regexp.RE
Method Detail

setRegexp

public void setRegexp(java.lang.String regexpString)
Set a regular expression for filtering nodes.

Parameters:
regexpString - a String value

getRegexp

public java.lang.String getRegexp()
Get the regexp used to filter nodes.

Returns:
a String value

process

public Graph process(Graph graph)
Filter nodes accordingl to a regexp. This is an Implementation of the abstract method inherited from the AbstractGraphProcessor.

Parameters:
graph - a Graph value
Returns:
a Graph value
See Also:
gnu.regexp.RE


Copyright © 2003 ELCA Informatique SA. All Rights Reserved.