Jacson

de.spieleck.app.jacson.select
Class ParameterSelect

java.lang.Object
  extended byde.spieleck.app.jacson.select.ParameterSelect
All Implemented Interfaces:
ConfigVerify.Acceptor, JacsonRegistrable, JacsonSelect, JacsonStately

public class ParameterSelect
extends java.lang.Object
implements JacsonSelect, ConfigVerify.Acceptor, JacsonStately

Select a chunk into some parameter. You could compare this behaviour with: <xsl:param name="foo"> <xsl:value-of select="node"/> <xsl:param /> The difference to jacson ParameterSelect is the node order. With jacson you decide first, what (chunk) to select. Second is, where you send it (the chunk) to. In this case the previously read/generated chunk is selected into a parameter - and stored for later reusage. The parameter should be initialized earlier (in a parent block). If you don't do so, the parameter is created within the current select block and gets lost after leaving it... (At least, that's what I'd expect it to be :-)) <select param="foo" />

Author:
brenck (Dirk.Brenckmann@gmx.de), fsn

Field Summary
protected  java.lang.String curChunk
          Current chunk
static java.lang.String PARAMETER_NODE
          Accept sub-node "param"
protected  JacsonState state
          The state we live with
 
Constructor Summary
ParameterSelect()
          Default Constructor.
 
Method Summary
 boolean accept(ConfigNode cn)
          Overwritten accept method.
 SelectionResult getNextSelection()
          Called by a filter, to access the SelectionResult(s).
 void init(ConfigNode config, JacsonRegistry registry)
          Overwritten init method
 void registerState(JacsonState state)
          Register the surrounding state
 void setChunk(java.lang.String chunk)
          Feed the node with a chunk and reset match counter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_NODE

public static final java.lang.String PARAMETER_NODE
Accept sub-node "param"

See Also:
Constant Field Values

curChunk

protected java.lang.String curChunk
Current chunk


state

protected JacsonState state
The state we live with

Constructor Detail

ParameterSelect

public ParameterSelect()
Default Constructor. Guarantee it's existence for Bean usage, introspection etc.

Method Detail

init

public void init(ConfigNode config,
                 JacsonRegistry registry)
          throws JacsonConfigException
Overwritten init method

Specified by:
init in interface JacsonRegistrable
Throws:
JacsonConfigException

accept

public boolean accept(ConfigNode cn)
Overwritten accept method. Choose which childnodes are to be accepted and which will be denied.

Specified by:
accept in interface ConfigVerify.Acceptor

registerState

public void registerState(JacsonState state)
Register the surrounding state

Specified by:
registerState in interface JacsonStately

setChunk

public void setChunk(java.lang.String chunk)
Feed the node with a chunk and reset match counter.

Specified by:
setChunk in interface JacsonSelect

getNextSelection

public SelectionResult getNextSelection()
Called by a filter, to access the SelectionResult(s). The returned values depend on the current state of this object. Calls to this class are threadsave by default, because no value will be returned!

Specified by:
getNextSelection in interface JacsonSelect

Spieleck

Copyleft 2002 spieleck.de.