Class RequestAction

  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.core.AbstractSetAction
          extended by
All Implemented Interfaces:
Computable, Executable, Presentable, NamespaceContextFactory

public class RequestAction
extends AbstractSetAction

<io:request> is an action that submit requests to an XML Native Database.

The XND must have a driver compliant with the XML:DB API ; this driver must be registered to the XML:DB DatabaseManager.

The "type" of request is the name of the XML:DB service to invoke that must implement the XML:DB XPathQueryService interface.

The request may accept parameters (<xcl:param>). According to the XML:DB driver, various parameters may be set (they are called "properties" in XML:DB).

Philippe Poulard
See Also:
SetParameterAction, DatabaseManager, XPathQueryService

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.AbstractSetAction
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
Constructor Summary
RequestAction(Expression connect, EvaluableExpression query, String type, String version, EvaluableExpression style, Element element, AbstractAction parent)
          Create a new instance of RequestAction.
Method Summary
 Object getComputedValue(DataSet dataSet)
          Return the computed value of the property, by submitting a query.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          Unmarshaller for RequestAction.
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractSetAction
addProperty, getComputedName, getName, getValue, runAction, scope, unmarshalScope
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


public RequestAction(Expression connect,
                     EvaluableExpression query,
                     String type,
                     String version,
                     EvaluableExpression style,
                     Element element,
                     AbstractAction parent)
              throws XMLException
Create a new instance of RequestAction.

connect - The connection to the database, as an Expression.
query - The query, as an Expression.
type - The type of query, used to retrieve the XML:DB service.
version - The version of the query service, used to retrieve the XML:DB service. Pass "1.0" if you don't know.
style - The style of the result : tree, stream, xml, or as-is (default).
element - The element from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Method Detail


public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
Unmarshaller for RequestAction.

parent - The action depending from
element - The XML element to unmarshall.
The RequestAction created.
UnmarshalException - When the element and its content is not those expected.


public Object getComputedValue(DataSet dataSet)
                        throws ExecutionException,
Return the computed value of the property, by submitting a query.

Specified by:
getComputedValue in interface Computable
Specified by:
getComputedValue in class AbstractSetAction
dataSet - The set of datas used when the name is computed.
The computed value of the property.
ExecutionException - If the computation can't be performed.