com.sun.msv.verifier.psvi

Class TypeDetector

public class TypeDetector extends Verifier

assign types to the incoming SAX2 events and reports them to the application handler through TypedContentHandler. This class "augment" infoset by adding type information. The application can receive augmented infoset by implementing TypedContentHandler.

Author: Kohsuke KAWAGUCHI

Nested Class Summary
classTypeDetector.AmbiguousDocumentException
signals that the document is ambiguous.
Constructor Summary
TypeDetector(DocumentDeclaration documentDecl, ErrorHandler errorHandler)
TypeDetector(DocumentDeclaration documentDecl, TypedContentHandler handler, ErrorHandler errorHandler)
Method Summary
voidcharacters(char[] buf, int start, int len)
voidendDocument()
voidendElement(String namespaceUri, String localName, String qName)
voidignorableWhitespace(char[] buf, int start, int len)
voidsetContentHandler(TypedContentHandler handler)
sets the TypedContentHandler which will received the type-augmented infoset.
voidstartDocument()
voidstartElement(String namespaceUri, String localName, String qName, Attributes atts)

Constructor Detail

TypeDetector

public TypeDetector(DocumentDeclaration documentDecl, ErrorHandler errorHandler)

TypeDetector

public TypeDetector(DocumentDeclaration documentDecl, TypedContentHandler handler, 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)

ignorableWhitespace

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

setContentHandler

public void setContentHandler(TypedContentHandler handler)
sets the TypedContentHandler which will received the type-augmented infoset.

startDocument

public void startDocument()

startElement

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