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 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.
Method Summary |
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 |
VerifierFilterImpl
public VerifierFilterImpl(Verifier _verifier)
throws SAXException
- Throws:
SAXException
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 interface VerifierFilter
- Returns:
- true if the document was valid,
false if not.
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler
in interface XMLReader
- Overrides:
setErrorHandler
in class XMLFilterImpl
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolver
in interface XMLReader
- Overrides:
setEntityResolver
in class XMLFilterImpl
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interface ContentHandler
- Overrides:
setDocumentLocator
in class XMLFilterImpl
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class XMLFilterImpl
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class XMLFilterImpl
- Throws:
SAXException
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
- Specified by:
startPrefixMapping
in interface ContentHandler
- Overrides:
startPrefixMapping
in class XMLFilterImpl
- Throws:
SAXException
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
- Specified by:
endPrefixMapping
in interface ContentHandler
- Overrides:
endPrefixMapping
in class XMLFilterImpl
- Throws:
SAXException
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class XMLFilterImpl
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class XMLFilterImpl
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class XMLFilterImpl
- Throws:
SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
ignorableWhitespace
in interface ContentHandler
- Overrides:
ignorableWhitespace
in class XMLFilterImpl
- Throws:
SAXException
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
- Specified by:
processingInstruction
in interface ContentHandler
- Overrides:
processingInstruction
in class XMLFilterImpl
- Throws:
SAXException
skippedEntity
public void skippedEntity(String name)
throws SAXException
- Specified by:
skippedEntity
in interface ContentHandler
- Overrides:
skippedEntity
in class XMLFilterImpl
- Throws:
SAXException