com.sun.msv.verifier

Class Verifier

public class Verifier extends AbstractVerifier implements IVerifier

SAX ContentHandler that verifies incoming SAX event stream. This object can be reused to validate multiple documents. Just be careful NOT to use the same object to validate more than one documents at the same time.

Author: Kohsuke KAWAGUCHI

Field Summary
static StringERR_DUPLICATE_ID
static StringERR_MISSING_ATTRIBUTE
static StringERR_UNCOMPLETED_CONTENT
static StringERR_UNEXPECTED_ATTRIBUTE
static StringERR_UNEXPECTED_ELEMENT
static StringERR_UNEXPECTED_STARTTAG
static StringERR_UNEXPECTED_TEXT
static StringERR_UNSOLD_IDREF
Constructor Summary
Verifier(DocumentDeclaration documentDecl, ErrorHandler errorHandler)
Method Summary
voidcharacters(char[] buf, int start, int len)
voidendDocument()
voidendElement(String namespaceUri, String localName, String qName)
ObjectgetCurrentElementType()
ErrorHandlergetErrorHandler()
Datatype[]getLastCharacterType()
voidignorableWhitespace(char[] buf, int start, int len)
booleanisValid()
static StringlocalizeMessage(String propertyName, Object[] args)
voidonDuplicateId(String id)
voidsetErrorHandler(ErrorHandler handler)
voidsetPanicMode(boolean usePanicMode)
voidstartDocument()
voidstartElement(String namespaceUri, String localName, String qName, Attributes atts)

Field Detail

ERR_DUPLICATE_ID

public static final String ERR_DUPLICATE_ID

ERR_MISSING_ATTRIBUTE

public static final String ERR_MISSING_ATTRIBUTE

ERR_UNCOMPLETED_CONTENT

public static final String ERR_UNCOMPLETED_CONTENT

ERR_UNEXPECTED_ATTRIBUTE

public static final String ERR_UNEXPECTED_ATTRIBUTE

ERR_UNEXPECTED_ELEMENT

public static final String ERR_UNEXPECTED_ELEMENT

ERR_UNEXPECTED_STARTTAG

public static final String ERR_UNEXPECTED_STARTTAG

ERR_UNEXPECTED_TEXT

public static final String ERR_UNEXPECTED_TEXT

ERR_UNSOLD_IDREF

public static final String ERR_UNSOLD_IDREF

Constructor Detail

Verifier

public Verifier(DocumentDeclaration documentDecl, ErrorHandler errorHandler)

Method Detail

characters

public void characters(char[] buf, int start, int len)

endDocument

public void endDocument()

endElement

public void endElement(String namespaceUri, String localName, String qName)

getCurrentElementType

public Object getCurrentElementType()

getErrorHandler

public final ErrorHandler getErrorHandler()

getLastCharacterType

public Datatype[] getLastCharacterType()

ignorableWhitespace

public void ignorableWhitespace(char[] buf, int start, int len)

isValid

public final boolean isValid()

localizeMessage

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

onDuplicateId

public void onDuplicateId(String id)

setErrorHandler

public final void setErrorHandler(ErrorHandler handler)

setPanicMode

public final void setPanicMode(boolean usePanicMode)

startDocument

public void startDocument()

startElement

public void startElement(String namespaceUri, String localName, String qName, Attributes atts)