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

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

public abstract class ComplexOperationAction
extends AbstractAction

At runtime, a complex operation is performed or registered if it is deferred.

Complex operations are deferable X-operations that work with an operand. A complex operation is given by the following elements :

Author:
Philippe Poulard
See Also:
SimpleOperationAction

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
ComplexOperationAction(Expression referent, Expression refParent, Expression operand, Node node, AbstractAction parent)
          Creates a new instance of ComplexOperationAction.
 
Method Summary
abstract  void operate(Object referent, Object parent, Object operand, DataSet dataSet)
          Perform the operation.
 void runAction(DataSet dataSet)
          Execute the action : decide if the operation must be performed now or later.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ComplexOperationAction.
 
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

ComplexOperationAction

public ComplexOperationAction(Expression referent,
                              Expression refParent,
                              Expression operand,
                              Node node,
                              AbstractAction parent)
Creates a new instance of ComplexOperationAction.

Parameters:
referent - The referent object or the referent position to remove, as an Expression.
refParent - The parent of the referent object, as an Expression, or null.
operand - The operand used by this operation.
node - The node 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 ComplexOperationAction.

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

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Execute the action : decide if the operation must be performed now or later.

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

operate

public abstract void operate(Object referent,
                             Object parent,
                             Object operand,
                             DataSet dataSet)
Perform the operation.

Parameters:
referent - The referent object, or its position.
parent - The parent of the referent object. Can't be null if the reference is a number, or if the referent is unable to retrieve its parent by itself.
operand - The operand used by this operation.
dataSet - The data set in use.