org.inria.ns.reflex.processor.asl
Class ElementAction.NameRef.ElementNameMatcher

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.NameRef.ElementNameMatcher
All Implemented Interfaces:
Reducible
Enclosing class:
ElementAction.NameRef

public class ElementAction.NameRef.ElementNameMatcher
extends ElementAction.Matcher

A concrete material item given by an element reference.


Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.asl.ItemMatcher
FOUND, NOT_FOUND
 
Constructor Summary
ElementAction.NameRef.ElementNameMatcher()
           
 
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 qualified name of the element 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
 

Constructor Detail

ElementAction.NameRef.ElementNameMatcher

public ElementAction.NameRef.ElementNameMatcher()
Method Detail

toString

public String toString()
Return the qualified name of the element to match.

Overrides:
toString in class Object
Returns:
""

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.