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,org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler,org.xml.sax.XMLFilter,org.xml.sax.XMLReader
public class VerifierFilterImpl extends org.xml.sax.helpers.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(java.lang.String uri, java.lang.String localName, java.lang.String qName)voidendPrefixMapping(java.lang.String prefix)voidignorableWhitespace(char[] ch, int start, int length)booleanisValid()checks if the document was valid.voidprocessingInstruction(java.lang.String target, java.lang.String data)voidsetDocumentLocator(org.xml.sax.Locator locator)voidsetEntityResolver(org.xml.sax.EntityResolver resolver)voidsetErrorHandler(org.xml.sax.ErrorHandler handler)voidskippedEntity(java.lang.String name)voidstartDocument()voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)voidstartPrefixMapping(java.lang.String prefix, java.lang.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
-
-
-
-
Constructor Detail
-
VerifierFilterImpl
public VerifierFilterImpl(Verifier _verifier) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.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(org.xml.sax.ErrorHandler handler)
- Specified by:
setErrorHandlerin interfaceorg.xml.sax.XMLReader- Overrides:
setErrorHandlerin classorg.xml.sax.helpers.XMLFilterImpl
-
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
- Specified by:
setEntityResolverin interfaceorg.xml.sax.XMLReader- Overrides:
setEntityResolverin classorg.xml.sax.helpers.XMLFilterImpl
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocatorin interfaceorg.xml.sax.ContentHandler- Overrides:
setDocumentLocatorin classorg.xml.sax.helpers.XMLFilterImpl
-
startDocument
public void startDocument() throws org.xml.sax.SAXException- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException- Specified by:
startPrefixMappingin interfaceorg.xml.sax.ContentHandler- Overrides:
startPrefixMappingin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException- Specified by:
endPrefixMappingin interfaceorg.xml.sax.ContentHandler- Overrides:
endPrefixMappingin classorg.xml.sax.helpers.XMLFilterImpl- 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 attributes) throws org.xml.sax.SAXException- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.XMLFilterImpl- 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- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.ContentHandler- Overrides:
ignorableWhitespacein classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException- Specified by:
processingInstructionin interfaceorg.xml.sax.ContentHandler- Overrides:
processingInstructionin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
skippedEntity
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException- Specified by:
skippedEntityin interfaceorg.xml.sax.ContentHandler- Overrides:
skippedEntityin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
-