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

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.AbstractIdentifierAction
              extended by org.inria.ns.reflex.processor.catalog.URIAction
                  extended by org.inria.ns.reflex.processor.catalog.SystemAction
All Implemented Interfaces:
CatalogEntry, Executable, Presentable, NamespaceContextFactory

public class SystemAction
extends URIAction

At runtime, the <cat:system> element is used to test if an identifier matches a system identifier.

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
SystemAction(Expression systemId, Expression uri, Element element, AbstractAction parent)
          Creates a new instance of SystemAction with the selector xml:external-identifier.
SystemAction(Expression systemId, Expression uri, QName selector, Element element, AbstractAction parent)
          Creates a new instance of SystemAction.
 
Method Summary
 Object getCandidateURI(DataSet dataSet)
          Return the candidate system ID.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for SystemAction.
 
Methods inherited from class org.inria.ns.reflex.processor.catalog.URIAction
feedContext, isMatching
 
Methods inherited from class org.inria.ns.reflex.processor.catalog.AbstractIdentifierAction
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

SystemAction

public SystemAction(Expression systemId,
                    Expression uri,
                    Element element,
                    AbstractAction parent)
             throws XPathException
Creates a new instance of SystemAction with the selector xml:external-identifier.

Parameters:
systemId - The system ID to match.
uri - The alternate uri.
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

SystemAction

public SystemAction(Expression systemId,
                    Expression uri,
                    QName selector,
                    Element element,
                    AbstractAction parent)
             throws XPathException
Creates a new instance of SystemAction.

Parameters:
systemId - The system ID to match.
uri - The alternate uri.
selector - The selector.
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 SystemAction.

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

getCandidateURI

public Object getCandidateURI(DataSet dataSet)
Return the candidate system ID.

Overrides:
getCandidateURI in class URIAction
Parameters:
dataSet - The set of datas used when the action is running.
Returns:
The value of the $cat:system-id property, that shouldn't be null.