org.inria.ns.reflex.processor.exp
Class UnmarshalAction

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

public class UnmarshalAction
extends AbstractSetAction

The <exp:unmarshal> element parses an Active Sheet to a compiled #exp:x-processor-instance.

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.AbstractSetAction
NO_VALUE
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
UnmarshalAction(Expression source, int validate, String[] prefixes, boolean enablePrefixes, int failFast, Element element, AbstractAction parent)
          Create a new instance of UnmarshalAction.
 
Method Summary
 Object getComputedValue(DataSet dataSet)
          Return the computed value of the property, by parsing an Active Sheet to a compiled processor instance.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ParseProcessorAction.
 
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

UnmarshalAction

public UnmarshalAction(Expression source,
                       int validate,
                       String[] prefixes,
                       boolean enablePrefixes,
                       int failFast,
                       Element element,
                       AbstractAction parent)
                throws XMLException
Create a new instance of UnmarshalAction.

Parameters:
source - The source of the datas to parse, that will be the value of the property, as an Expression.
validate - true if the source must be parsed as a text source, false otherwise.
element - The element from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Throws:
UnmarshalException - When the "name" attribute is not a valid value template.
XMLException
Method Detail

unmarshal

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

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

getComputedValue

public Object getComputedValue(DataSet dataSet)
                        throws ExecutionException,
                               XPathException
Return the computed value of the property, by parsing an Active Sheet to a compiled processor instance.

Specified by:
getComputedValue in interface Computable
Specified by:
getComputedValue in class AbstractSetAction
Parameters:
dataSet - The set of datas used when the name is computed.
Returns:
The computed value of the property.
Throws:
ExecutionException - If the computation can't be performed.
XPathException
See Also:
AbstractSetAction.getComputedValue(org.inria.ns.reflex.processor.DataSet)