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

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.PublicAction
All Implemented Interfaces:
CatalogEntry, Executable, Presentable, NamespaceContextFactory

public class PublicAction
extends URIAction

At runtime, the <cat:public> element is used to test if an identifier matches a public 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
PublicAction(Expression publicId, Expression uri, Element element, AbstractAction parent)
          Creates a new instance of PublicAction with the selector xml:external-identifier.
PublicAction(Expression systemId, Expression uri, QName selector, Element element, AbstractAction parent)
          Creates a new instance of PublicAction.
 
Method Summary
 Object getCandidateURI(DataSet dataSet)
          Return the candidate public ID if it is preferred.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for PublicAction.
 
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

PublicAction

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

Parameters:
publicId - The public 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

PublicAction

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

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 PublicAction.

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

getCandidateURI

public Object getCandidateURI(DataSet dataSet)
Return the candidate public ID if it is preferred. See $cat:prefer.

Overrides:
getCandidateURI in class URIAction
Parameters:
dataSet - The set of datas used when the action is running.
Returns:
The value of the $cat:public-id property, or null if public ID are not preferred.