de.spieleck.app.jacson.filter
Class SubstitutionFilter
java.lang.Object
de.spieleck.app.jacson.PluginBase
de.spieleck.app.jacson.filter.FilterBase
de.spieleck.app.jacson.filter.SubstitutionFilter
- All Implemented Interfaces:
- ConfigVerify.Acceptor, JacsonChunkDrain, JacsonFilter, JacsonRegistrable, JacsonReporting, JacsonStately
- public class SubstitutionFilter
- extends FilterBase
- implements ConfigVerify.Acceptor
A filter which accepts certains chunks and replaces
it by different ones. Configuration:
- Optional : Non matches are blocked, default true.
This filter is particularly useful in conjunction with the
SelectionFilterFilter
since one can modify
parts of a chunk and the continue processing.
- Author:
- fsn
Field Summary |
protected java.util.Map |
map
The mappings applied to the chunks. |
static java.lang.String |
MAP_NODE
|
static java.lang.String |
NEW_NODE
|
static java.lang.String |
OLD_NODE
|
protected boolean |
onlymatch
Do we let through chunks which do not match?? |
static java.lang.String |
ONLYMATCH_NODE
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ONLYMATCH_NODE
public static final java.lang.String ONLYMATCH_NODE
- See Also:
- Constant Field Values
MAP_NODE
public static final java.lang.String MAP_NODE
- See Also:
- Constant Field Values
OLD_NODE
public static final java.lang.String OLD_NODE
- See Also:
- Constant Field Values
NEW_NODE
public static final java.lang.String NEW_NODE
- See Also:
- Constant Field Values
onlymatch
protected boolean onlymatch
- Do we let through chunks which do not match??
map
protected java.util.Map map
- The mappings applied to the chunks.
SubstitutionFilter
public SubstitutionFilter()
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
Copyleft 2002 spieleck.de.