org.inria.ns.reflex.processor.catalog
Class NextCatalogAction

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

public class NextCatalogAction
extends GroupAction

The <cat:next-catalog> action.

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
NextCatalogAction(Expression uri, Element element, AbstractAction parent)
           
 
Method Summary
static void addNextCatalog(DataSet dataSet, Object nextCatalog)
          Add a next catalog to the current context.
 void runAction(DataSet dataSet)
          Process the xml:base and prefer attributes, and run the sub-actions ; after processing, previous values of these attribues are restored.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for NextCatalogAction.
 
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

NextCatalogAction

public NextCatalogAction(Expression uri,
                         Element element,
                         AbstractAction parent)
                  throws XPathException
Parameters:
uri - The uri of the next catalog, as an expression.
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:
XPathException
Method Detail

unmarshal

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

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

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Description copied from class: GroupAction
Process the xml:base and prefer attributes, and run the sub-actions ; after processing, previous values of these attribues are restored.

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

addNextCatalog

public static void addNextCatalog(DataSet dataSet,
                                  Object nextCatalog)
Add a next catalog to the current context.

Parameters:
dataSet - The data set in use, must have been created by CatalogAction.
nextCatalog - The uri of the next catalog, as an XFile or a string.