org.inria.ns.reflex.processor.catalog
Interface CatalogEntry

All Known Implementing Classes:
AbstractIdentifierAction, PublicAction, ResourceAction, SystemAction, URIAction

public interface CatalogEntry

A CatalogEntry can test if a candidate catalog key matches it.

A catalog key is composed of :

See $cat:system-id, $cat:public-id, $cat:uri, $cat:resource.

Other properties are also involved : $cat:selector and $cat:prefer.

Author:
Philippe Poulard
See Also:
CatalogKey

Method Summary
 void feedContext(DataSet dataSet, Object alternate)
          Feeds the context with a single alternate resource, that is to say the String, XFile or Object that should replace the candidate ; this method allow to process the alternate resource before feeding the context.
 boolean isMatching(DataSet dataSet)
          Check if a candidate catalog key matches partially or entirely this catalog entry.
 

Method Detail

isMatching

boolean isMatching(DataSet dataSet)
                   throws ExecutionException
Check if a candidate catalog key matches partially or entirely this catalog entry.

Partial matching may focus on selector matching, or identifier matching ; further matching test is anyway expected to complete the full matching. Partial matching reflects a mapping decomposed in several nested active tags.

Parameters:
dataSet - The set of datas used when the action is running. Contains the catalog key, the selector, and other datas.
Returns:
true if the candidate key matches this catalog entry, false otherwise.
Throws:
ExecutionException - If the candidate catalog key can't be checked.

feedContext

void feedContext(DataSet dataSet,
                 Object alternate)
                 throws XPathException,
                        ExecutionException
Feeds the context with a single alternate resource, that is to say the String, XFile or Object that should replace the candidate ; this method allow to process the alternate resource before feeding the context.

A catalog entry that doesn't specify itslef an alternate resource should push a context and run its subactions, and call this method with each object found in the context.

This method should be called after checking isMatching(DataSet).

Parameters:
dataSet - The set of datas used when the action is running.
alternate - The alternate resource that will be processed before feeding the context.
Throws:
XPathException
ExecutionException