edu.ucla.belief.io
Class AbstractSaxHandler
Object
DefaultHandler
AbstractSaxHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Direct Known Subclasses:
- XmlbifParser, XmlDocumentHandler
public abstract class AbstractSaxHandler
- extends DefaultHandler
- Since:
- 20050201
- Author:
- keith cascio
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
cleanupAbstractSaxHandler()
|
void |
configureFactory(SAXParserFactory factory)
override this method if, e.g., you need to install an xml validation schema |
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
error(SAXParseException e)
|
CharactersHandler |
getCharactersHandler()
|
ElementHandler |
getElementHandler()
|
SAXParserFactory |
getFactory()
|
SAXParser |
getSAXParser()
|
String[] |
getSyntaxErrors()
|
abstract ElementHandler |
getValidRootHandler(String qName,
Attributes attributes)
|
abstract boolean |
isValidating()
|
boolean |
isValidationErrorFatal()
override this method to make syntax errors non-fatal |
abstract boolean |
isValidRootElementName(String qname)
|
void |
parse(File infile)
|
void |
parse(InputSource is)
|
void |
parse(InputStream is)
|
static void |
printAll(Throwable throwable,
PrintStream stream)
|
void |
setCharactersHandler(CharactersHandler charactershandler)
|
void |
setElementHandler(ElementHandler elementhandler)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
Methods inherited from class DefaultHandler |
endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
theRootCheckHandler
public final ElementHandler theRootCheckHandler
theCharactersNoop
public final CharactersHandler theCharactersNoop
AbstractSaxHandler
public AbstractSaxHandler()
isValidRootElementName
public abstract boolean isValidRootElementName(String qname)
getValidRootHandler
public abstract ElementHandler getValidRootHandler(String qName,
Attributes attributes)
isValidating
public abstract boolean isValidating()
isValidationErrorFatal
public boolean isValidationErrorFatal()
- override this method to make syntax errors non-fatal
configureFactory
public void configureFactory(SAXParserFactory factory)
- override this method if, e.g., you need to install an xml validation schema
setElementHandler
public void setElementHandler(ElementHandler elementhandler)
getElementHandler
public ElementHandler getElementHandler()
setCharactersHandler
public void setCharactersHandler(CharactersHandler charactershandler)
getCharactersHandler
public CharactersHandler getCharactersHandler()
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DefaultHandler
- 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 DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class DefaultHandler
- Throws:
SAXException
getFactory
public SAXParserFactory getFactory()
- Since:
- 20060524
getSAXParser
public SAXParser getSAXParser()
throws ParserConfigurationException,
SAXException
- Throws:
ParserConfigurationException
SAXException
- Since:
- 20060524
parse
public void parse(File infile)
throws IOException,
SAXException,
ParserConfigurationException
- Throws:
IOException
SAXException
ParserConfigurationException
parse
public void parse(InputStream is)
throws IOException,
SAXException,
ParserConfigurationException
- Throws:
IOException
SAXException
ParserConfigurationException
parse
public void parse(InputSource is)
throws IOException,
SAXException,
ParserConfigurationException
- Throws:
IOException
SAXException
ParserConfigurationException
cleanupAbstractSaxHandler
public void cleanupAbstractSaxHandler()
error
public void error(SAXParseException e)
throws SAXParseException
- Specified by:
error
in interface ErrorHandler
- Overrides:
error
in class DefaultHandler
- Throws:
SAXParseException
getSyntaxErrors
public String[] getSyntaxErrors()
printAll
public static void printAll(Throwable throwable,
PrintStream stream)
Copyright 2010 UCLA Automated Reasoning Group