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

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.core.AbstractFeedAction
          extended by org.inria.ns.reflex.processor.xcl.xml.XMLAction
              extended by org.inria.ns.reflex.processor.xcl.xml.XMLElement
                  extended by org.inria.ns.reflex.processor.core.LiteralElementAction
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class LiteralElementAction
extends XMLElement

A LiteralElementAction is an XML element which appears as is in an Active Sheet (and which is not active) ; each of its attributes can be an expression evaluated at runtime.

Author:
Philippe Poulard
See Also:
XMLElement

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
LiteralElementAction(Element element, Map attributes, Node node, AbstractAction parent)
           
 
Method Summary
 Element getElement(DataSet dataSet)
          Computes the XML element represented by this action.
 QName getName(DataSet dataSet)
          Return the name of the element.
static AbstractAction unmarshal(AbstractAction parent, Element element, Set inactiveAttrs)
          XML unmarshaller for LiteralElementAction.
 
Methods inherited from class org.inria.ns.reflex.processor.xcl.xml.XMLElement
getData, unmarshal
 
Methods inherited from class org.inria.ns.reflex.processor.xcl.xml.XMLAction
runAction
 
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

LiteralElementAction

public LiteralElementAction(Element element,
                            Map attributes,
                            Node node,
                            AbstractAction parent)
Parameters:
element - The litteral element.
attributes - A non-null map of attributes to evaluate. Each entry must have :
parent - The action depending from.
element - The XML element to unmarshall.
Method Detail

unmarshal

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

Parameters:
parent - The action depending from.
element - The XML element to unmarshall.
inactiveAttrs - The set of attributes that are not active foreign attributes. Each item must be an Attr.
Returns:
The LiteralElementAction created.
Throws:
XMLException - When the element and its content is not those expected.

getElement

public Element getElement(DataSet dataSet)
                   throws XPathException,
                          ExecutionException
Computes the XML element represented by this action. The element created is empty (no content), but may have attributes.

Overrides:
getElement in class XMLElement
Parameters:
dataSet - The set of datas used when the element is computed.
Returns:
The computed XML element.
Throws:
ExecutionException - If the computation can't be performed.
XPathException - If one of the expressions encountered are invalid.

getName

public QName getName(DataSet dataSet)
              throws ExecutionException,
                     XPathException
Return the name of the element. This method is not used but implemented anyway for consistency.

Overrides:
getName in class XMLAction
Parameters:
dataSet - Unused : the name is static.
Returns:
The name of this element.
Throws:
ExecutionException - Never thrown.
XPathException