|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
public abstract class AbstractXmlReadHandler
A base class for implementing an XmlReadHandler.
This class takes care of all the delegation management.
| Constructor Summary | |
|---|---|
protected |
AbstractXmlReadHandler()
Creates a new handler. |
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
This method is called to process the character data between element tags. |
protected java.util.Map |
deriveParseParameters()
Creates a working copy of the current parse state. |
protected void |
doneParsing()
Done parsing. |
void |
endElement(java.lang.String uri,
java.lang.String tagName)
This method is called at the end of an element. |
protected XmlReadHandler |
getHandlerForChild(java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes atts)
Returns the handler for a child element. |
org.xml.sax.Locator |
getLocator()
Returns the locator as provided by the XML parser. |
RootXmlReadHandler |
getRootHandler()
Returns the root handler for the parsing. |
java.lang.String |
getTagName()
Returns the tag name. |
java.lang.String |
getUri()
Returns the uri of the element. |
void |
init(RootXmlReadHandler rootHandler,
java.lang.String uri,
java.lang.String tagName)
Initialises the handler. |
protected boolean |
isSameNamespace(java.lang.String namespaceURI)
Checks whether the given url denotes the same namespace as the element's namespace. |
protected java.lang.Object |
performExternalParsing(java.lang.String file,
java.lang.Class targetClass)
Parses an external file using LibLoader and returns the parsed result as an object of type targetClass. |
protected java.lang.Object |
performExternalParsing(java.lang.String file,
java.lang.Class targetClass,
java.util.Map map)
Parses an external file using LibLoader and returns the parsed result as an object of type targetClass. |
void |
startElement(java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes attrs)
This method is called at the start of an element. |
protected void |
startParsing(org.xml.sax.Attributes attrs)
Starts parsing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler |
|---|
getObject |
| Constructor Detail |
|---|
protected AbstractXmlReadHandler()
| Method Detail |
|---|
public void init(RootXmlReadHandler rootHandler,
java.lang.String uri,
java.lang.String tagName)
init in interface XmlReadHandlerrootHandler - the root handler.tagName - the tag name.uri - the namespace uri.
public final void startElement(java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
startElement in interface XmlReadHandlertagName - the tag name.attrs - the attributes.uri - the namespace uri.
org.xml.sax.SAXException - if there is a parsing error.
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface XmlReadHandlerch - the character buffer.start - the start index.length - the length.
org.xml.sax.SAXException - if there is a parsing error.
public final void endElement(java.lang.String uri,
java.lang.String tagName)
throws org.xml.sax.SAXException
endElement in interface XmlReadHandlertagName - the tag name.uri - the namespace uri.
org.xml.sax.SAXException - if there is a parsing error.
protected void startParsing(org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
attrs - the attributes.
org.xml.sax.SAXException - if there is a parsing error.
protected void doneParsing()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - if there is a parsing error.protected boolean isSameNamespace(java.lang.String namespaceURI)
namespaceURI - the namespace that should be tested.
protected XmlReadHandler getHandlerForChild(java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
uri - the URI of the namespace of the current element.tagName - the tag name.atts - the attributes.
org.xml.sax.SAXException - if there is a parsing error.public java.lang.String getTagName()
public java.lang.String getUri()
public RootXmlReadHandler getRootHandler()
public org.xml.sax.Locator getLocator()
protected java.lang.Object performExternalParsing(java.lang.String file,
java.lang.Class targetClass)
throws ParseException,
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
targetClass. The file is given as relative pathname (relative to the current source file).
The current helper-methods are used as parse-parameters for the external parsing.
file - the file to be parsed.targetClass - the target type of the parse operation.
ParseException - if parsing the result failed for some reason.
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException - if there was an IO error loading the resource.deriveParseParameters(),
performExternalParsing(String, Class, Map)
protected java.lang.Object performExternalParsing(java.lang.String file,
java.lang.Class targetClass,
java.util.Map map)
throws ParseException,
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
targetClass. The file is given as relative pathname (relative to the current source file).
The current helper-methods are used as parse-parameters for the external parsing.
file - the file to be parsed.targetClass - the target type of the parse operation.map - the map of parse parameters.
ParseException - if parsing the result failed for some reason.
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException - if there was an IO error loading the resource.deriveParseParameters()protected java.util.Map deriveParseParameters()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||