|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fi.iki.hsivonen.xml.checker.Checker
public abstract class Checker
The abstract base class for SAX-based content checkers that listen to
the ContentHandler
events and emit errors and warnings to
an ErrorHandler
.
Always delegates ignorableWhitespace()
to
characters()
. The other ContentHandler
methods here are stubs that do nothing. Subclasses, therefore, never
need to call the superclass methods.
Field Summary | |
---|---|
private ErrorHandler |
errorHandler
|
private Locator |
locator
|
Constructor Summary | |
---|---|
Checker()
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
Calls reset() . |
void |
endElement(String uri,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
err(String message)
Emit an error. |
Locator |
getDocumentLocator()
Returns the locator. |
ErrorHandler |
getErrorHandler()
Returns the errorHandler. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Calls characters() . |
void |
processingInstruction(String target,
String data)
|
void |
reset()
Does nothing. |
void |
setDocumentLocator(Locator locator)
|
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the errorHandler. |
void |
skippedEntity(String name)
|
void |
startDocument()
Calls reset() . |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
void |
warn(String message)
Emit a warning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ErrorHandler errorHandler
private Locator locator
Constructor Detail |
---|
public Checker()
Method Detail |
---|
public void warn(String message) throws SAXException
message
- the warning message
SAXException
- if something goes wrongpublic void err(String message) throws SAXException
message
- the error message
SAXException
- if something goes wrongpublic void reset()
public ErrorHandler getErrorHandler()
public void setErrorHandler(ErrorHandler errorHandler)
errorHandler
- the errorHandler to setpublic Locator getDocumentLocator()
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument() throws SAXException
reset()
.
startDocument
in interface ContentHandler
SAXException
ContentHandler.startDocument()
public void endDocument() throws SAXException
reset()
.
endDocument
in interface ContentHandler
SAXException
ContentHandler.endDocument()
public final void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
characters()
.
ignorableWhitespace
in interface ContentHandler
SAXException
ContentHandler.ignorableWhitespace(char[], int, int)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
ContentHandler.characters(char[], int, int)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
ContentHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
ContentHandler.endPrefixMapping(java.lang.String)
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
ContentHandler.processingInstruction(java.lang.String,
java.lang.String)
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
ContentHandler.skippedEntity(java.lang.String)
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
ContentHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
ContentHandler.startPrefixMapping(java.lang.String,
java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |