org.pentaho.reporting.libraries.xmlns.parser
public abstract class AbstractXmlReadHandler extends Object implements XmlReadHandler
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 Map | deriveParseParameters()
Creates a working copy of the current parse state.
|
protected void | doneParsing()
Done parsing.
|
void | endElement(String uri, String tagName)
This method is called at the end of an element.
|
protected XmlReadHandler | getHandlerForChild(String uri, String tagName, Attributes atts)
Returns the handler for a child element.
|
Locator | getLocator()
Returns the locator as provided by the XML parser. |
RootXmlReadHandler | getRootHandler()
Returns the root handler for the parsing.
|
String | getTagName()
Returns the tag name.
|
String | getUri()
Returns the uri of the element. |
void | init(RootXmlReadHandler rootHandler, String uri, String tagName)
Initialises the handler.
|
protected boolean | isSameNamespace(String namespaceURI)
Checks whether the given url denotes the same namespace as the element's namespace.
|
protected Object | performExternalParsing(String file, Class targetClass)
Parses an external file using LibLoader and returns the parsed result as an object of type
targetClass . |
protected Object | performExternalParsing(String file, Class targetClass, Map map)
Parses an external file using LibLoader and returns the parsed result as an object of type
targetClass . |
void | startElement(String uri, String tagName, Attributes attrs)
This method is called at the start of an element.
|
protected void | startParsing(Attributes attrs)
Starts parsing.
|
Parameters: ch the character buffer. start the start index. length the length.
Throws: SAXException if there is a parsing error.
Returns: the derived parse-parameters.
UNKNOWN: ObjectAllocationInLoop as this is a cloning operation.
Throws: SAXException if there is a parsing error.
Parameters: tagName the tag name.
Throws: SAXException if there is a parsing error.
Parameters: uri the URI of the namespace of the current element. tagName the tag name. atts the attributes.
Returns: the handler or null, if the tagname is invalid.
Throws: SAXException if there is a parsing error.
Returns: the locator or null.
Returns: the root handler.
Returns: the tag name.
Returns: the element's URI.
Parameters: rootHandler the root handler. tagName the tag name.
Parameters: namespaceURI the namespace that should be tested.
Returns: true, if the namespace matches the element's namespace,false otherwise.
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.
Parameters: file the file to be parsed. targetClass the target type of the parse operation.
Returns: the result, never null.
Throws: ParseException if parsing the result failed for some reason. ResourceLoadingException if there was an IO error loading the resource.
See Also: deriveParseParameters AbstractXmlReadHandler
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.
Parameters: file the file to be parsed. targetClass the target type of the parse operation. map the map of parse parameters.
Returns: the result, never null.
Throws: ParseException if parsing the result failed for some reason. ResourceLoadingException if there was an IO error loading the resource.
See Also: deriveParseParameters
Parameters: tagName the tag name. attrs the attributes.
Throws: SAXException if there is a parsing error.
Parameters: attrs the attributes.
Throws: SAXException if there is a parsing error.