com.sun.msv.verifier.identity
Class IDConstraintChecker

java.lang.Object
  |
  +--com.sun.msv.verifier.AbstractVerifier
        |
        +--com.sun.msv.verifier.Verifier
              |
              +--com.sun.msv.verifier.identity.IDConstraintChecker
All Implemented Interfaces:
ContentHandler, DTDHandler, IDContextProvider, IVerifier, ValidationContext, VerifierHandler

public class IDConstraintChecker
extends Verifier

Verifier with XML Schema-related enforcement.

This class can be used in the same way as Verifier. This class also checks XML Schema's identity constraint.

Author:
Kohsuke KAWAGUCHI

Field Summary
static String ERR_DOUBLE_MATCH
           
static String ERR_NOT_UNIQUE
           
static String ERR_NOT_UNIQUE_DIAG
           
static String ERR_UNDEFINED_KEY
           
static String ERR_UNMATCHED_KEY_FIELD
           
 
Fields inherited from class com.sun.msv.verifier.Verifier
ERR_MISSING_ATTRIBUTE, ERR_UNCOMPLETED_CONTENT, ERR_UNEXPECTED_ATTRIBUTE, ERR_UNEXPECTED_ELEMENT, ERR_UNEXPECTED_STARTTAG, ERR_UNEXPECTED_TEXT, ERR_UNSOLD_IDREF, ERR_UNSOLD_KEYREF
 
Constructor Summary
IDConstraintChecker(XMLSchemaGrammar grammar, ErrorHandler errorHandler)
           
 
Method Summary
 void characters(char[] buf, int start, int len)
           
 void endDocument()
           
 void endElement(String namespaceUri, String localName, String qName)
           
static String localizeMessage(String propertyName, Object arg)
           
static String localizeMessage(String propertyName, Object[] args)
           
 void startDocument()
           
 
Methods inherited from class com.sun.msv.verifier.Verifier
getCurrentElementType, getErrorHandler, getLastCharacterType, ignorableWhitespace, isValid, setErrorHandler, startElement
 
Methods inherited from class com.sun.msv.verifier.AbstractVerifier
endPrefixMapping, getLocator, isNotation, isUnparsedEntity, notationDecl, onID, onIDREF, processingInstruction, resolveNamespacePrefix, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.msv.verifier.IVerifier
getLocator
 
Methods inherited from interface org.xml.sax.ContentHandler
endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping
 

Field Detail

ERR_UNMATCHED_KEY_FIELD

public static final String ERR_UNMATCHED_KEY_FIELD

ERR_NOT_UNIQUE

public static final String ERR_NOT_UNIQUE

ERR_NOT_UNIQUE_DIAG

public static final String ERR_NOT_UNIQUE_DIAG

ERR_DOUBLE_MATCH

public static final String ERR_DOUBLE_MATCH

ERR_UNDEFINED_KEY

public static final String ERR_UNDEFINED_KEY
Constructor Detail

IDConstraintChecker

public IDConstraintChecker(XMLSchemaGrammar grammar,
                           ErrorHandler errorHandler)
Method Detail

startDocument

public void startDocument()
                   throws SAXException
Overrides:
startDocument in class Verifier

endDocument

public void endDocument()
                 throws SAXException
Overrides:
endDocument in class Verifier

characters

public void characters(char[] buf,
                       int start,
                       int len)
                throws SAXException
Overrides:
characters in class Verifier

endElement

public void endElement(String namespaceUri,
                       String localName,
                       String qName)
                throws SAXException
Overrides:
endElement in class Verifier

localizeMessage

public static String localizeMessage(String propertyName,
                                     Object arg)

localizeMessage

public static String localizeMessage(String propertyName,
                                     Object[] args)