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 vanillaVerifierFilter
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 yourVerifierHandler
will 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 void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String uri, String localName, String qName)
void
endPrefixMapping(String prefix)
void
ignorableWhitespace(char[] ch, int start, int length)
boolean
isValid()
checks if the document was valid.void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
setEntityResolver(EntityResolver resolver)
void
setErrorHandler(ErrorHandler handler)
void
skippedEntity(String name)
void
startDocument()
void
startElement(String uri, String localName, String qName, Attributes attributes)
void
startPrefixMapping(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:VerifierFilter
checks if the document was valid.This method can be only called after this handler receives the endDocument event.
- Specified by:
isValid
in interfaceVerifierFilter
- Returns:
- true if the document was valid, false if not.
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler
in interfaceXMLReader
- Overrides:
setErrorHandler
in classXMLFilterImpl
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolver
in interfaceXMLReader
- Overrides:
setEntityResolver
in classXMLFilterImpl
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classXMLFilterImpl
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classXMLFilterImpl
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classXMLFilterImpl
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classXMLFilterImpl
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classXMLFilterImpl
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classXMLFilterImpl
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classXMLFilterImpl
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classXMLFilterImpl
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classXMLFilterImpl
- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classXMLFilterImpl
- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classXMLFilterImpl
- Throws:
SAXException
-
-