org.inria.ns.reflex.processor.asl
Class ElementAction.NamespaceRef.ElementNamespaceMatcher

java.lang.Object
  extended by org.inria.ns.reflex.processor.asl.ItemMatcher
      extended by org.inria.ns.reflex.processor.asl.ElementAction.Matcher
          extended by org.inria.ns.reflex.processor.asl.ElementAction.NamespaceRef.ElementNamespaceMatcher
All Implemented Interfaces:
Reducible
Enclosing class:
ElementAction.NamespaceRef

public class ElementAction.NamespaceRef.ElementNamespaceMatcher
extends ElementAction.Matcher
implements Reducible

A concrete material item for a namespace URI.


Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.asl.ItemMatcher
FOUND, NOT_FOUND
 
Constructor Summary
ElementAction.NamespaceRef.ElementNamespaceMatcher(List exceptions)
          Build the matcher.
 
Method Summary
 TypedData matches(QName elementName, DataSet dataSet)
          Test if an element name matches this material.
 ValidationError reportError(Element element, Node candidate)
          Raise an error.
 String toString()
          Return the namespace URI of the element set to match.
 
Methods inherited from class org.inria.ns.reflex.processor.asl.ElementAction.Matcher
getAction, matches
 
Methods inherited from class org.inria.ns.reflex.processor.asl.ItemMatcher
canUse, getExceptions, getInterimStep, getMaxInit, getMaxRest, getMinInit, getMinRest, mustUse, reset, runInterim, setBoundaries, setInterimStep, use
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.structures.Reducible
getExceptions
 

Constructor Detail

ElementAction.NamespaceRef.ElementNamespaceMatcher

public ElementAction.NamespaceRef.ElementNamespaceMatcher(List exceptions)
Build the matcher.

Parameters:
exceptions - The list of Matcher that are exception when matching.
Method Detail

toString

public String toString()
Return the namespace URI of the element set to match.

Overrides:
toString in class Object
Returns:
"<{ns}:*>"

matches

public TypedData matches(QName elementName,
                         DataSet dataSet)
Test if an element name matches this material.

Specified by:
matches in class ElementAction.Matcher
Parameters:
elementName - The name of the element to test.
dataSet - The set of datas used when the matcher is matching.
Returns:
FOUND if the object matches this material and carries no data, a TypedData if the object matches this material and carries a data, NOT_FOUND otherwise.
See Also:
ItemMatcher.matches(Object,org.inria.ns.reflex.processor.DataSet)

reportError

public ValidationError reportError(Element element,
                                   Node candidate)
Raise an error. This method is used by the SchemaClientHandler when a candidate material failed to match whereas it is expected.

Specified by:
reportError in class ItemMatcher
Parameters:
element - The element in fault.
candidate - The candidate node that cause the fault.
Returns:
The validation error raised.