Class AbstractXmlReadHandler
- java.lang.Object
-
- org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
-
- All Implemented Interfaces:
XmlReadHandler
- Direct Known Subclasses:
IgnoreAnyChildReadHandler,PropertiesReadHandler,StringReadHandler
public abstract class AbstractXmlReadHandler extends java.lang.Object implements XmlReadHandler
A base class for implementing anXmlReadHandler. This class takes care of all the delegation management.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)This method is called to process the character data between element tags.voidendElement(java.lang.String uri, java.lang.String tagName)This method is called at the end of an element.org.xml.sax.LocatorgetLocator()Returns the locator as provided by the XML parser.RootXmlReadHandlergetRootHandler()Returns the root handler for the parsing.java.lang.StringgetTagName()Returns the tag name.java.lang.StringgetUri()Returns the uri of the element.voidinit(RootXmlReadHandler rootHandler, java.lang.String uri, java.lang.String tagName)Initialises the handler.voidstartElement(java.lang.String uri, java.lang.String tagName, org.xml.sax.Attributes attrs)This method is called at the start of an element.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler
getObject
-
-
-
-
Method Detail
-
init
public void init(RootXmlReadHandler rootHandler, java.lang.String uri, java.lang.String tagName)
Initialises the handler.- Specified by:
initin interfaceXmlReadHandler- Parameters:
rootHandler- the root handler.tagName- the tag name.uri- the namespace uri.
-
startElement
public final void startElement(java.lang.String uri, java.lang.String tagName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXExceptionThis method is called at the start of an element.- Specified by:
startElementin interfaceXmlReadHandler- Parameters:
tagName- the tag name.attrs- the attributes.uri- the namespace uri.- Throws:
org.xml.sax.SAXException- if there is a parsing error.
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionThis method is called to process the character data between element tags.- Specified by:
charactersin interfaceXmlReadHandler- Parameters:
ch- the character buffer.start- the start index.length- the length.- Throws:
org.xml.sax.SAXException- if there is a parsing error.
-
endElement
public final void endElement(java.lang.String uri, java.lang.String tagName) throws org.xml.sax.SAXExceptionThis method is called at the end of an element.- Specified by:
endElementin interfaceXmlReadHandler- Parameters:
tagName- the tag name.uri- the namespace uri.- Throws:
org.xml.sax.SAXException- if there is a parsing error.
-
getTagName
public java.lang.String getTagName()
Returns the tag name.- Returns:
- the tag name.
-
getUri
public java.lang.String getUri()
Returns the uri of the element. The URI identifies the namespace.- Returns:
- the element's URI.
-
getRootHandler
public RootXmlReadHandler getRootHandler()
Returns the root handler for the parsing.- Returns:
- the root handler.
-
getLocator
public org.xml.sax.Locator getLocator()
Returns the locator as provided by the XML parser. This method may return null if the XML parser has no locator support.- Returns:
- the locator or null.
-
-