Package org.iso_relax.verifier.impl
Class VerifierFilterImpl
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.iso_relax.verifier.impl.VerifierFilterImpl
- All Implemented Interfaces:
VerifierFilter,ContentHandler,DTDHandler,EntityResolver,ErrorHandler,XMLFilter,XMLReader
plain vanilla
VerifierFilter implementation.
A verifier implementation can use this class to support VerifierFilter functionality.
To use this class, implement the Verifier.getVerifierFilter() method
as follows:
public VerifierFilter getVerifierFilter() throws SAXException {
return new VerifierFilterImpl(getVerifierHandler());
}
Also, usually you may want to override setErrorHandler method so that
your VerifierHandler will send errors to that handler.
- Version:
- $Id: VerifierFilterImpl.java,v 1.5 2003/05/30 23:46:33 kkawa Exp $
- Author:
- Kohsuke KAWAGUCHI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String uri, String localName, String qName) voidendPrefixMapping(String prefix) voidignorableWhitespace(char[] ch, int start, int length) booleanisValid()checks if the document was valid.voidprocessingInstruction(String target, String data) voidsetDocumentLocator(Locator locator) voidsetEntityResolver(EntityResolver resolver) voidsetErrorHandler(ErrorHandler handler) voidskippedEntity(String name) voidvoidstartElement(String uri, String localName, String qName, Attributes attributes) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, resolveEntity, setContentHandler, setDTDHandler, setFeature, setParent, setProperty, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declarationMethods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setFeature, setProperty
-
Constructor Details
-
VerifierFilterImpl
- Throws:
SAXException
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:VerifierFilterchecks if the document was valid.This method can be only called after this handler receives the endDocument event.
- Specified by:
isValidin interfaceVerifierFilter- Returns:
- true if the document was valid, false if not.
-
setErrorHandler
- Specified by:
setErrorHandlerin interfaceXMLReader- Overrides:
setErrorHandlerin classXMLFilterImpl
-
setEntityResolver
- Specified by:
setEntityResolverin interfaceXMLReader- Overrides:
setEntityResolverin classXMLFilterImpl
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classXMLFilterImpl
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classXMLFilterImpl- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classXMLFilterImpl- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classXMLFilterImpl- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classXMLFilterImpl- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classXMLFilterImpl- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classXMLFilterImpl- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classXMLFilterImpl- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classXMLFilterImpl- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Overrides:
processingInstructionin classXMLFilterImpl- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classXMLFilterImpl- Throws:
SAXException
-