org.inria.ns.reflex.processor.asl
Class AttributeAction.NamespaceRef.AttributeNamespaceMatcher

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

public class AttributeAction.NamespaceRef.AttributeNamespaceMatcher
extends AttributeAction.Matcher
implements Reducible

A material item for a namespace URI.


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

Constructor Detail

AttributeAction.NamespaceRef.AttributeNamespaceMatcher

public AttributeAction.NamespaceRef.AttributeNamespaceMatcher(List exceptions)
Build the matcher.

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

getNamespaceURI

public String getNamespaceURI()
Return the namespace URI material.

Returns:
The namespace URI, or the special values #any, #other, or #local.

matches

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

Specified by:
matches in class AttributeAction.Matcher
Parameters:
attributeName - The name of the attribute 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)

getExceptions

public List getExceptions()
Return the materials that are exceptions to this material.

Specified by:
getExceptions in interface Reducible
Overrides:
getExceptions in class ItemMatcher
Returns:
The non null list of ItemMatcher exceptions.

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.