com.caucho.relaxng
Class VerifierHandlerImpl

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.caucho.relaxng.VerifierHandlerImpl
All Implemented Interfaces:
VerifierHandler, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class VerifierHandlerImpl
extends org.xml.sax.helpers.DefaultHandler
implements VerifierHandler

JARV verifier implementation


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
VerifierHandlerImpl(SchemaImpl schema)
          Creates the Verifier Handler.
VerifierHandlerImpl(SchemaImpl schema, VerifierImpl verifier)
          Creates the Verifier Handler.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          Called when an element ends.
 boolean isValid()
          Checks if the document was valid.
 void sendText()
           
 void setDocumentLocator(org.xml.sax.Locator locator)
          Sets the locator.
 void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
          Sets the error handler
 void startDocument()
          Called when the document starts.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
          Called when an element starts.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ErrorHandler
error, fatalError, warning
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

VerifierHandlerImpl

public VerifierHandlerImpl(SchemaImpl schema,
                           VerifierImpl verifier)
Creates the Verifier Handler.


VerifierHandlerImpl

public VerifierHandlerImpl(SchemaImpl schema)
Creates the Verifier Handler.

Method Detail

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Sets the locator.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
                     throws org.xml.sax.SAXException
Sets the error handler

Throws:
org.xml.sax.SAXException

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Called when the document starts.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Called when an element starts.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

sendText

public void sendText()
              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Called when an element ends.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

isValid

public boolean isValid()
                throws java.lang.IllegalStateException
Checks if the document was valid.

This method can be only called after this handler receives the endDocument event.

Specified by:
isValid in interface VerifierHandler
Returns:
true if the document was valid, false if not.
Throws:
java.lang.IllegalStateException - If this method is called before the endDocument event is dispatched.