org.inria.ns.reflex.processor.xcl
Class KeepAction

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

public class KeepAction
extends AbstractAction

The <xcl:keep> element keeps a property after calling a logic procedure.

Author:
Philippe Poulard
See Also:
CallAction

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
KeepAction(int scope, QExpression name, Expression value, Node node, AbstractAction parent)
          Creates a new instance of KeepAction.
 
Method Summary
 QName getName(DataSet dataSet)
          Return the name of the property to keep.
 int getScope()
          Return the scope of the property to keep.
 Object getValue(DataSet dataSet)
          Return the value of the property to keep.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ExportAction.
 
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, runAction, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeepAction

public KeepAction(int scope,
                  QExpression name,
                  Expression value,
                  Node node,
                  AbstractAction parent)
Creates a new instance of KeepAction.

Parameters:
scope - The scope of the property.
name - The name of the property.
value - The value of the property, 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.
See Also:
CoreNames.LOCAL_SCOPE, CoreNames.GLOBAL_SCOPE, CoreNames.SHARED_SCOPE
Method Detail

unmarshal

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

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

getValue

public Object getValue(DataSet dataSet)
                throws ExecutionException,
                       XPathException
Return the value of the property to keep.

Parameters:
dataSet - The set of datas used when the value is computed.
Returns:
The computed value.
Throws:
ExecutionException - If the computation can't be performed.
XPathException

getName

public QName getName(DataSet dataSet)
              throws ExecutionException,
                     XPathException
Return the name of the property to keep.

Parameters:
dataSet - The set of datas used when the value is computed.
Returns:
The computed name.
Throws:
ExecutionException - If the computation can't be performed.
XPathException

getScope

public int getScope()
Return the scope of the property to keep.

Returns:
The scope of the property to keep.
See Also:
CoreNames.LOCAL_SCOPE, CoreNames.GLOBAL_SCOPE, CoreNames.SHARED_SCOPE