org.inria.ns.reflex.processor.xcl.xml
Class XMLComment

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.XMLComment
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class XMLComment
extends XMLAction

<xcl:comment> is an action that creates an XML comment used to feed the XML context.

Author:
Philippe Poulard

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
XMLComment(Expression text, Node node, AbstractAction parent)
          Creates a new instance of XMLComment.
 
Method Summary
 Comment getComment(DataSet dataSet)
          Computes the XML comment represented by this action.
 Object getData(DataSet dataSet)
          Return the XML comment that will feed the context.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for XMLComment.
 
Methods inherited from class org.inria.ns.reflex.processor.xcl.xml.XMLAction
getName, 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

XMLComment

public XMLComment(Expression text,
                  Node node,
                  AbstractAction parent)
Creates a new instance of XMLComment.

Parameters:
text - The text of the comment, 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,
                                       Element element)
                                throws UnmarshalException
XML unmarshaller for XMLComment.

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

getData

public Object getData(DataSet dataSet)
               throws XPathException,
                      ExecutionException
Return the XML comment that will feed the context.

Specified by:
getData in class AbstractFeedAction
Parameters:
dataSet - The set of datas used when the comment is computed.
Returns:
The computed XML comment Comment
Throws:
ExecutionException - If the computation can't be performed.
XPathException - If one of the expressions encountered are invalid.

getComment

public Comment getComment(DataSet dataSet)
                   throws XPathException,
                          ExecutionException
Computes the XML comment represented by this action.

Parameters:
dataSet - The set of datas used when the comment is computed.
Returns:
An empty XML comment.
Throws:
ExecutionException - If the computation can't be performed.
XPathException - If one of the expressions encountered are invalid.