Jacson

de.spieleck.app.jacson.filter
Class RegExpExtractFilter

java.lang.Object
  extended byde.spieleck.app.jacson.PluginBase
      extended byde.spieleck.app.jacson.filter.FilterBase
          extended byde.spieleck.app.jacson.filter.RegExpExtractFilter
All Implemented Interfaces:
ConfigVerify.Acceptor, JacsonChunkDrain, JacsonFilter, JacsonRegistrable, JacsonReporting, JacsonStately

public class RegExpExtractFilter
extends FilterBase
implements ConfigVerify.Acceptor

Filter that extracts part of the incoming expression and forwards the obtained groups as new chunks. Configurable weather to block chunks that do not match at all.

Author:
fsn

Field Summary
protected  boolean onlymatches
          If set, let through only chunks which match the expression.
static java.lang.String ONLYMATCHES_NODE
           
protected  org.apache.oro.text.regex.Pattern pattern
          oro-Regexp-Pattern
protected  RegExpUtil rutil
           
protected  java.lang.String separator
           
static java.lang.String SEPARATOR_NODE
           
 
Fields inherited from class de.spieleck.app.jacson.filter.FilterBase
drain
 
Constructor Summary
RegExpExtractFilter()
           
 
Method Summary
 boolean accept(ConfigNode node)
           
 void init(ConfigNode config, JacsonRegistry registry)
           
 void putChunk(java.lang.String chunk)
          Feed a single chunk into this filter
 
Methods inherited from class de.spieleck.app.jacson.filter.FilterBase
setDrain
 
Methods inherited from class de.spieleck.app.jacson.PluginBase
getRegReport, getRegState, registerReport, registerState, summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.jacson.JacsonStately
registerState
 
Methods inherited from interface de.spieleck.app.jacson.JacsonReporting
registerReport, summary
 

Field Detail

SEPARATOR_NODE

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

ONLYMATCHES_NODE

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

pattern

protected org.apache.oro.text.regex.Pattern pattern
oro-Regexp-Pattern


onlymatches

protected boolean onlymatches
If set, let through only chunks which match the expression.


separator

protected java.lang.String separator

rutil

protected RegExpUtil rutil
Constructor Detail

RegExpExtractFilter

public RegExpExtractFilter()
Method Detail

init

public void init(ConfigNode config,
                 JacsonRegistry registry)
          throws JacsonConfigException
Specified by:
init in interface JacsonRegistrable
Throws:
JacsonConfigException

accept

public boolean accept(ConfigNode node)
Specified by:
accept in interface ConfigVerify.Acceptor

putChunk

public void putChunk(java.lang.String chunk)
              throws JacsonException
Description copied from interface: JacsonChunkDrain
Feed a single chunk into this filter

Specified by:
putChunk in interface JacsonChunkDrain
Throws:
JacsonException

Spieleck

Copyleft 2002 spieleck.de.