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
public class VerifierFilterImpl extends XMLFilterImpl implements VerifierFilter
plain vanillaVerifierFilterimplementation.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
setErrorHandlermethod so that yourVerifierHandlerwill send errors to that handler.
-
-
Constructor Summary
Constructors Constructor Description VerifierFilterImpl(Verifier _verifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(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)voidstartDocument()voidstartElement(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, 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.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setFeature, setProperty
-
-
-
-
Constructor Detail
-
VerifierFilterImpl
public VerifierFilterImpl(Verifier _verifier) throws SAXException
- Throws:
SAXException
-
-
Method Detail
-
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
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandlerin interfaceXMLReader- Overrides:
setErrorHandlerin classXMLFilterImpl
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolverin interfaceXMLReader- Overrides:
setEntityResolverin classXMLFilterImpl
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classXMLFilterImpl
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classXMLFilterImpl- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classXMLFilterImpl- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classXMLFilterImpl- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- 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
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classXMLFilterImpl- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classXMLFilterImpl- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classXMLFilterImpl- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Overrides:
processingInstructionin classXMLFilterImpl- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classXMLFilterImpl- Throws:
SAXException
-
-