|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.randomcoder.xml.AbstractXMLReader
public abstract class AbstractXMLReader
Abstract base class for XMLReader implementations.
Copyright (c) 2006-2007, Craig Condit. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
| Constructor Summary | |
|---|---|
AbstractXMLReader()
|
|
| Method Summary | |
|---|---|
ContentHandler |
getContentHandler()
Gets the content handler defined for this reader. |
DTDHandler |
getDTDHandler()
Gets the DTD handler for this reader. |
EntityResolver |
getEntityResolver()
Gets the entity resolver for this reader. |
ErrorHandler |
getErrorHandler()
Gets the error handler for this reader. |
boolean |
getFeature(String name)
Determines if this reader supports the given feature. |
Object |
getProperty(String name)
Gets the value of the named property. |
abstract void |
parse(InputSource input)
Parses the given input source. |
void |
parse(String systemId)
Parses a document using the given system id. |
void |
setContentHandler(ContentHandler contentHandler)
Sets the content handler for this reader. |
void |
setDTDHandler(DTDHandler dtdHandler)
Sets the DTD handler for this reader. |
void |
setEntityResolver(EntityResolver entityResolver)
Sets the entity resolver for this reader. |
void |
setErrorHandler(ErrorHandler errorHandler)
Sets the error handler for this reader. |
void |
setFeature(String name,
boolean value)
Sets the availability of the given feature. |
void |
setProperty(String name,
Object value)
Sets the value o fthe named property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractXMLReader()
| Method Detail |
|---|
public abstract void parse(InputSource input)
throws IOException,
SAXException
Subclasses must implement this method to handle XML parsing.
parse in interface XMLReaderinput - input source to parse
IOException - if resource cannot be read
SAXException - if an error occursXMLReader.parse(InputSource)
public void parse(String systemId)
throws IOException,
SAXException
parse in interface XMLReadersystemId - system id
IOException - if resource cannot be read
SAXException - if an error occurspublic ContentHandler getContentHandler()
getContentHandler in interface XMLReaderpublic void setContentHandler(ContentHandler contentHandler)
setContentHandler in interface XMLReadercontentHandler - content handlerpublic DTDHandler getDTDHandler()
getDTDHandler in interface XMLReaderpublic void setDTDHandler(DTDHandler dtdHandler)
setDTDHandler in interface XMLReaderdtdHandler - DTD handlerpublic EntityResolver getEntityResolver()
getEntityResolver in interface XMLReaderpublic void setEntityResolver(EntityResolver entityResolver)
setEntityResolver in interface XMLReaderentityResolver - entity resolverpublic ErrorHandler getErrorHandler()
getErrorHandler in interface XMLReaderpublic void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler in interface XMLReadererrorHandler - error handler
public boolean getFeature(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
getFeature in interface XMLReadername - feature name
SAXNotRecognizedException - if the feature is not recognized
SAXNotSupportedException - if the method is not supported
public void setFeature(String name,
boolean value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setFeature in interface XMLReadername - feature namevalue - true if enabled, false otherwise
SAXNotRecognizedException - if the feature is not recognized
SAXNotSupportedException - if the method is not supported
public Object getProperty(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
getProperty in interface XMLReadername - property name
SAXNotRecognizedException - if the property is not recognized
SAXNotSupportedException - if the method is not supported
public void setProperty(String name,
Object value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setProperty in interface XMLReadername - property namevalue - property value
SAXNotRecognizedException - if the property is not recognized
SAXNotSupportedException - if the method is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||