org.inria.ns.reflex.processor.xcl
Class ApplyRulesAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.xcl.ApplyRulesAction
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class ApplyRulesAction
extends AbstractAction

The <xcl:apply-rules> element indicates to apply the rules on the children of the current node after forwarding it.

Author:
Philippe Poulard
See Also:
FilterAction, RuleAction

Nested Class Summary
 
Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction
AbstractAction.ParameterAdapter, AbstractAction.UselessAction
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
ApplyRulesAction(Node node, AbstractAction parent)
          Create a new instance of ApplyRulesAction.
 
Method Summary
 void runAction(DataSet dataSet)
          Forward the current node to the current channel (may be the null channel) and apply the rules on its children.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ApplyRulesAction.
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addAction, addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplyRulesAction

public ApplyRulesAction(Node node,
                        AbstractAction parent)
Create a new instance of ApplyRulesAction.

Parameters:
element - The element from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for ApplyRulesAction.

Parameters:
parent - The action depending from
element - The XML element to unmarshall.
Returns:
The ApplyRulesAction created.
Throws:
UnmarshalException - When the element and its content is not those expected.
XMLException

runAction

public void runAction(DataSet dataSet)
               throws XPathException,
                      ExecutionException
Forward the current node to the current channel (may be the null channel) and apply the rules on its children.

Overrides:
runAction in class AbstractAction
Parameters:
dataSet - The set of datas used when the action is running.
Throws:
ExecutionException - If the action can't be performed.
XPathException