org.inria.ns.reflex.processor.core
Class LiteralTextAction

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

public class LiteralTextAction
extends AbstractAction

A LiteralTextAction is an XML text inside an Active Sheet that is evaluated at runtime to produce an XML text or other objects.

Author:
Philippe Poulard
See Also:
XMLText

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
LiteralTextAction(Expression textContent, Node node, AbstractAction parent)
          Creates a new instance of FallBackAction.
 
Method Summary
 void runAction(DataSet dataSet)
          Execute the action by adding a data to the current context.
static AbstractAction unmarshal(AbstractAction parent, Text textNode)
          XML unmarshaller for LiteralTextAction that comes from text nodes.
 
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, unmarshal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiteralTextAction

public LiteralTextAction(Expression textContent,
                         Node node,
                         AbstractAction parent)
Creates a new instance of FallBackAction.

Parameters:
textContent - The text content, as an Expression.
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,
                                       Text textNode)
                                throws XMLException
XML unmarshaller for LiteralTextAction that comes from text nodes. Such a text is an AVT expression to parse. Blank nodes are ignored, except if one of the ancestor is marked by XMLWhitespaceKeeper.

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

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Execute the action by adding a data to the current context.

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