org.inria.ns.reflex.processor.asl
Class AssertAction

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

public class AssertAction
extends AbstractFeedAction
implements Identifiable

The <asl:assert> element defines an assertion.

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
AssertAction(QName id, Element element, AbstractAction parent)
          Creates a new instance of AssertAction.
 
Method Summary
 Object getData(DataSet dataSet)
          Return the data that will feed the context.
 QName getId()
          Returns the ID of this object.
 boolean test(DataSet dataSet)
          Test the assertion.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for StepAction.
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractFeedAction
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

AssertAction

public AssertAction(QName id,
                    Element element,
                    AbstractAction parent)
Creates a new instance of AssertAction.

Parameters:
id - The ID of this group of actions.
element - 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

test

public boolean test(DataSet dataSet)
             throws ExecutionException,
                    XPathException
Test the assertion.

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

unmarshal

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

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

getId

public QName getId()
Returns the ID of this object.

Specified by:
getId in interface Identifiable
Returns:
The ID of this object.

getData

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

Specified by:
getData in class AbstractFeedAction
Parameters:
dataSet - The set of datas used when the name is computed.
Returns:
The computed data.
Throws:
ExecutionException - If the computation can't be performed.
XPathException