com.sun.msv.verifier.identity
Class FieldsMatcher

java.lang.Object
  extended by com.sun.msv.verifier.identity.Matcher
      extended by com.sun.msv.verifier.identity.FieldsMatcher

public class FieldsMatcher
extends Matcher

Coordinator of FieldMatcher. This object is created when SelectorMatcher finds a match. This object then creates FieldMatcher for each field, and let them find their field matchs. When leaving the element that matched the selector, it collects field values and registers a key value to IDConstraintChecker.

Depending on the type of the constraint, it works differently.

Author:
Kohsuke KAWAGUCHI

Field Summary
protected  Matcher[] children
          child matchers.
protected  SelectorMatcher selector
          the parent SelectorMatcher.
protected  Locator startTag
          location of the start tag.
 
Fields inherited from class com.sun.msv.verifier.identity.Matcher
owner
 
Constructor Summary
protected FieldsMatcher(SelectorMatcher selector, String namespaceURI, String localName)
           
 
Method Summary
protected  void characters(char[] buf, int start, int len)
           
protected  void endElement(Datatype type)
           
protected  int getDepth()
           
protected  void onAttribute(String namespaceURI, String localName, String value, Datatype type)
           
protected  void onRemoved()
          called when this bundle is deactivated.
protected  void startElement(String namespaceURI, String localName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTag

protected final Locator startTag
location of the start tag. It is usually preferable as a source of error.


selector

protected final SelectorMatcher selector
the parent SelectorMatcher.


children

protected Matcher[] children
child matchers.

Constructor Detail

FieldsMatcher

protected FieldsMatcher(SelectorMatcher selector,
                        String namespaceURI,
                        String localName)
                 throws SAXException
Throws:
SAXException
Method Detail

onRemoved

protected void onRemoved()
                  throws SAXException
called when this bundle is deactivated. This method is called by the endElement method when this bundle is removed. A derived class can override this method to do whatever necessary.

Throws:
SAXException

getDepth

protected final int getDepth()

startElement

protected void startElement(String namespaceURI,
                            String localName)
                     throws SAXException
Specified by:
startElement in class Matcher
Throws:
SAXException

onAttribute

protected void onAttribute(String namespaceURI,
                           String localName,
                           String value,
                           Datatype type)
                    throws SAXException
Specified by:
onAttribute in class Matcher
Throws:
SAXException

endElement

protected void endElement(Datatype type)
                   throws SAXException
Specified by:
endElement in class Matcher
Throws:
SAXException

characters

protected void characters(char[] buf,
                          int start,
                          int len)
                   throws SAXException
Overrides:
characters in class Matcher
Throws:
SAXException


MSV